Delete Credential
Overview
Deletes a credential specified by username. The credential is automatically undeployed from all environments after deletion.
Endpoint
DELETE /apiops/projects/{projectName}/credentials/{username}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| username | string | Yes | Username 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"
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
Related Documentation
- List Credentials - List all credentials
- Create Credential - Create a new credential
- Revoke Access - Revoke access from API Proxy or Group