Cray STS Token Generator v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

Authentication

  • HTTP Authentication, scheme: bearer

Default

sts.routes.put_token

Code samples

PUT https://api-gw-service-nmn.local/apis/sts/token HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X PUT https://api-gw-service-nmn.local/apis/sts/token \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gw-service-nmn.local/apis/sts/token', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gw-service-nmn.local/apis/sts/token", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /token

Generate STS token

Generates a STS Token.

Example responses

201 Response

{
  "Credentials": {
    "EndpointURL": "http://foo.bar:8080",
    "AccessKeyId": "foo",
    "SecretAccessKey": "bar",
    "SessionToken": "baz",
    "Expiration": "2019-09-24T02:17:51.739673+00:00"
  }
}

Responses

Status Meaning Description Schema
201 Created A generated STS Token Token
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

cli_ignore

sts.routes.get_healthz

Code samples

GET https://api-gw-service-nmn.local/apis/sts/healthz HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/sts/healthz \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/sts/healthz', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/sts/healthz", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /healthz

Return health status

Return health status

Example responses

200 Response

{
  "Status": "ok"
}

Responses

Status Meaning Description Schema
200 OK Everything is ok Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» Status string false read-only none
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

Schemas

Token

{
  "Credentials": {
    "EndpointURL": "http://foo.bar:8080",
    "AccessKeyId": "foo",
    "SecretAccessKey": "bar",
    "SessionToken": "baz",
    "Expiration": "2019-09-24T02:17:51.739673+00:00"
  }
}

Properties

Name Type Required Restrictions Description
Credentials object false none none
» EndpointURL string false read-only none
» AccessKeyId string false read-only none
» SecretAccessKey string false read-only none
» SessionToken string false read-only none
» Expiration string false read-only none