v1

latestOpenAPI 3.0.0Apache 2.02026-07-17143274803.9 KB
auth

Create token

Create token

post/api/v1/tokens

Request body

namestring
virtualUserstring
expiresAtstring date-time nullable

Example request

{
  "virtualUser": "banzaicloud/pipeline",
  "name": "my API token",
  "expiresAt": "2018-03-09T13:24:49+01:00"
}

Response

Token created successfully

idstring required
tokenstring required
namestring required

Example response

{
  "name": "my API token",
  "id": "f24c74d7-53f3-4d78-b3d4-f23f89e81bec",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL3BpcGVsaW5lLmJhbnphaWNsb3VkLmNvbSIsImp0aSI6ImYyNGM3NGQ3LTUzZjMtNGQ3OC1iM2Q0LWYyM2Y4OWU4MWJlYyIsImlhdCI6MTUyNzg0NTQ1OCwiaXNzIjoiaHR0cHM6Ly9iYW56YWljbG91ZC5jb20vIiwic3ViIjoiMSIsInNjb3BlIjoiYXBpOmludm9rZSIsInR5cGUiOiJ1c2VyIiwidGV4dCI6ImJvbmlmYWlkbyJ9.DMQcM0De3A_R1JOPDGqharh9NIjz-uBFeJgiq5JSej0"
}