Ana içeriğe geç

Remove Certificate

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}/certificate/

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

Notes​

  • Consumer must exist
  • Consumer must have a certificate assigned, otherwise the operation returns an error

Response​

Success Response (200 OK)​

{
"status": "SUCCESS",
"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)​

{
"status": "FAILURE",
"resultMessage": "Credential (username: api-user) was not found!"
}

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/certificate/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings​

  • Consumer Requirements:

    • Consumer must exist
    • Consumer must have a certificate assigned, otherwise the operation returns a 400 error
  • Automatic Deployment:

    • Consumer is automatically deployed to all environments after certificate removal
    • Deployment results are returned in the response
  • No Impact on Certificate:

    • The certificate itself is not deleted
    • Only the assignment to the consumer is removed

Permissions​

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