API Keys

Create an API key with a random value (admin only, not with a read-only API key). Get the key value with the GET method. Without skip_ip_check at least one IP/network in allow_from is required.

post/api/v1/add/api-key

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    API key in header X-API-Key

Request body

descriptionstring

free text, max. 255 characters

access'ro' | 'rw'

ro (read-only, GET endpoints only) or rw (read-write), required

allow_fromstring

IPs/CIDR networks the key may be used from, separated by commas, spaces or newlines (or an array)

skip_ip_checkboolean

allow the key from any IP

activeboolean

is key active or not

Example request

{
  "description": "provisioning",
  "access": "rw",
  "allow_from": "192.0.2.10, 2001:db8::/64",
  "skip_ip_check": "0",
  "active": "1"
}

Response

OK

type'success' | 'danger' | 'error'

Changes