Ana içeriğe atla

Endpoint

PUT /apiops/projects/{projectName}/credentials/{username}/jwk/validation/{jwkName}/

Authentication

Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
usernamestringYesUsername of the credential
jwkNamestringYesName of the JWK to assign for validation and signing

Notes

  • JWK must exist in the project or in the admin project
  • Credential must exist
  • Only one JWK can be assigned for validation and signing at a time
  • Assigning a new JWK replaces the existing one if present
  • JWK is used for JWT signature verification and token signing

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "message": "Deployment completed successfully",
    "environmentResults": [
      {
        "environmentName": "production",
        "success": true,
        "message": "Deployed successfully"
      },
      {
        "environmentName": "staging",
        "success": true,
        "message": "Deployed successfully"
      }
    ]
  }
}

Error Response (400 Bad Request)

{
  "error": "bad_request",
  "error_description": "Credential (username: api-user) was not found!"
}
or
{
  "error": "bad_request",
  "error_description": "JWK (name: my-jwk) is not found!"
}

Error Response (401 Unauthorized)

{
  "error": "unauthorized_client",
  "error_description": "Invalid token"
}

Error Response (404 Not Found)

{
  "error": "not_found",
  "error_description": "Project(MyProject) was not found or user does not have privilege to access it!"
}

cURL Example

curl -X PUT \
  "https://demo.apinizer.com/apiops/projects/MyProject/credentials/api-user/jwk/validation/my-jwk" \
  -H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • JWK Requirements:
    • JWK must exist in the project or admin project
    • JWK name is case-sensitive
  • Credential Requirements:
    • Credential must exist
    • Credential must be in the same project or accessible from the project
  • Replacement Behavior:
    • Assigning a new JWK replaces any existing JWK for validation and signing
    • Previous JWK assignment is automatically removed
  • Usage:
    • JWK is used for JWT signature verification
    • JWK is used for token signing operations
    • Separate from JWK used for decryption and encryption
  • Automatic Deployment:
    • Credential is automatically deployed to all environments after JWK assignment
    • Deployment results are returned in the response

Permissions

  • User must have IDENTITY + MANAGE permission in the project
  • For automatic deployment, user must also have IDENTITY + DEPLOY_UNDEPLOY permission