Go to main content

Oracle I/O Domain Administration Guide

Exit Print View

Updated: September 2021
 
 

Get an Authentication Token

You can use any HTTPS capable communications interface to obtain a token and interface with the SuperCluster Virtual Assistant REST API. This can be: cURL, a browser, programming languages such as Python, Java, C, and so forth.

Access the REST API resources over HTTPS. Use your SuperCluster user name and password for authentication.

An authentication token is valid for 30 minutes.

  1. Get an authentication token.

    For example:

    $ echo $(curl -kX POST --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \ 
    -d '{
    "username":"user1", 
    "password":"password"
        }' \ 
    'https://myhost.us.example.com:13000/api/api-token-auth/')
    
    {"token":"cccccccc99bdc004f51338e6c38e636233333333"}

  2. Use the token for requests.

    For example:

    curl -X GET --header 'Accept: application/json' \
    --header 'Authorization: Token cccccccc99bdc004f51338e6c38e636233333333' \
    'https://myhost.uk.example.com:13000/api/deploymentgroup/'