Spectre Dimensioner - Proxy API
Some customers have complex network setups that prevent intranetwork communication between devices via use of local IP addresses. The proxy server provides a simple way to access any Cargo Spectre device without having to worry about local network configurations. This allows those users to use the same Proxy Dimensioner API without making requests from local IP addresses.
The proxy server URL is: https://proxy.spectre-licensing.com.
tip
If your local network configuration allows local network requests from one device to another, you do not need to use the Proxy API.
API Differences
Sending API requests via the proxy server is similar to the normal API and supports all commands, but with the following differences:
- Requests are sent to https://proxy.spectre-licensing.com/api instead of a given Spectre’s IP address.
- All requests must include a Basic Authorization Header. This documentation page provides a tool to do that here.
- Requests will also need to include the name of the machine to send the request to.
- When sending multiple commands in a single GET request, the commands must be separated by
%20
instead of+
. See example 3.
Examples
Example 1
A request to dimension using a Spectre device named “ATL Pallet Scanner” would look like this:
Endpoint
GEThttps://proxy.spectre-licensing.com/api/ATL%20Pallet%20Scanner/dimension
Header
Authorization Basic ZG9ja01hbmFnZXJAZmFrZUxvZ2lzdGljcy5jb206eW91clBhc3N3b3JkSGVyZQ==
note
Notice how:
- The machine name was URL encoded and spaces in the name were each converted to
%20
- The Authorization header was constructed by converting
dockManager@fakeLogistics.com:yourPasswordHere
tobase 64
. You can encode your own here.
Example 2
A POST request to dimension and then immediately snapshot using a Spectre named “Receiving Bay #3” would look like this:
Endpoint
POSThttps://proxy.spectre-licensing.com/api/Receiving%20Bay%20%233
Header
Authorization Basic ZG9ja01hbmFnZXJAZmFrZUxvZ2lzdGljcy5jb206eW91clBhc3N3b3JkSGVyZQ==
Body
<Requests>
<Dimension/>
<Snapshot/>
</Requests>
Example 3
A GET request to dimension and then immediately snapshot using a Spectre named “ORD3-Import-Bay” would look like this:
Endpoint
GETGET https://proxy.spectre-licensing.com/api/ORD3-Import-Bay/dimension%20snapshot
Header
Authorization Basic ZG9ja01hbmFnZXJAZmFrZUxvZ2lzdGljcy5jb206eW91clBhc3N3b3JkSGVyZQ==
Example 4
A request to download an image file named “color-image1.jpg” using a Spectre device named “LGB-Dock-5” would look like this:
Endpoint
GEThttps://proxy.spectre-licensing.com/api/LGB-Dock-5/file/color-image1.jpg3
Header
Authorization Basic ZG9ja01hbmFnZXJAZmFrZUxvZ2lzdGljcy5jb206eW91clBhc3N3b3JkSGVyZQ==