Ana içeriğe atla

Endpoint

Authentication

Requires a Personal API Access Token.

Request

Headers

Path Parameters

Query Parameters

Request Body

The request body should contain a KeyUpdateDTO object with the following structure:

Request Body Fields

Key Environment Object

Notes

  • Request Format: This API uses application/json content type. Key content must be base64-encoded and included in the JSON body (not uploaded as a file).
  • All fields are optional - only provided fields will be updated
  • name can be changed, but must remain unique within the project
  • environmentName is used to identify the environment (not environmentId)
  • Key content must be base64-encoded if provided

Response

Same as Create Key response format.

cURL Example

Example 1: Update Key with JWK Updates

Example 2: Update Key and Clear JWK References

Example 3: Update Key Name Only

Notes and Warnings

  • Key Name:
    • Can be changed during update
    • New name must be unique within the project
    • If name is changed, the key will be accessible by the new name
  • Referenced JWKs:
    • If jwkUpdateAction=UPDATE, JWKs created from this key will be re-parsed and updated
    • If jwkUpdateAction=NULLIFY or not provided (default), JWK references will be cleared
    • updateScope determines which JWKs to update when jwkUpdateAction=UPDATE: SAME_PROJECT or ALL_PROJECTS
    • Default behavior (NULLIFY) ensures JWKs don’t reference deleted or updated keys
  • Environment Name:
    • Use environmentName (not environmentId) to specify the environment
    • Environment name must exist and be accessible
  • Partial Updates:
    • Only provided fields will be updated
    • Omitted fields will remain unchanged
  • Automatic Deployment:
    • Key is automatically deployed to all specified environments after update
    • Deployment results are returned in the response

Permissions

User must have SECRETS + MANAGE permission in the project. For deployment operations (when deploying keys to environments), user must also have SECRETS + DEPLOY_UNDEPLOY permission.