Ana içeriğe geç

Delete Credential

Deprecated

This operation is deprecated. It still works. Use the successor operation of the Consumers API instead.

Every response of this operation carries a Deprecation: @1792368000 header and a Link header whose rel is successor-version:

Link: </apiops/projects/{projectName}/consumers>; rel="successor-version"

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

or, when the consumer is managed by directory synchronization (LDAP, Database, or API):

{
"status": "FAILURE",
"resultMessage": "Sync-managed credential cannot be deleted manually; use directory sync."
}

Common Causes​

  • Consumer username does not exist
  • Project not found or insufficient access
  • The consumer is managed by a still-active directory synchronization source and can only be removed by that source's own reconciliation

Error Response (401 Unauthorized)​

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

Error Response (409 Conflict)​

{
"status": "FAILURE",
"resultMessage": "Delete refused: dependent records or holds exist"
}

Common Causes​

  • The consumer still owns API clients not yet revoked. Revoke them from the manager interface first (see Suspending, Resuming and Revoking an API Client); already-revoked clients never block the delete
  • A delete is already in progress for this consumer — sent by any surface, including the manager interface. Retry once the other delete finishes; if the response keeps recurring long after nothing is actually deleting the consumer, see Concurrent Deletion

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:

    • Consumer is permanently deleted
    • This action cannot be undone
    • A consumer still holding access grants or rate-limit history is deleted along with them — unlike a consumer organization or a portal application, a consumer's own access grants are never a reason its delete is refused
    • Its API clients are the one exception: a consumer still owning API clients not yet revoked is refused with 409 Conflict until they are revoked
  • Sync-Managed Consumers:

    • A consumer managed by directory synchronization (LDAP, Database, or API) cannot be deleted through this endpoint, or any other surface, manually
    • It is removed only through its own provider's synchronization run, which retires it in place rather than deleting the row — see Synchronization
  • Concurrent Deletes:

    • Only one delete can be in progress for a given consumer at a time; a second request while one is running is refused with 409 Conflict
  • Automatic Undeployment:

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

    • All access grants for this consumer are also removed
    • Consumer 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); deletes col-{runId}-credential created in 06 Consumers Flow (also used by 07 RLCL and 10 Gateway Token Tests).