Update Root cert
Description
To update a root certificate, prepare the desired changes as a json string. Only rootCert and tags can be updated.This function is only available to administrators.
Request
POST /v1/root-certs/:certId
{
rootCert:string,
tags?: {
[key: string]: string
}
}
Response
Successful response contains the following JSON formated body:
{
certId: string,
rootCert: string,
tags: {
[key: string]: string
},
created: string
}
Response Status codes:
-
200 on success
-
404 if cert does not exist
-
403 if not administrator
Request headers
This request must have the following headers:
Authorization: bearer <ApiKey>
Content-Type: application/json
Example
Request
curl -XPOST "https://api.cloud.nabto.com/v1/root-certs/:certId" \
-H "Authorization: Bearer <ApiKey>" \
-H "Content-Type: application/json" \
-d '{ rootCert: "<rootCert>", tags: {"foo": "bar" }}'
Response
{
certId: "<certId>",
rootCert: "<rootCert>",
tags: {
"foo": "bar"
},
created: "2022-10-18T10:17:24.299Z"
}