Modify Domain

Description

Only tags, deleted and expiry can be changed with this request. Most relevant modifications to domains are done through the /keys endpoint. Only administrators are allowed to set expiresAt.

Request

POST /v1/domains/:domain
{
  tags?: {
    [key: string]: string
  },
  deleted?: boolean,
  expiresAt?: string|null
}

Response

Successful response contains the following JSON formated body:

{
  domain: string,
  organizationId: string,
  tags: {
    [key: string]: string
  },
  allowSelfSigned: boolean,
  created: string,
  currentBatchId: number,
  expiresAt: string,
  deleted: boolean
}

Response Status codes:

  • 200 on success

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>
  • X-Nabto-Organization: <organizationId>
  • Content-Type: application/json

Example

Request

curl -XPOST "https://api.cloud.nabto.com/v1/domains/:domain" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>" \
  -H "Content-Type: application/json" \
  -d '{ "tags": {"foo": "bar" }, "deleted": true, "expiresAt": "2022-10-18T10:17:24.299Z"}'

Response

{
   "domain": "mydomain.example.net",
  "organizationId": "or-lmnopqrs",
  "tags": {
    "foo": "bar" 
  },
  "allowSelfSigned": true,
  "created": "2022-10-18T10:17:24.299Z",
  "currentBatchId": 42,
  "expiresAt": "2022-10-18T10:17:24.299Z",
  "deleted": true
}