Service Users

Issue a Service User token

Requests a Service User token from the platform. Most API calls require an HTTP Authorization header with a value of Bearer ${AUTH_TOKEN}. To retrieve an auth token, you need to create a Service User and API key, then pass the API key information to this endpoint. Auth tokens may expire at any time, so code that uses them should be prepared to handle a 401 response code by creating a new auth token. By design, this operation does not require a authorization token.

Request
path Parameters
team_name
required
string

The name of your Team

Request Body schema: application/json
required
key_id
required
string <regex> ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-...

The ID of the API key

key_secret
required
string [ 1 .. 512 ] characters

The secret associated with the API key

Responses
200

OK

post/v1/teams/{team_name}/service_token
Request samples
application/json
{
  • "key_id": "6052868b-1b04-4a14-8288-e6496d7f2f4b",
  • "key_secret": "uF0SoVBVQP/hJmQSLUZdM2a7ArYzjD8ykzvG7n4tKaOEfSErcwMUUDWpEf4Q42/HaVKPZUfILkzy/bsQFv7WRg=="
}
Response samples
application/json
{
  • "bearer_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImI4YTAzODA0MTM0NjctNGU5OC04ZDU2LTAxNDRlNGNkMGViMCIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NzY4MTE1OTAsImlzcyI6InNjYWxlZnQuYXV0aC50b2tlbiIsImp0aSI6IjA0YjRhNTE4LWU5YzYtNDc1My05YWY4LThlOTAwNjVjNjX5YSIsInJvbGVzIjp7IjE0NzY4MTE1OTAiOm51bGx9LCJ0ZWFtIjoic2NhbGVmdCIsInVzZXIiOiJyb2JvdF9ydXNzZWxsIn0.pHuv06Q1-sKjHrGXUzQi-uM7AAG3K1Q6rpuxycR2Py6QHwLrto1uZmZt4wrBo6tQRCl3RjHBKGcDmEfBZ6_gFnckpFMkIXUT3sIDmOvSACthgprcXjfYh0KarEDmDnIMsEPl7FVhl4N_I0yLK9O5XSS07AvAc-7RRD8udpo7inIDTRCCEvoJ16osgL1IzoDvc7ZPDj8-xhJ_kAsKc-vJ5WYKLAlCFx_fixayM43Apg2TySNE5nSeJFCa02F4ViZleY7K2l4h_p143DzVZjWEBeKmyQVRXhbZzL6HwONQckhgp_LHuSrP_sOtVc7BrFwmZq2NZtXEOWyQWfJ4Yp0qg8NzV2LhKLc4LncpQuagf8OA8jyEeQwbu3Rq9zp0y-FodMg64qfWcPSu53HiwYC9dvgw5zhXa8zuZRcPMO_orCPVYnmO761xAfsp-P8aJJZDqpxlzKA0s-ClRsgunC5C9Xq5snIq-f4hT45u8ldBfAr6dLkDO8BdPMTzufH52bTWX3iJ1ipW1YqMefJhPMzBHLwnJ3SYWN7WTEuRyoC6ndQ60PcEzsPJYAO5MxdY4WsnYOqv3aIryuTlwW3K0dNqcvBSirgxv5X7AvidO-JQLSXXrY134BxgyLBze7FwVYwH7ZhzBdX-DwsUwQsJ7R0mRWxpNnhGu7NjkbB0-QJs",
  • "expires_at": "2016-10-18T17:26:30Z",
  • "team_name": "scaleft"
}

List all Service Users for a Team
Admin roles:
  • access_admin

Lists all Service Users for your Team

SecuritybearerAuth
Request
path Parameters
team_name
required
string

The name of your Team

query Parameters
offset
string

The UUID of an object used as an offset for pagination

count
integer <int32>

Controls the number of objects listed per page

descending
boolean

If 'true', the most recent results are listed first

prev
boolean

Controls the direction of paging

starts_with
string

Includes ASA Users with name that begins with the value

status
string

Includes ASA Users with specified statuses. Valid statuses: 'ACTIVE', 'DISABLED', and 'DELETED'.

contains
string

Includes ASA Users with name that contains the value

include_service_users
string

Include Service Users in the results

id
string

Include only users with the given IDs

Responses
200

OK

get/v1/teams/{team_name}/service_users
Request samples
Response samples
application/json
{
  • "list": [
    • {
      },
    • {
      }
    ]
}

Create a Service User
Admin roles:
  • access_admin

Creates a Service User that can be used to automate interaction with the Advanced Server Access API

SecuritybearerAuth
Request
path Parameters
team_name
required
string

The name of your Team

Request Body schema: application/json
required
name
required
string <regex> [ 1 .. 255 ] characters (^[\w\-_.]+$)|((?i)^[A-Z0-9._%+-^]+@[A-Z0-9.-...

The name of the Service User

Responses
201

Created

post/v1/teams/{team_name}/service_users
Request samples
application/json
{
  • "name": "shreve"
}
Response samples
application/json
{
  • "deleted_at": null,
  • "details": null,
  • "id": "aa225c16-af6e-4ab4-9150-456fd472e2d7",
  • "name": "shreve",
  • "status": "ACTIVE",
  • "team_name": "william-faulkner",
  • "user_type": "service"
}

Retrieve a Service User
Admin roles:
  • access_admin

Retrieve a specified Service User

SecuritybearerAuth
Request
path Parameters
team_name
required
string

The name of your Team

user_name
required
string

The relevant username

Responses
200

OK

get/v1/teams/{team_name}/service_users/{user_name}
Request samples
Response samples
application/json
{
  • "deleted_at": null,
  • "details": null,
  • "id": "6b69de4e-90be-4016-9085-d54bf5815da1",
  • "name": "dilsey.gibson",
  • "status": "ACTIVE",
  • "team_name": "william-faulkner",
  • "user_type": "service"
}

Update a Service User
Admin roles:
  • access_admin

Updates a specified Service User

SecuritybearerAuth
Request
path Parameters
team_name
required
string

The name of your Team

user_name
required
string

The relevant username

Request Body schema: application/json
required
object or null

The details of the User

email
string or null <regex> [ 1 .. 255 ] characters ^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9]...
first_name
string or null [ 1 .. 255 ] characters
full_name
string or null [ 1 .. 512 ] characters
last_name
string or null [ 1 .. 255 ] characters
name
required
string [ 1 .. 255 ] characters

The username of the User

status
required
string

The status of the User: ACTIVE, DISABLED, or DELETED. Users can't disable or delete their own account.

Responses
200

OK

put/v1/teams/{team_name}/service_users/{user_name}
Request samples
application/json
{
  • "deleted_at": null,
  • "details": null,
  • "id": "6b69de4e-90be-4016-9085-d54bf5815da1",
  • "name": "dilsey.gibson",
  • "status": "DISABLED",
  • "team_name": "william-faulkner",
  • "user_type": "service"
}
Response samples
application/json
{
  • "deleted_at": null,
  • "details": null,
  • "id": "6b69de4e-90be-4016-9085-d54bf5815da1",
  • "name": "dilsey.gibson",
  • "status": "DISABLED",
  • "team_name": "william-faulkner",
  • "user_type": "service"
}

List all API keys
Admin roles:
  • access_admin

Lists all API keys for a specified Service User. This doesn't return the corresponding secret for each API key.

SecuritybearerAuth
Request
path Parameters
team_name
required
string

The name of your Team

user_name
required
string

The relevant username

Responses
200

OK

get/v1/teams/{team_name}/service_users/{user_name}/keys
Request samples
Response samples
application/json
{
  • "list": [
    • {
      },
    • {
      }
    ]
}

Rotate all API keys
Admin roles:
  • access_admin

Rotates all API keys for a specified Service User. This also sets an expiration date for the existing API keys.

SecuritybearerAuth
Request
path Parameters
team_name
required
string

The name of your Team

user_name
required
string

The relevant username

Responses
200

OK

post/v1/teams/{team_name}/service_users/{user_name}/keys
Request samples
Response samples
application/json
{
  • "expires_at": "0001-01-01T00:00:00Z",
  • "id": "ba7ffbe9-c8e4-45c9-bc07-45729711c952",
  • "issued_at": "2020-04-07T00:00:00Z",
  • "last_used": null,
  • "secret": "NOvsvBg0g9mFXdHbLxEJcEFpu+LZjQSKsYezqMALq5WbGZTpUsxoS4vBqqHOO9O3xrhOq03B+oLf7bSTShbudw=="
}

Delete an API key
Admin roles:
  • access_admin

Deletes an API key for a Service User. The Service User can no longer authenticate with this API key.

SecuritybearerAuth
Request
path Parameters
team_name
required
string

The name of your Team

user_name
required
string

The relevant username

key_id
required
string

The UUID of the Service User key

Responses
204

No Content

delete/v1/teams/{team_name}/service_users/{user_name}/keys/{key_id}
Request samples