Modify Product

Description

Modify WebRTC Product. Only Administrators can modify the expired field

expiresAt is deprecated. It is accepted in the request body and ignored, and is always reported as null. Products and domains no longer expire.

Request

POST /v1/webrtc/products/:productId
{
  name?: string|null,
  expiresAt?: string|null,
  expired?: boolean,
  tags?: {
    [key: string]: string
  }
}

Response

Successful response contains the following JSON formated body:

{
   productId: string,
  organizationId: string,
  region: string,
  name: string|null,
  created: string,
  tags: {
    [key: string]: string
  },
  expired: boolean,
  expiresAt: string|null,
  configuredDevices: number,
  publicKeys: {
    id: string,
    key: string
  }[] 
}

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/webrtc/products/:productId" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>" \
  -H "Content-Type: application/json" \
  -d '{ "name": "friendly name", "expiresAt": "2022-10-18T10:17:24.299Z", "expired": true, "tags": {"foo": "bar" }}'

Response

{
   "productId": "pr-abcdefgh",
  "organizationId": "or-lmnopqrs",
  "region": "<region>",
  "name": "friendly name",
  "created": "2022-10-18T10:17:24.299Z",
  "tags": {
    "foo": "bar" 
  },
  "expired": true,
  "expiresAt": "2022-10-18T10:17:24.299Z",
  "configuredDevices": 42,
  "publicKeys": [{
     "id": "<id>",
    "key": "<key>" 
  }
   ,
  ...],
  
}