Ana içeriğe atla

Endpoint

DELETE /apiops/projects/{projectName}/credentials/{username}/publicKey/

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

Notes

  • Credential must exist
  • If no public key is assigned, the operation still succeeds
  • Public key assignment is set to null

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!"
}

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 DELETE \
  "https://demo.apinizer.com/apiops/projects/MyProject/credentials/api-user/publicKey/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Credential Requirements:
    • Credential must exist
    • Operation succeeds even if no public key is currently assigned
  • Automatic Deployment:
    • Credential is automatically deployed to all environments after public key removal
    • Deployment results are returned in the response
  • No Impact on Public Key:
    • The public key itself is not deleted
    • Only the assignment to the credential is removed

Permissions

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