Ana içeriğe geç

Delete Credential

Endpoint

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

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
usernamestringYesUsername of the credential to delete

Request Body

None.

Response

Success Response (200 OK)

{
"success": true,
"deploymentResult": {
"success": true,
"message": "Undeployment completed successfully",
"environmentResults": [
{
"environmentName": "production",
"success": true,
"message": "Undeployed 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/" \
-H "Authorization: Bearer YOUR_TOKEN"

Permissions

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

Notes and Warnings

  • Permanent Deletion:

    • Credential is permanently deleted
    • This action cannot be undone
  • Automatic Undeployment:

    • Credential is automatically undeployed from all environments
    • Undeployment results are returned in the response
  • Access Revocation:

    • All access grants for this credential are also removed
    • Credential will no longer have access to any API Proxies or Groups
  • Credential Must Exist:

    • Credential with specified username must exist
    • If credential does not exist, deletion will fail