Delete Credential
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)
{
"status": "SUCCESS",
"deploymentResult": {
"success": true,
"responseTime": 120,
"detailList": [
{
"envName": "production",
"podName": "worker-abc123",
"podIp": "10.0.0.1",
"success": true,
"responseTime": 120
}
]
}
}
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Credential (username: api-user) was not found!"
}
Common Causes
- Credential username does not exist
- Project not found or insufficient access
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
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+MANAGEpermission in the project - For automatic undeployment, user must also have
IDENTITY+DEPLOY_UNDEPLOYpermission
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
-
Pilot teardown order: In the pilot collection, run
12 Credentials — Teardown (deferred)after 07 RLCL and 11 Connections — Teardown (deferred); deletescol-{runId}-credentialcreated in 06 Credentials Flow (also used by 07 RLCL and 10 Gateway Token Tests).
Related Documentation
- List Credentials - List all credentials
- Create Credential - Create a new credential
- Revoke Access - Revoke access from API Proxy or Group