Regenerate Client Secret
This API is used to generate the client secret during the grace period, once the service account has expired. In the grace period, the old client’s secret can only be used for regenerating the new client’s secret.
Request Structure
| Endpoint: | /acctmgmt-regenerate-client-secret |
| Type: | POST |
| Sample URL: | https://<IP/HostName/TenantName>:<GWPORT>/avxapi/acctmgmt-regenerate-client-secret?gwsource=externalTo understand the elements of the sample URL, click here. |
| Headers: | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| gwsource
|
(Mandatory) Source from which the request is triggered. The values
can be:
Type: String |
| Payload
|
(Mandatory) Input data for request body in application/json format. For payload details, see Payload section. |
Payload
| Name | Description |
|---|---|
| client_id
|
(Mandatory) The old client id of the service account. Example: "admin" |
| client_secret
|
(Mandatory) The old client secret of the service account. Example: "name" |
Response Structure
- Status Code: 200 OK
- Message: (Return the client id and client secret)
- Headers:
- Content-Type: application/json
| Name | Description |
|---|---|
| response | Contains the response attributes for search of role successfully. |
| clientId
|
Contains the new/generated client id. Type: String Example: "e7deb0fc-f0a6-4ffa-b5a1-8acf07491186" |
| clientSecret
|
Contains the new/generated client secret. Type: String Example: "meR0eQKssBjGk*7BO#O0SH170PoDG0I7" |
| expireAt
|
Contains the Client Secret Validity in milliseconds. Type: Integer Example: "1749370443395 " |
| message | Success message or failure description in case of error. |
| appStatusCode | Application specific status code for the response. Will be non-null for failure response. |
| tags | More info in case of failure response. |
Status Codes
| HTTP Code | appStatusCode | Response Message |
|---|---|---|
| 200 OK | null | The new client id and client secret are sent in the response. |
| 401 Unauthorized | OAUTH_CLNT_22 | Client Credentials is Invalid. |
Sample Request/Response
Generate a new client id and secret for the expired service account within the duration of the grace period. (If the grace period in the backend is set to 0, then the API cannot be used.)
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/acctmgmt-regenerate-client-secret?gwsource=external{
"payload": {
"client_id": "sample_client_id",
"client_secret": "sample_secret"
}
}{
"response": {
"clientId": "e7deb0fc-f0a6-4ffa-b5a1-8acf07491186",
"clientSecret": "meR0eQKssBjGk*7BO#O0SH170PoDG0I7",
"expireAt": 1749370443395
},
"message": null,
"appStatusCode": null,
"tags": null,
"headers": null
}What's Next
Reference
- IP/HostName/TenantName: Replace with the actual IP address, hostname,
or tenant name based on the specific configuration in AppViewX.
- IP: A unique identifier assigned to each device connected to
a computer network that uses the Internet Protocol for communication
The IP address will be included in the endpoint URL for an on-prem deployment.
- HostName: A human-readable label assigned to a device (host)
on a network
The hostname will be included in the endpoint URL for an on-prem deployment.
- TenantName: An identifier label for a tenant given to
indicate which tenant's data the API request will
access/modify
The tenant name will be included in the endpoint URL for a SaaS deployment.
- IP: A unique identifier assigned to each device connected to
a computer network that uses the Internet Protocol for communication
- GWPORT: AppViewX gateway port
A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.
Example: 31443
- avxapi: Path parameter value (static) that is part of the endpoint's URL
- Endpoint: Endpoint of the API, for example: execute-hook
- gwsource: Source or origin of a gateway, for example: external.
