Ana içeriğe geç

Reset Token Settings

Endpoint

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

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

Notes

  • Credential must exist
  • All token settings are reset to default values
  • Authentication type is set to SECRET_MANAGER

Default Values

After reset, token settings are set to the following default values:

FieldDefault Value
grantTypePASSWORD
tokenNeverExpirestrue
tokenExpiresInAmountnull
tokenExpiresInUnitnull
refreshTokenAllowednull
refreshTokenCountnull
refreshTokenExpiresInAmountnull
refreshTokenExpiresInUnitnull
allowUrlParametersfalse
managedFromThisPolicytrue
jwtSignatureAlgorithmRS256
deletePreviousfalse
enumPolicyAuthenticationTypeSECRET_MANAGER

Response

Success Response (200 OK)

{
"success": true,
"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)

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

Notes and Warnings

  • Complete Reset:

    • All token settings are reset to default values
    • Previous customizations are lost
    • Use set endpoint to configure specific values
  • Default Behavior:

    • Token never expires by default (tokenNeverExpires: true)
    • Refresh token is disabled by default
    • URL parameters are not allowed by default
    • JWT signature algorithm is RS256 by default
  • Authentication Type:

    • Authentication type is set to SECRET_MANAGER
    • This is the required value for APIOps token settings
  • Automatic Deployment:

    • Credential is automatically deployed to all environments after reset
    • Deployment results are returned in the response

Permissions

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