Create Service

Description

Create a new Nabto Edge Service.

Request

POST /v1/n5/services

Response

Successful response contains the following JSON formated body:

{
   serviceId: string,
  organizationId: string,
  name: string|null,
  httpUrl: string|null,
  httpUser: string|null,
  httpPass: string|null,
  tags: {
    [key: string]: string
  },
  created: string
}

Response Status codes:

  • 200 on success

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>
  • X-Nabto-Organization: <organizationId>

Example

Request

curl -XPOST "https://api.cloud.nabto.com/v1/n5/services" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>"

Response

{
   "serviceId": "se-xyabzwcd",
  "organizationId": "or-lmnopqrs",
  "name": "friendly name",
  "httpUrl": "<httpUrl>",
  "httpUser": "<httpUser>",
  "httpPass": "<httpPass>",
  "tags": {
    "foo": "bar" 
  },
  "created": "2022-10-18T10:17:24.299Z"
}