Creating service accounts

A quick guide on how to create a Service Account for our REST API.

Overview

We will here create a new a new Service Account using either the web application or our REST API.

Prerequisites

In order to create the initial service account, the logged in user needs to have a role of Admin.

Create using app

The first service account needs to be created using our App. Whereas subsequent accounts may be created using the REST API.

  1. Click Add

  2. Give the account a meaningful name and decide whether you want to enable Basic Auth

  3. Click Save

  4. Add 1 or more service account keys that may be used for Authentication

  5. Copy the details.

The shown secret will not be shown again.

Dialog showing the created key information

Create using REST API

Service accounts may be created, and keys may be rotated deleted using the REST API shown below. See our API reference for more operations

Create a new serviceAccount

post

Creates a new serviceAccount and sends an email confirmation request to the supplied email.

Authorizations
Query parameters
orgIdstringOptional

Pin to organization.Organization.id

Body
enableBasicAuthbooleanOptional

Whether Basic Auth can be used with this service account

Example: true
namestringRequired

Name of the serviceAccount

Example: John Doe
Responses
201
ServiceAccount created
application/json
post
POST /api/service-account/v1/service-account HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "enableBasicAuth": true,
  "name": "John Doe"
}
{
  "created": 1636044728,
  "enableBasicAuth": true,
  "id": "1235",
  "keys": [
    {
      "created": 1636044728,
      "keyId": "1235"
    }
  ],
  "name": "John Doe"
}

Delete a serviceAccount

delete
Authorizations
Path parameters
idstringRequired

ServiceAccount id

Query parameters
orgIdstringOptional

Pin to organization.Organization.id

Responses
204
ServiceAccount deleted
delete
DELETE /api/service-account/v1/service-account/{id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*

No content

Create a new serviceAccount key

post

Creates a new serviceAccount key

Authorizations
Path parameters
idstringRequired

ServiceAccount id

Query parameters
orgIdstringOptional

Pin to organization.Organization.id

Body
objectOptional
Responses
201
ServiceAccount key created
application/json
post
POST /api/service-account/v1/service-account/{id}/key HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
{
  "created": 1636044728,
  "keyId": "1235",
  "secret": "secret-key"
}

Delete a serviceAccount key

delete
Authorizations
Path parameters
idstringRequired

ServiceAccount id

key-idstringRequired

The id of the key to delete

Query parameters
orgIdstringOptional

Pin to organization.Organization.id

Responses
204
ServiceAccount key deleted
delete
DELETE /api/service-account/v1/service-account/{id}/key/{key-id} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*

No content

Last updated