Skip to content
Athena User Guide
Esc
↑↓navigate↵open⌘Jpreview

Create a service; refused once the host is allocated or the network opens

POST/api/admin/services
Authorization
AuthorizationBearer token · headerrequired
Request body
requiredapplication/json
slugstringrequired
max length 32 · matches ^[a-z0-9][a-z0-9-]{0,31}$
namestringrequired
min length 1 · max length 64
descriptionstringrequired
max length 4000 · default: ""
imagestringrequired
min length 1 · max length 512
imageDigeststringrequired
matches ^sha256:[a-f0-9]{64}$
checkerImagestringrequired
min length 1 · max length 512
checkerImageDigeststringrequired
matches ^sha256:[a-f0-9]{64}$
portsobject[]required
min items 1 · max items 8
Show properties
Array of object
portintegerrequired
min 1 · max 65535
protocolstringrequired
default: "tcp"
Allowed:tcpudp
flagStoresintegerrequired
min 1 · max 8
checkerTimeoutSecondsinteger | nullrequired
default: null
Show properties
Any of:
integer
integer
null
null
Responses
200

Success

numbernumberrequired
checkerTimeoutSecondsnumber | nullrequired
Show properties
Any of:
number
number
null
null
idstringrequired
namestringrequired
descriptionstringrequired
slugstringrequired
imagestringrequired
imageDigeststringrequired
checkerImagestringrequired
checkerImageDigeststringrequired
portsobject[]required
Show properties
Array of object
portnumberrequired
protocolstringrequired
Show properties
Any of:
string
string
string
string
positionnumberrequired
createdAtstring<date-time>required
updatedAtstring<date-time>required
enabledbooleanrequired
createdBystring | nullrequired
Show properties
Any of:
string
string
null
null
pullUsernamestring | nullrequired
Show properties
Any of:
string
string
null
null
sourceFileIdstring | nullrequired
Show properties
Any of:
string
string
null
null
pullCredentialsSetbooleanrequired
401

Unauthorized

errorstringrequired
409

Response for status 409

errorstringrequired
422

Validation failed

typestringrequired
onstringrequired
summarystring
messagestring
foundany
propertystring
expectedstring
500

Unhandled server error

errorstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST '/api/admin/services' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "slug": "string",
  "name": "string",
  "description": "",
  "image": "string",
  "imageDigest": "string",
  "checkerImage": "string",
  "checkerImageDigest": "string",
  "ports": [
    {
      "port": 1,
      "protocol": "tcp"
    }
  ],
  "flagStores": 1,
  "checkerTimeoutSeconds": null
}'
Response
{
  "number": 0,
  "checkerTimeoutSeconds": 0,
  "id": "string",
  "name": "string",
  "description": "string",
  "slug": "string",
  "image": "string",
  "imageDigest": "string",
  "checkerImage": "string",
  "checkerImageDigest": "string",
  "ports": [
    {
      "port": 0,
      "protocol": "tcp"
    }
  ],
  "position": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "enabled": true,
  "createdBy": "string",
  "pullUsername": "string",
  "sourceFileId": "string",
  "pullCredentialsSet": true
}

Was this page helpful?