Retrieving Anchor Coordinates Using Postman
Use Postman to obtain Anchor coordinates from a calibrated system.
Getting Started
To begin, ensure that Postman is installed and that you have connected to the ZeroKey API.
Obtaining the Bearer Token
Once connected to the ZeroKey API, you can proceed to the following steps to obtain the bearer token.
Navigate to the Core System folder and open the Authentication subfolder, as shown below.
Under the Authentication subfolder, click Get OAuth2 Token.
Click the Send button on the top right-hand side. This will send a request to get
"access_token"
. After the request is sent, you should see the following:
Copy the access token. In the example above, the following value should be copied:
8NUA4hvKp0Mpn+eDPHUcRzlrVKy6HMG6UMIfEYIMULs=
Receiving the API’s Output
To get Anchor coordinates, navigate to the Hardware Abstraction Layer folder. Under the Device Information subfolder, click Get Devices, as shown below.
In the main window, click the Authorization tab. Click the dropdown menu under Auth Type, select Bearer Token, and paste the code that you copied in the entry field beside Token. For example:
Lastly, click the Send button on the right-hand side. You will now be able to see the output of the system obtained from the API. The following is an example of what this may look like:
{
"DeviceID": "D4:3A:C1:87:14:02",
"Position": [
1.116614,
-1.877612,
2.5513
],
"Orientation": [
1.0,
0.0,
0.0,
0.0
],
"DeviceFlags": 0,
"AlertState": "Off",
"FirmwareHash": null,
"FirmwareVersion": null,
"DeviceType": "anchor",
"LastUpdateTime": "2024-05-17T19:55:32.4876",
"UpdateRate": 0,
"BatteryLevel": null,
"LastGatewaySource": "ZK://0::379ec3df-ed1c-4860-ade0-ac28c168f7d3::USB::/dev/ttyACM0",
"Provisioning": null,
"IsDeleted": false,
"HardwareVersion": 0,
"HardwareType": 0,
"Velocity": [
0.0,
0.0,
0.0
],
"InsState": 0,
"UsState": 0
},
Navigating to the Anchor Coordinate Values
The Anchor coordinates in the example above are located under the line "Position": [
and are displayed as the following:
1.116614,
-1.877612,
2.5513
For reference, the values in the first, second, and third lines indicate the X, Y, and Z positions of the Anchors, respectively.