SignalFx Developers Guide

Developer Home

Product Docs

SignalFx

Session Tokens API

API for creating and deleting session tokens (referred to as User API Access Tokens in the web UI).
Note: This API doesn't handle access tokens (org tokens). To manage access tokens, use the Org Token API.

Delete Session Token

Invalidates an existing session token

Invalidates an existing session token (referred to as an User API Access Tokenin the web UI). If the invalidation succeeds, you receive the HTTP status code '204'. This means that the API successfully processed the request, but it won't return headers or a response body.
Note: You can't use this API to delete an org token (referred to as an access token in the web UI.)

header Parameters
Content-Type
required
string

Format of the request payload. The only allowed value is application/json.

X-SF-TOKEN
required
string

The SignalFx session token (User API Access Token) you want to delete

Responses

Response Schema: application/json
code
integer

HTTP response code. Always set to "404"

message
any

Error cause. Always set to "Session not found"

Response samples

Content type
application/json
{
  • "code": 404,
  • "message": "Session not found"
}

Create Session Token

Creates a session token

Creates a session token (referred to as an User API Access Token in the web UI) that provides authentication for other SignalFx API calls.
Note: You can't use a session token for authenticating a /datapoint, /backfill, or /event API call. These APIs require an org token (referred to as an access token in the web UI.)

header Parameters
Content-Type
required
string

Format of the request body. Always "application/json".

X-SF-Token
required
string

Authentication token

Request Body schema: application/json

Create session token request body

email
required
string <email> (SignalFx user email address)

The email address you used to join the organization for which you want a session token.
NOTE: This has to be the email address that SignalFx used to invite you to the organization. If you're using an external protocol such as SAML or LDAP to connect to SignalFx, you can't use that protocol's credentials.

password
required
string <password> (SignalFx user password)

The password you provided to SignalFx when you accepted an invitation to join an organization. If you're using an external protocol such as SAML or LDAP to connect to SignalFx, you can't use that protocol's credentials.

Responses

Response Schema: application/json
accessToken
string (The session token returned by the API)

A session token (**User API Access Token) generated by the API. This token remains valid for 30 days.

createdBy
string (User ID of the token creator)

The internal user ID of the user who created the token.

createdMs
integer <int64> (When created)

The date and time that the token was created, in Unix time This property is set by the system, and you can't change it.

disabled
boolean (Disabled token indicator)

Indicates if the token is disabled or not. When you first create a token, the value of disabled is false.

email
string (Email address of the token creator)

The email address submitted in the request to create the token

expiryMs
integer <int64> (Token expiration timestamp)

The date and time that the token will expire, in Unix time

id
string (Token ID)

The SignalFx identifier of this access token

organizationId
string (Organization ID)

The SignalFx identifier of the organization that the user belongs to

sessionType
string (Session type)

Always set to ORG_USER

updatedBy
string (User who updated the token)

For a successful "create token" request, this value is null.

updatedMs
integer <int64> (Token updated timestamp)

The date and time that the token was updated, in Unix time For a successful "create token" request, this value is the same as that for createdMs. This value is set by the system, and you can't change it.

userId
string (SignalFx user ID of the user that created the token)

The SignalFx identifier of the user who created the token

username
string (SignalFx user name of the user that created the token)

Always null

Response Schema: application/json
message
string (Error message)

The error message associated with the HTTP status code. The API always returns The email/password combination was entered incorrectly. Please try again."

status
integer (HTTP status code)

The numeric HTTP status code for this response. The API always returns 401 for a failed create token request.

type
string (The type of response)

The type of response that this response body represents. Always set to "error".

Request samples

Content type
application/json

Contains the email and password of a user who has authorization to create session tokens.

{
  • "email": "edickinson@example.com",
  • "password": "DontUseThisPassword"
}

Response samples

Content type
application/json
{
  • "accessToken": "<USER-API-ACCESS-TOKEN>",
  • "createdBy": "CkClZUKAIAQ",
  • "createdMs": 1549963264000,
  • "disabled": false,
  • "email": "user@organization.com",
  • "expiryMs": 1561886464000,
  • "id": "CkSfGddAAAg",
  • "organizationId": "CMtLSYXAEJQ",
  • "sessionType": "ORG_USER",
  • "updatedBy": null,
  • "updatedMs": 1556702464000,
  • "userId": "CkClZUKAIAQ",
  • "userName": null
}

© Copyright 2020 Splunk, Inc.

Third-party license information