Examples of XML Code for Methods in Admin API

The examples in this topic demonstrate how to retrieve information and perform actions using Admin API. The examples show the output for each retrieval (In some cases, the output is truncated.)

Both successful and failed operations are demonstrated.

NOTE   This topic provides a limited number of examples. For additional examples, see the sample code provided together with the Admin API libraries.

Features

>Retrieve all Feature data for a specific Key ID

Products

>Retrieve all Product data for a specific Vendor ID

> Retrieve the Parent Key ID and Detached Key ID for a Detached Product

Working With Files

>Upload a Location Data File for a Detach Operation

>Apply a V2C File (Unsuccessful)

>Attempt to Upload a Non-existing File

Protection Keys

>Retrieve Named Key Data Elements for a Specific Vendor ID

>Retrieve All Data for a Specific Key ID

> Retrieve Batch Code and Vendor Code for a Specific Sentinel Vendor Key ID

>Add a Description to a Protection Key

Managing Client Identities

See Managing Cloud Licensing

Sentinel License Manager

>Retrieve Sentinel License Manager Data in XML Format  (Default)

>Retrieve Sentinel License Manager Data in JSON Format

> Retrieve Sentinel License Manager Configuration Data

Admin API Sessions

>Retrieve the Session Count for a Key or Vendor

>Retrieve Session-related Data from Sentinel License Manager

>Retrieve List of Current Sessions for a Specific Key

>Retrieve Selected Session Data for All Keys for a Specific Vendor

>Delete a Licensing API Session With Admin API

Detachable Licenses

>Retrieve a List of Detached Licenses

>Upload a Location Data File for a Detach Operation

>Apply an H2R File Successfully

>Retrieve Detach-related Configuration Settings

>Change a Configuration Setting to Enable Detach

Vendor Keys (Master Keys and Developer Keys)

>Retrieve Batch Code and Vendor Code for a Specific Sentinel Vendor Key ID

Retrieve All Feature Data for a Specific Key ID

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <hasp><id>952845321</id></hasp>
</haspscope>

Format XML

<admin>
 <feature>
  <element name="*" />
 </feature>
</admin>

NOTE   The asterisk “*” specified for element name retrieves all known elements.

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <feature>
  <index>1</index>
  <vendorname>Supervendor</vendorname>
  <haspname>952845321</haspname>
  <haspid>952845321</haspid>
  <fileid>0xFFCB</fileid>
  <local>Local</local>
  <featureid>0</featureid>
  <featurename>Default Feature</featurename>
  <localname>Local</localname>
  <islocal>1</islocal>
  <localnettext>Loc </localnettext>
  <countingtext>Station</countingtext>
  <logincount>0</logincount>
  <loginlimit>0</loginlimit>
  <detachable>0</detachable>
  <detachedcount>0</detachedcount>
  <locked>1</locked>
  <disabled>0</disabled>
  <expired>0</expired>
  <unusable>0</unusable>
  <licenserestrictions_text>Perpetual</licenserestrictions_text>
  <sessioncount>0</sessioncount>
  <productname></productname>
  <productid>0</productid>
  <typename>Sentinel HL Time</typename>
  <configuration><sentinelhl/><hasphl/></configuration>
 </feature>
 <feature>
  <index>2</index>
  <vendorname>Supervendor</vendorname>
  <haspname>952845321</haspname>
  <haspid>952845321</haspid>
  .
  .
  .
  <sessioncount>0</sessioncount>
  <productname></productname>
  <productid>0</productid>
  <typename>Sentinel HL Time</typename>
  <configuration><sentinelhl/><hasphl/></configuration>
 </feature>
  <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Notes

>If a "friendly" key name for a protection key has not been assigned, the <haspname> tag returns the Key ID.

>The <unusable> tag returns a non-zero value if the Feature is unusable. The value is a bit field that describes why the Feature is unusable. The bits in the field are as follows:

1 — Disabled for clone protection or other reasons.

2 — Disabled due to the FQDN check.

4 — Disabled due to time control data (V-Clock) tampering.

8 — Disabled because the Feature is expired.

The total value of the bit field can be any one of the values described above or the sum of two or more of these values. For example, if the Feature is disabled because of FQDN check ( bit 2) and the Feature is expired (bit 8), the value will be 10.

Clone Detection

If the License Manager determines that cloning has occurred, the clone status is noted at three levels in the cloned SL key:

>Protection key level - The <cloned> tag under the <hasp> tag contains "0" if the key is not cloned, or it contains a non-zero value if the key is cloned.

>Product level - The <cloned> tag under the <product> tag contains "0" if the Product is not cloned, or it contains a non-zero value if the Product is cloned.

>Feature level - The <disabled> tag under the <feature> tag contains "0" if the Feature is not cloned, or it contains a non-zero value if the Feature belongs to a Product that was cloned.

Tamper Detection

If the License Manager determines that attempted tampering with the protection key or with the protected application has occurred, the tamper detection status is noted at two levels in the HL key:

>Protection key level - The <key_disabled> and <disabled> tags under the <hasp> tag contain "0" if tampering was not attempted, or they contains "1" if tampering was attempted.

>Feature level - The <disabled> tag under the <feature> tag contains "0" if tampering was not attempted, or it contains "1" if tampering was attempted.

Return to Top

Retrieve All Product Data for a Specific Vendor ID

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <vendor><id>37517</id></vendor>
</haspscope>

Format XML

<admin>
 <product>
  <element name="*" />
 </product>
</admin>

Result

 Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
  <product>
    <index>1</index>
    <productid>3</productid>
    <productname>Demo MB Product 3</productname>
    <islocal>1</islocal>
    <localname>Local</localname>
    <vendorid>37517</vendorid>
    <vendorname>Demo MB</vendorname>
    <haspname>1897232621</haspname>
    <haspid>1897232621</haspid>
    <parentid>0</parentid>
    <iscommuter>0</iscommuter>
    <loginlimit>-1</loginlimit>
    <logincount>0</logincount>
    <maxseats>0</maxseats>
    <seatsfree>0</seatsfree>
    <detachable>0</detachable>
    <maxdays>9999</maxdays>
    <detachmaxdays>14</detachmaxdays>
    <reservedseats>0</reservedseats>
    <reservedpercent>0</reservedpercent>
    <detachedcount>0</detachedcount>
    <cloned>0</cloned>
    <cloneprotection>2</cloneprotection>
    <cloneprotection_physical>PMTyp2</cloneprotection_physical>
    <cloneprotection_virtual>FQDN</cloneprotection_virtual>
    <fqdn>p5q</fqdn>
    <fqdn_has_duplicates>0</fqdn_has_duplicates>
    <fqdn_mismatch>0</fqdn_mismatch>
    <fqdn_duplicates></fqdn_duplicates>
    <clonedfrgid>0</clonedfrgid>
  </product>
  <product>
    <index>2</index>
    <productid>4</productid>
    <productname>Demo MB Product 4</productname>
    <islocal>1</islocal>
    ...
    <clonedfrgid>0</clonedfrgid>
  </product>
  <admin_status>
    <code>0</code>
    <text>SNTL_ADMIN_STATUS_OK</text>
  </admin_status>
</admin_response>

Notes

For information on clone protection, see Values Returned for Clone Protection.

For information on clone detection, see Clone Detection.

If duplicate FQDNs are found, output similar to this is returned:

<fqdn_has_duplicates>1</fqdn_has_duplicates>
<fqdn_duplicates>10.24.2.70, 10.24.2.71, 10.24.2.72, 10.24.2.73</fqdn_duplicates>

If a "friendly" key name for a protection key has not been assigned, the <haspname> tag returns the Key ID.

Return to Top

Retrieve the Parent Key ID and Detached Key ID for a Detached Product

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <vendor><id>37517</id></vendor>
</haspscope>

Format XML

<admin>
  <product>
    <element name="haspid" />
   <element name="parentid" />
  </product>
</admin>

Result

 Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <product>
  <haspid>1046032420256932646</haspid>
  <parentid>536317268265255510</parentid>
 </product>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Upload a Location Data File for a Detach Operation

Method: AdminApi.adminSet

Action XML

file://test_location.ID

Result

Status 0 SNTL_ADMIN_STATUS_OK

Status (Result)

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Apply a V2C File (Unsuccessful)

Method: AdminApi.adminSet

Action XML

file://test_update.v2c

Result

Status 6010 SNTL_ADMIN_UPDATE_ERROR

Status (Result)

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <admin_status>
  <code>6010</code>
  <text>SNTL_ADMIN_UPDATE_ERROR</text>
  <numerrors>1</numerrors>
  <error>HASP_UPDATE_BLOCKED</error>
 </admin_status>
</admin_response>

Return to Top

Attempt to Upload a Non-existing File

Method: AdminApi.adminSet

Action XML

file://file_does_not_exist.xml

Result

Status 6006 SNTL_ADMIN_CANNOT_READ_FILE

Status (Result)

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <admin_status>
  <code>6006</code>
  <text>SNTL_ADMIN_CANNOT_READ_FILE</text>
  <error>file_does_not_exist.xml</error>
 </admin_status>
</admin_response>

Return to Top

Retrieve Named Protection Key Data Elements for a Specific Vendor ID

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <vendor id="37515" />
</haspscope>

Format XML

<admin>
 <hasp>
  <element name="vendorid" />
  <element name="haspid" />
  <element name="typename" />
  <element name="local" />
  <element name="localname" />
 </hasp>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <hasp>
  <vendorid>37515</vendorid>
  <haspid>952845321</haspid>
  <typename>HASP HL MaxMicro</typename>
  <local>Local</local>
  <localname>Local</localname>
 </hasp>
 <hasp>
  <vendorid>37515</vendorid>
  <haspid>1850023887</haspid>
  <typename>HASP HL MaxMicro</typename>
  <local>Local</local>
  <localname>Local</localname>
 </hasp>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve All Data for a Specific Key ID

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <hasp><id>620581648416481534</id></hasp>
</haspscope>

Format XML

<admin>
 <hasp>
  <element name="*" />
 </hasp>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

Sample output for a Sentinel HL key:

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <hasp>
  <index>1</index>
  <vendorname>Supervendor 5</vendorname>
  <vendorid>37515</vendorid>
  <haspname>My Demo Key</haspname>
  <haspid>4878409</haspid>
  <typename>Sentinel HL Max</typename>
  <configuration>hasphl,sentinelhl</configuration>
  <noid>0</noid>
  <iscommuter>0</iscommuter>
  <islocal>1</islocal>
  <localname>Local</localname>
  <local>Local</local>
  <case>246</case>
  <case_gen>0x16</case_gen>
  <case_color>0x0F</case_color>
  <case_read>0xC600</case_read>
  <led>2</led>
  <mass>0</mass>
  <hw_version>7.0</hw_version>
  <hwinfo>7,0,0,0</hwinfo>
  <oldkey>0</oldkey>
  <firmware>4.21</firmware>
  <loginlimit>0</loginlimit>
  <cloned>0</cloned>
  <clonedfrgid>0</clonedfrgid>
  <fqdn>p5q</fqdn>
  <fqdn_has_duplicates>0</fqdn_has_duplicates>
  <fqdn_duplicates></fqdn_duplicates>
  <alert></alert>
  <detachable>0</detachable>
  <rehost_type>0</rehost_type>
  <has_products>0</has_products>
  <addresses>Local</addresses>
  <blinkstate>1</blinkstate>
 <key_disabled>0</key_disabled>
<disabled>0</disabled> <vmaj>16</vmaj> <vmin>0</vmin> <vbuildservid>0</vbuildservid> <vbuildnumber>0</vbuildnumber> <hostname>P5Q</hostname> <osname>Windows 10 Enterprise</osname> <osversion>Build 19043</osversion> <architecture>Intel64 Family 6 Model 165 Stepping 2</architecture> <serverruntime>0 days 0 hours 50 minutes</serverruntime> <uptime>3041</uptime> <sessioncount>0</sessioncount> </hasp> <admin_status> <code>0</code> <text>SNTL_ADMIN_STATUS_OK</text> </admin_status> </admin_response>

Notes

For information on protection key XML tags, see  Format XML Tags for Protection Keys.

For information on clone detection, see Clone Detection.

If duplicate FQDNs are found, output similar to this is returned:

<fqdn_has_duplicates>1</fqdn_has_duplicates>
<fqdn_duplicates>10.24.2.70, 10.24.2.71, 10.24.2.72, 10.24.2.73</fqdn_duplicates>

Return to Top

Add a Description to a Protection Key

Method: AdminApi.adminSet

Action XML

<?xml version="1.0" encoding="UTF-8"?>
<keydescription>
 <hasp>
  <id>123456</id>
  <name>Neuer Name 04</name>
 </hasp>
</keydescription>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Status (Result)

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve Sentinel License Manager Data in XML Format (Default)

Method: AdminApi.adminGet

Scope XML

Not relevant

Format XML

<admin>
 <license_manager>
  <element name="*" />
 </license_manager>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <license_manager>
  <version>13.00.Axel 14.06.2024 12:56</version>
  <servername>P5Q</servername>
  <serveros>Win32</serveros>
  <serverguid>kQvdEY1zRNl3IKXL/S7BwBa2WzFqMfmdfxdwUKkA</serverguid>
  <osname>Windows 10 Enterprise</osname> <osversion>Build 19043</osversion> <architecture>Intel64 Family 6 Model 165 Stepping 2</architecture>
  <vmtext></vmtext>
  <has_ipv4>1</has_ipv4>
  <has_ipv6>1</has_ipv6>
  <localips>192.168.56.1, 10.24.2.18, 192.168.98.1, 192.168.92.1, 192.168.1.18</localips>
  <serverruntime>0 days 20 hours 5 minutes</serverruntime>
  <uptime>72305</uptime>
  <logincount>1</logincount>
  <loginpeak>1</loginpeak>
  <sessioncount>2</sessioncount>
  <sessionpeak>2</sessionpeak>
  <loginrequestcount>2</loginrequestcount>
  <localrequestcount>3</localrequestcount>
  <remoterequestcount>7977</remoterequestcount>
  <requestcount>7980</requestcount>
  <readcount>30709778</readcount>
  <writecount>145468336</writecount>
  <keyerrors>0</keyerrors>
  <transporterrors>0</transporterrors>
  <clientthreads>8</clientthreads>
  <peakclientthreads>12</peakclientthreads>
  <driver_info><name>Run-time Installer</name><version>6.20.19037.1</version></driver_info>
  <driver_info><name>Run-time Package</name><version>6.20</version></driver_info>
  <driver_info><name>aksusb.sys</name><version>3.30</version></driver_info>
  <driver_info><name>akshhl.sys</name><version>1.20</version></driver_info>
  <driver_info><name>aksclass.sys</name><version>1.22</version></driver_info>
  <driver_info><name>akshasp.sys</name><version>4.25</version></driver_info>
  <driver_info><name>hardlock.sys</name><version>3.75</version></driver_info>
  <driver_info><name>fridge_lib</name><version>1.7</version></driver_info>
  <driver_info><name>aksfridge.sys</name><version>1.56.17430</version><details>1,1,0</details></driver_info>
 </license_manager>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve Sentinel License Manager Data in JSON Format

Method: AdminApi.adminGet

Action XML

<admin>
 <license_manager format="json">
  <element name="*" />
 </license_manager>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

/*JSON:diagnostics*/
{
"version":"13.00.Axel 14.06.2024 12:56",
"srvname":"P5Q",
"srvos":"Win32",
"srvguid":"kQvdEY1zRNl3IKXL/S7BwBa2WzFqMfmdfxdwUKkA",
"osname":"Windows 10 Enterprise",
"osver":"Build 19043,
"arch":"Intel64 Family 6 Model 165 Stepping 2",
"vm":"",
"ip4":"1",
"ip6":"1",
"localips":"192.168.56.1, 10.24.2.18, 192.168.98.1, 192.168.92.1, 192.168.1.18",
"uptime":"0 days 20 hours 5 minutes",
"uptimeseconds":"72305",
"tmpl":"",
"logincnt":"1",
"loginpeak":"1",
"sessioncnt":"2",
"sessionpeak":"2",
"loginreq":"2",
"localreq":"3",
"remotereq":"7977",
"requests":"7980",
"reads":"30710001",
"writes":"145470510",
"keyerr":"0",
"neterr":"0",
"thr":"8",
"peakthr":"12",
"drivers":"Run-time Installer|6.20.19037.1$Run-time Package|6.20$aksusb.sys|3.30$akshhl.sys|1.20$aksclass.sys|1.22$akshasp.sys|4.25$hardlock.sys|3.75$fridge_lib|1.7$aksfridge.sys|1.56.17430  (1,1,0)"
}
/*
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
*/

Return to Top

Retrieve Sentinel License Manager Configuration Data

Method: AdminApi.adminGet

Action XML

<?xml version="1.0" encoding="UTF-8" ?>
<admin>
  <config>
    <element name="*" />
  </config>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
<config>
  <friendlyname>TEST-PC</friendlyname>
  <ini_timestamp>1426599940</ini_timestamp>
  <accremote>1</accremote>
  <pagerefresh>3</pagerefresh>
  <linesperpage>20</linesperpage>
  <dolog>1</dolog>
  <access_log_maxsize>0</access_log_maxsize>
  <loglocal>1</loglocal>
  <logremote>0</logremote>
  <logadmin>0</logadmin>
  <doerrorlog>1</doerrorlog>
  <error_log_maxsize>0</error_log_maxsize>
  <rotatelogs>0</rotatelogs>
  <zip_logs_days>0</zip_logs_days>
  <delete_logs_days>0</delete_logs_days>
  <dopidfile>1</dopidfile>
  <passconfig>1</passconfig>
  <passacc>0</passacc>
  <user_restriction>allow=all@all</user_restriction>
  <accesstoremote>0</accesstoremote>
  <broadcastsearch>0</broadcastsearch>
  <aggressive>1</aggressive>
  <serveraddr>10.164.12.49</serveraddr>
  <accessfromremote>1</accessfromremote>
  <access_restriction>allow=all</access_restriction>
  <enabledetach>1</enabledetach>
  <commuter_delete_days>7</commuter_delete_days>
  <reservedseats>0</reservedseats>
  <reservedpercent>0</reservedpercent>
  <detachmaxdays>14</detachmaxdays>
  <upload_size_max>16777216</upload_size_max>
  <configdir>C:\Program Files (x86)\Common Files\Aladdin Shared\HASP\hasplm.ini</configdir>
  <cert_license_dir>C:\Program Files (x86)\Common Files\SafeNet Sentinel\Sentinel LDK\installed</cert_license_dir>
  <bind_local_only>0</bind_local_only>
  <has_ipv4>1</has_ipv4>
  <has_ipv6>1</has_ipv6>
  <disable_ipv4>0</disable_ipv4>
  <disable_ipv6>0</disable_ipv6>
  <download_url>www.safenet-inc.com/hasp/language_packs/end-user</download_url>
  <update_host>www3.safenet-inc.com</update_host>
  <language_url>/hasp/language_packs/end-user/</language_url>
  <getinfo_uncached>0</getinfo_uncached>
  <lm_port>1947</lm_port>
  <load_balancing>server</load_balancing>
  <no_auto_fwup>0</no_auto_fwup>
  <no_disk_write>0</no_disk_write>
  <disable_offline_detach>0</disable_offline_detach>
  <disable_disconnect>0</disable_disconnect>
  <ignore_unknown_options>0</ignore_unknown_options>
</config>
<admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
</admin_status>
</admin_response>

Return to Top

Retrieve the Session Count for a Key or Vendor

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <hasp><id>620581648416481534</id></hasp>
</haspscope>

Format XML

<admin>
 <hasp>
  <element name="sessioncount" />
 </hasp>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <hasp>
  <sessioncount>2</sessioncount>
 </hasp>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve Session-related Data from Sentinel License Manager

Method: AdminApi.adminGet

Scope XML

Not relevant

Format XML

<admin>
 <license_manager>
  <element name="logincount" />
  <element name="loginpeak" />
  <element name="sessioncount" />
  <element name="sessionpeak" />
 </license_manager>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <license_manager>
  <logincount>1</logincount>
  <loginpeak>1</loginpeak>
  <sessioncount>2</sessioncount>
  <sessionpeak>2</sessionpeak>
 </license_manager>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve List of Current Sessions for a Specific Key

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <hasp><id>620581648416481534</id></hasp>
</haspscope>

Format XML

<admin>
 <session>
  <element name="*" />
 </session>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <session>
  <index>1</index>
  <sessionid>0x00000001</sessionid>
  <sessionaccid>00000001</sessionaccid>
  <vendorid>37515</vendorid>
  <haspid>620581648416481534</haspid>
  <haspname>620581648416481534</haspname>
  <productid>0</productid>
  <productname></productname>
  <provider>Local</provider>
  <featureid>0</featureid>
  <featurename>Default Feature</featurename>
  <client>Local</client>
  <user>Axel</user>
  <screen>console</screen>
  <machine>p5q</machine>
  <processid>2112</processid>
  <logintime>Wed Jun 15, 09:03:32</logintime> <logintimeutc>Wed Jun 15, 2022 11:03:32</logintimeutc>
  <remainingtimetext>11:59:51</remainingtimetext>
  <lm_version>0</lm_version>
  <api_version>5.00</api_version>
  <disable_disconnect>0</disable_disconnect>
 </session>
 <session>
  <index>2</index>
  <sessionid>0x00000002</sessionid>
  <sessionaccid>00000002</sessionaccid>
  <vendorid>37515</vendorid>
  <haspid>620581648416481534</haspid>
  .
  .
  .
  <disable_disconnect>0</disable_disconnect>
 </session>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve Selected Session Data for All Keys for a Specific Vendor

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <vendor><id>37515</id></vendor>
</haspscope>

Format XML

<admin>
 <session>
  <element name="user" />
  <element name="machine" />   <element name="logintime" /> <element name="logintimeutc" />
 </session>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <session>
  <sessionid>0x00000001</sessionid>
  <user>Axel</user>
  <machine>p5q</machine>
  <logintime>Wed Jun 15, 09:03:32</logintime>
<logintimeutc>Wed Jun 15, 2022 11:03:32</logintimeutc>  </session>
 <session>
  <sessionid>0x00000002</sessionid>
  <user>Axel</user>
  <machine>p5q</machine>
  <logintime>Wed Jun 15, 09:03:33</logintime> <logintimeutc>Wed Jun 15, 2022 11:03:33</logintimeutc>  </session>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Delete a Licensing API Session With Admin API

Method: AdminApi.adminSet

Scope XML

Not relevant

Format XML

<admin>
 <deletesession>
  <sessionid>1</sessionid>
  <session id="2" />
 </deletesession>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve List of Detached Licenses

Method: AdminApi.adminGet

XML Code

<admin>
 <detached>
  <element name="*" />
 </detached>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
  <detached>
    <haspid>1108845069353997779</haspid>
    <vendorid>37515</vendorid>
    <productid>123</productid>
    <detachtime>1653893157</detachtime>    <detachtime_iso>Mon May 30, 2022 06:45:57</detachtime_iso>     <expiration>1316157818</expiration>
    <lmid>zA9h52agX6NDGNkKocOsmf6RdkSlSp671fY27NEA</lmid>
    <hostname>P5Q</hostname>
    <name>P5Q</name>
    <detachcomment>for Sarahs notebook</detachcomment>
  </detached>
  <admin_status>
    <code>0</code>
    <text>SNTL_ADMIN_STATUS_OK</text>
  </admin_status>
</admin_response>

Return to Top

Apply an H2R File

Method: AdminApi.adminSet

Action XML

file://test.h2r

Result

Status 0 SNTL_ADMIN_STATUS_OK

Status (Results)

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve Detach-related Configuration Settings

Method: AdminApi.adminGet

Scope XML

Not relevant

Format XML

<admin> 
 <config>
  <element name="enabledetach" />
  <element name="reservedseats" />
  <element name="reservedpercent" />
  <element name="detachmaxdays" />
 </config>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <config>
  <enabledetach>1</enabledetach>
  <reservedseats>0</reservedseats>
  <reservedpercent>0</reservedpercent>
  <detachmaxdays>14</detachmaxdays>
 </config>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Change a Configuration Setting to Enable Detach

Method: AdminApi.adminSet

Action XML

<config>
 <enabledetach>1</enabledetach>
 <writeconfig />
</config>

"<writeconfig />" writes the configuration setting changes to the appropriate .ini file. As a result, the changes are automatically reloaded at each start of License Manager or Runtimeless API application.

If "<writeconfig />" is not specified after a configuration setting change done by Admin API, the change is in effect only until the next restart of License Manager or Runtimeless API application.

Result

Status 0 SNTL_ADMIN_STATUS_OK

Status (Results)

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Return to Top

Retrieve Batch Code and Vendor Code for a Specific Sentinel Vendor Key ID

Method: AdminApi.adminGet

Scope XML

<haspscope>
 <hasp><id>591751104</id></hasp>
</haspscope>

Format XML

<admin>
  <hasp>
    <element name="haspid" />
    <element name="vendorname" />
    <element name="batchcode" />
    <element name="batchvendor" />
  </hasp>
</admin>

Result

Status 0 SNTL_ADMIN_STATUS_OK

Output

Sample output for a Sentinel Master key or Sentinel Developer key:

<?xml version="1.0" encoding="UTF-8"?>
<admin_response>
 <hasp>
  <haspid>591751104</haspid>
  <vendorname>Master</vendorname>
  <batchcode>DEMOMB</batchcode>
  <batchvendor>37517</batchvendor>
 </hasp>
 <admin_status>
  <code>0</code>
  <text>SNTL_ADMIN_STATUS_OK</text>
 </admin_status>
</admin_response>

Notes

For any other type of key, the <batchcode> tag returns a null value and the <batchvendor> tag returns "0".

The <batchcode> and <batchvendor> tags must be explicitly specified. They are not retrieved when you specify <element name=”*” />,

Return to Top

Related Topics

XML Tags for Admin API Methods

 Format XML Tags for Protection Keys

Changing Configuration Settings for Admin Control Center