/v1/api/secrets/{id} (PATCH) - User Guide - BlueCat Edge

BlueCat Edge User Guide

ft:locale
en-US
Product name
BlueCat Edge

Updates the name or data of a secret.

Example text secret

PATCH https://api-<BlueCat.edge.url>/v1/api/secrets/{id}
Authorization: Bearer authorization token
Content-Type; Application/JSON
{
  "name": "new name",
  "data": "new data"
}
Body parameters
  • name—the updated name of the secret.
  • data—the updated data of the secret.
Note: You can omit the name or data field if you do not want to update that value.

Example certificate secret

PATCH https://api-<BlueCat.edge.url>/v1/api/secrets/{id}
Authorization: Bearer authorization token
Content-Type; Application/JSON
{
  "name": "new name",
  "data": {
      "certificate": "<JSON-escapted-pem-string>",
      "password": "<password-string>"
  }
}
Body parameters
  • name—the updated name of the secret.
  • data—the updated data of the secret. For certificates, enter the following additional fields:
    • certificate—the updated JSON-escaped PEM certificate contents
      Note: If you are uploading a certificate to use with DNS over HTTPS (DoH) or DNS over TLS (DoT) configurations, the following formats are supported for the certificate input data:
      • The certificate must be PEM-encoded DER format and contain a server certificate, optional intermediates, and private key
      • The PEM data of the certificate must not contain more than 10 intermediate certificates
      • The server and intermediate certificates must be X.509 format
      • The private key must be PKCS#8 encoded, and may be unencrypted or password encrypted
      • The following private key encryption algorithms are supported: AES128CBC, AES128GCM, AES192CBC, AES192GCM, AES256CBC, AES256GCM, and TripleDESCBC
      • The following private key signature algorithms are supported: RSA, ECDSA, and ED25519
    • password(Optional) the password that was used to encrypt the private key.
Note: You can omit the name or data field if you do not want to update that value.

Successful response

200 OK
Content-Type: Application/JSON
{
    "id": "<UUID of the secret>",
    "name": "<name of secret>",
    "type": "<TEXT | CERTIFICATE>",
    "secretsProfileId": <secrets profile ID>",
    "dateCreated": <epoch timestamp>,
    "dateNameLastModified": <epoch timestamp>,
    "dateDataLastModified": <epoch timestamp>,
    "dateLastDecrypted": <epoch timestamp>,
    "certificateMetadata": {
      "commonName": "<common name of certificate>",
      "issuer": "<name of certificate issuer>",
      "expiresAt": <epoch timestamp>
    }
}
Possible error codes:
  • BAD REQUEST - Invalid request or certificate and password failed validation
  • NOT FOUND - Secret can't be found
  • CONFLICT - A secret exists with that name