Create GSP cert

Description

Create new GSP cert.This request creates a gsp certificate if it does not already exists. If it does exists it is replaced with the new certificate. The certificate can be prepared as a json string with newlines with the following command: awk '$1=$1' ORS='\\n'

Alternatively prepare a cert.json file it makes the command simpler since the certificates can be tricky on the command line. curl -XPUT "https://api.cloud.nabto.com/v1/gsp-certs/:domain" \ -H "Authorization: Bearer apikey" \ -H "Content-Type: application/json" \ -d @cert.json

This function is only available to administrators.

Request

PUT /v1/gsp-certs/:domain
{
  gspCert:string,
  gspKey: string,
  tags?: {
    [key: string]: string
  }
}

Response

Successful response contains the following JSON formated body:

{
  domain: string,
  gspCert: string,
  tags: {
    [key: string]: string
  },
  created: string
}

Response Status codes:

  • 200 on success

  • 403 if not administrator

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>
  • Content-Type: application/json

Example

Request

curl -XPUT "https://api.cloud.nabto.com/v1/gsp-certs/:domain" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "Content-Type: application/json" \
  -d '{ gspCert: "<gspCert>", gspKey: "<gspKey>", tags: {"foo": "bar" }}'

Response

{
   domain: "mydomain.example.net",
  gspCert: "<gspCert>",
  tags: {
    "foo": "bar" 
  },
  created: "2022-10-18T10:17:24.299Z"
}