Connecting to the TS7785 API
The TS7785 REST model Application Programming Interface (API) consists of commands that are used to read system resources. The RESTful API uses HTTPS (Hypertext Transfer Protocol Secure) to provide an encrypted channel between the client and the server. You must create a token for authentication.
You must create a token for authentication.
The URL structure for an operation is
https://ip_address/api/command
ip_addressis the IP address of the TS7785 storage system.apiis the API application name.commandis the resource that is targeted for the operation.
Creating a token using Curl
You must create a token using POST method before other RESTful API operations can be initiated. It fulfills all security requirements of the RESTful API.
The following example shows how to use CURL for authentication.
curl -k --request POST 'https://ip_address/api/token' --data-raw '{"username":"enter_username","password":"enter_password"}'
This yields an authentication token that you use for all other commands. The response is formatted for clarity.
Header:
“X-Auth-Token: eyJ0eXAiOi…“
“metadata": {
"responseSent": "2025-06-06T13:31:08",
"request": "POST https://abc123.tuc.stglabs.ibm.com/api/token",
"resources": 1,
"version": “1.00”,
"requestReceived": "2025-06-06T13:31:08"
},
“data”: [
{
“username“: “XXXXX“,
“policyName“: “Local“,
“policyType“: “Local“,
“expiresAt“: “2025-06-13T19:41:26“,
“issuedAt“: “2025-06-13T18:41:26“
}
Renewing a token using Curl
You can also use POST method to renew a token. The renewed token builds upon a non-expired, previously retrieved token. NO username or password is required (No parameter is needed).
curl -k --request POST -H "Authorization: Bearer eyJraWQiOiJwM0p..." 'https://ip_address/api/token'
Content type
TS7785 RESTful API supports JSON responses only.
- Supported media type:
application/json