API Keys

Create API Key

Create API keys for yourself.

post/_api/key

Request

Request body

keyidstring required

The id of the API key.

userstring

The user that owns the API key. The 'user' option should be used only when creating an API key that belongs to another user, and can be used only by service or _mm.root.

isSystemboolean

Indicates whether the key is a system API key.

Example request

{
  "keyid": "test1",
  "user": "tenant1.user1"
}

Response

Successfully added API key.

codeinteger

HTTP response code.

errorboolean required

Flag if there is an error in response. False for this response.

keystring

The generated key.

keyidstring

keyid of the key.

tenantstring

Name of the tenant.

userstring

Name of the user.

Example response

{
  "code": 201,
  "key": "test1.KqEsCra56Nr6qiBvDhIUr7Fiey9gxUHCdg8dLuY75rOSAQtMUdeh6Hf851kd6atM3ccf69",
  "keyid": "test1",
  "tenant": "_mm",
  "user": "root"
}

Changes

No recorded changes to this operation across all 1 revision of this API.