Integration Reference
Integrating With Cargo Spectre
Some customers need to integrate their Cargo Spectre machines with proprietary software. We offer three different ways to transfer API calls to individual Spectre machines - choose the one that works best for your business! For information on our API, please visit our API documentation.
Local Connections
Pros - Information stays local, does not depend on internet bandwidth, and is generally the most responsive.
Cons - Clients must be on the same network as Spectres, Spectre local IP addresses must be known, and intranet traffic must be enabled on the network. The spectre machines respond to HTTP commands on their local IP address. For example, let’s say a Spectre's local IP address is 127.0.0.1 and the software port is the default 7100. A computer on the same network can use a simple browser to request a dimension by going to the URL “http://127.0.0.1:7100/dimension”.
The only complication is knowing what the Spectre local IP addresses are. Some clients statically assign the IP address on their network and build a list locally.
Alternatively, you can query our licensing server. When the Spectre checks out a license, it registers the following information:
- Local IP address
- Port
- Machine Name with the server
This information can be queried by API to get a directory list of Spectres for a set of license credentials. Using the license server API, the process would look like this:
- User wants a Spectre to dimension.
- Client software queries our server for Spectres under their license.
Global Connections
(not recommended due to common IT complications)
Pros - API can be accessed from anywhere, not just the local network
Cons - Requires an individual port forward on routers for each Spectre machine
While the data path is very different, the access is incredibly similar. First, the network router must have a port forwarded to the machine. Then, to access that machine, you can use the global IP address and port combination just like in the Local Connections section. The only catch is that the registered global IP address on our licensing server is generally not accurate due to most client's network configurations. This should be done only on very simple networks, or when using mobile data.
Gateway Proxy
Pros - API can be accessed from anywhere, requires minimal IT setup
Cons - Uses a middle-man to route API calls and responses through the internet
In the Spectre settings, there is an option to enable our proxy support. On startup, this opens a 2-way socket with our proxy server and awaits commands. All clients can direct their API calls to this singular endpoint. API calls additionally require licensing credentials and target Spectre information (i.e. Machine Name) to route the request to the correct machine. All traffic is encrypted with HTTPS or secure sockets. Using the Gateway Proxy looks like this:
- User wants a Spectre to dimension.
- Client software sends API request to Gateway Proxy. Included in the headers of the request are licensing credentials and Machine Name.
- Proxy server looks at machines associated with that license, and looks for a socket associated with that Machine Name. If found, API is forwarded through that socket.
- Spectre fulfills API request and responds to the Proxy.
- Proxy forwards response to client.
For examples on how to send API requests to the Proxy Server, please visit our API Reference page.