10.1.2. How to Access the API

10.1.2.1. CURL calls and Examples

curl is the simplest command line tool to access the API.

Note that in the examples below, we use self signed certificates, which is why the --insecure or -k flag is passed to curl

Ping command

shell> curl --insecure  --location 'https://host1:8096/api/v8/ping'
{
    "payloadType": "PingPayload",
    "payloadVersion": "1",
    "payload": {
        "message": "Ping test",
        "date": "Mon Mar 10 10:12:18 UTC 2025",
        "hostName": "host1",
        "pid": 141172,
        "jvmUptime": 17972
    }
}

In this example, we sent a simple ping. Result comes as an HTTP OK response with a payload containing a string message “ping test”, the date of execution, the hostname of the executor and its pid, plus the number of milliseconds elapsed since the java executable was started

Create additional admin users

shell> curl -k --request POST --location 'https://host1:8096/api/v8/users?i-am-sure=true' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "payloadType": "credentials",
  "user":"tungsten2",
  "pass":"security2"
}'

Modify user password

shell> curl -k --request PUT --location 'https://host1:8096/api/v8/users?i-am-sure=true' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "value": "new-password"
}'

10.1.2.2. tapi

tapi is a convenient command line tool developed by Continuent that will ease access to Tungsten components APIs without having to remember full REST call URLs.

Note

tapi only supports APIv2 calls at present. Using APIv8 can be enabled by issuing the --apiver 8 option on all tapi calls, although at present this is only experimental.

Full documentation on tapi can be found here: Section 8.18, “The tapi Command”

10.1.2.3. External Tools

PostMan is one of the most popular GUI tools for REST API testing and use