Update JWK
Overview
Updates an existing JWK (JSON Web Key) and deploys it to environments. Updating a JWK that was created from a source will detach it from the source.
Endpoint
PUT /apiops/projects/{projectName}/jwks/{jwkName}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| jwkName | string | Yes | Name of the JWK to update |
Request Body
{
"name": "updated-jwk",
"description": "Updated JWK description"
}
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | No | New JWK name (must be unique if changed) |
| description | string | No | New JWK description |
Notes
- If
nameis changed, it must be unique within the project - Updating a JWK that was created from a source (URL, certificate, key, keystore) will detach it from the source
- JWK is automatically deployed to all environments after update
Response
Success Response (200 OK)
{
"success": true,
"deploymentResult": {
"success": true,
"message": "Deployment completed successfully",
"environmentResults": [
{
"environmentName": "production",
"success": true,
"message": "Deployed successfully"
}
]
}
}
Error Response (400 Bad Request)
{
"error": "bad_request",
"error_description": "JWK (name: my-jwk) is not found! Try create operation."
}
or
{
"error": "bad_request",
"error_description": "JWK (name: updated-jwk) is already exist!"
}
cURL Example
curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/jwks/my-jwk/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "updated-jwk",
"description": "Updated JWK description"
}'
Notes and Warnings
- Source Detachment:
- Updating a JWK created from a source will detach it from the source
- The JWK becomes independent after update
- Name Changes:
- Name can be changed, but must remain unique
- All references to the old name must be updated
- Automatic Deployment:
- JWK is automatically deployed after update
- Deployment results are returned in the response
- Permissions:
- Requires
ROLE_API_SECURITYpermission - Requires
ROLE_DEPLOY_UNDEPLOY_PROXIESpermission for deployment
- Requires
Related Documentation
- List JWKs - List all JWKs
- Get JWK - Get a specific JWK
- Create JWK - Create a new JWK
- Delete JWK - Delete a JWK