Endpoint
Authentication
Requires a Personal API Access Token.Header
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| username | string | Yes | Username of the credential |
Request Body
Full JSON Body Example - Basic Token Settings
Full JSON Body Example - Token Never Expires
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| grantType | string | No | - | Grant type for authentication. Values: PASSWORD, CLIENT_CREDENTIALS, AUTHORIZATION_CODE, IMPLICIT, REFRESH_TOKEN |
| tokenNeverExpires | boolean | No | - | Whether token never expires. If true, token expiration settings are ignored |
| tokenExpiresInAmount | long | No | - | Token expiration amount. Minimum value: 1. Required if tokenNeverExpires is false |
| tokenExpiresInUnit | string | No | - | Token expiration unit. Values: SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS |
| refreshTokenAllowed | boolean | No | - | Whether refresh token is allowed |
| refreshTokenCount | integer | No | - | Maximum number of refresh tokens. Minimum value: 1. Required if refreshTokenAllowed is true |
| refreshTokenExpiresInAmount | long | No | - | Refresh token expiration amount. Minimum value: 1. Required if refreshTokenAllowed is true |
| refreshTokenExpiresInUnit | string | No | - | Refresh token expiration unit. Values: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR |
| allowUrlParameters | boolean | No | - | Whether URL parameters are allowed in token requests |
| jwtSignatureAlgorithm | string | No | - | JWT signature algorithm. Common values: RS256, HS256, ES256, etc. |
| deletePrevious | boolean | No | - | Whether to delete previous tokens when new token is issued |
Notes
- All fields are optional
- Only provided fields are updated; other fields remain unchanged
- Credential must exist
- Authentication type is automatically set to
SECRET_MANAGERfor APIOps token settings - If
tokenNeverExpiresistrue,tokenExpiresInAmountandtokenExpiresInUnitare ignored - If
refreshTokenAllowedisfalse, refresh token related fields are ignored tokenExpiresInAmountandrefreshTokenExpiresInAmountmust be at least 1refreshTokenCountmust be at least 1
Response
Success Response (200 OK)
Error Response (400 Bad Request)
Error Response (401 Unauthorized)
Error Response (404 Not Found)
cURL Example
Example 1: Set Basic Token Settings
Example 2: Set Token Never Expires
Notes and Warnings
-
Partial Updates:
- Only provided fields are updated
- Fields not included in the request remain unchanged
- Use reset endpoint to restore all defaults
-
Authentication Type:
- Authentication type is automatically set to
SECRET_MANAGERfor APIOps token settings - This cannot be changed via this endpoint
- Authentication type is automatically set to
-
Token Expiration:
- If
tokenNeverExpiresistrue, token never expires regardless of expiration settings - If
tokenNeverExpiresisfalse,tokenExpiresInAmountandtokenExpiresInUnitmust be provided
- If
-
Refresh Token Settings:
- If
refreshTokenAllowedistrue, refresh token count and expiration must be provided - Refresh token count must be at least 1
- Refresh token expiration amount must be at least 1
- If
-
Grant Types:
- Supported grant types:
PASSWORD,CLIENT_CREDENTIALS,AUTHORIZATION_CODE,IMPLICIT,REFRESH_TOKEN - Grant type determines the OAuth2/OIDC flow used
- Supported grant types:
-
JWT Signature Algorithm:
- Common algorithms:
RS256,HS256,ES256,PS256 - Algorithm must match the key type used
- Common algorithms:
-
Automatic Deployment:
- Credential is automatically deployed to all environments after token settings update
- Deployment results are returned in the response
Permissions
- User must have
IDENTITY+MANAGEpermission in the project - For automatic deployment, user must also have
IDENTITY+DEPLOY_UNDEPLOYpermission
Related Documentation
- Reset Token Settings - Reset token settings to defaults
- Set JWK Validation - Assign JWK for validation and signing
- List Credentials - List all credentials

