Bulk set device public keys
Description
Set public keys for a list of devices. Request object takes an array of device objects with deviceIDs and public keys. Any additional fields are ignored. This means the array returned when listing devices can be modified with public keys and reupload here. The public keys provided are added their device, any preexisting public keys are not removed.
Request
POST /v1/webrtc/products/:productId/device-keys
{
deviceId: string,
publicKey: string
}[]
Response
Response Status codes:
- 204 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/device-keys" \
-H "Authorization: Bearer <ApiKey>" \
-H "X-Nabto-Organization: <OrganizationId>" \
-H "Content-Type: application/json" \
-d '[{ "deviceId": "a.mydomain.example.net", "publicKey": "<publicKey>"}, ...]'
Response
Returns response Code: 204