Skip to main content

SessionTokenAuthenticator

Authenticator for requests using the session token as an API key that's injected into the request.

  • type: object
  • required: ["type","login_requester","session_token_path","request_authentication"]

type​

  • Required: Yes
  • type: string
  • enum: ["SessionTokenAuthenticator"]

login_requester​

Description of the request to perform to obtain a session token to perform data requests. The response body is expected to be a JSON object with a session token property.

Examples:

type: HttpRequester
url_base: https://my_api.com
path: /login
authenticator:
type: BasicHttpAuthenticator
username: '{{ config.username }}'
password: '{{ config.password }}'

session_token_path​

The path in the response body returned from the login requester to the session token.

  • Required: Yes
  • type: array

Examples:

- access_token
- result
- token
  • items:

    • type: string

expiration_duration​

The duration in ISO 8601 duration notation after which the session token expires, starting from the time it was obtained. Omitting it will result in the session token being refreshed for every request.

  • PT1H: 1 hour
  • P1D: 1 day
  • P1W: 1 week
  • P1M: 1 month
  • P1Y: 1 year
  • Required: No
  • type: string

Examples:

PT1H
P1D

request_authentication​

Authentication method to use for requests sent to the API, specifying how to inject the session token.

decoder​

Component used to decode the response.

$parameters​

  • Required: No
  • type: object