Regenerate Client

Regenerate Client

Regenerate Oauth client secret. This apis revokes current client and creates new client id and secret. Either asset id or client id should be passed as input. Asset id/client id can be fetched from Oauth App search api.

Request
URI
POST
https://{api_host}/vcf/tenant-mgmt/api/v1/auth/clients/regenerate
COPY
Request Body
RegenerateClientRequest of type(s) application/json
Required
{
    "asset_id": "asset@test",
    "tenant_id": "567905de-ef1c-48ce-9e4e-05c28f5caaa6"
}
string
tenant_id
Required

Id of the owner tenant in which Oauth App is created

string
asset_id
Optional

Asset id of Oauth App. Asset Id or Client Id is required, if both provided Asset Id will be considered for processing.

string
client_id
Optional

Client id of Oauth App. Client Id or Asset Id is required.

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns RegenerateClientResponse of type(s) application/json
{
    "name": "um-asset@test",
    "client_id": "94faf930-df7e-477d-b6fe-e80c9b049e30",
    "client_secret": "c148a783-32dd-4593-a256-0fe4f452091c",
    "asset_id": "um-asset@test",
    "site_id": 67444,
    "tenant_id": "567905de-ef1c-48ce-9e4e-05c28f5caaa6",
    "client_type": "GENERAL",
    "created_by": "[email protected]",
    "roles": [
        "vcf:usage-meter-manager"
    ]
}
string
client_secret
Optional

Client secret of the Oauth App

string
name
Optional

Oauth App Name

string
description
Optional

Oauth App Description

string
asset_id
Optional

Asset id of the Oauth App

string
site_id
Optional

Site id.

string
tenant_id
Optional

Id of the owner tenant in which Oauth App is created

string
client_id
Optional

Client id of the Oauth App

string
client_type
Optional

Indicates the type of Oauth App client

Possible values are : MACHINE, UMA, GENERAL,
string
created_by
Optional

created by

string
updated_by
Optional

updated by

string
created_at
Optional

created at

string
updated_at
Optional

updated at

array of string
roles
Optional

roles


400

Bad Request

Returns ErrorResponse of type(s) application/json
{
    "value": {
        "major_error_code": "INVALID_ASSET_ID",
        "minor_error_code": "INVALID_ASSET_ID",
        "message": "Invalid Asset ID In the Request OR Asset is already revoked."
    }
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


401

Unauthorized

Returns ErrorResponse of type(s) application/json
{
    "value": {
        "major_error_code": 401,
        "minor_error_code": "UNAUTHORIZED",
        "message": "Validation Failed. Reason: Token Expired"
    }
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


403

Forbidden

Returns ErrorResponse of type(s) application/json
{
    "major_error_code": 403,
    "minor_error_code": "ACCESS_DENIED",
    "message": "Access Denied"
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


404

Not Found

Returns ErrorResponse of type(s) application/json
{
    "value": {
        "major_error_code": "NOT_FOUND",
        "minor_error_code": "TENANT_NOT_FOUND",
        "message": "Tenant 567905de-ef1c-48ce-9e4e-05c28f5caaa6 not found."
    }
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


500

Internal Server Error

Returns ErrorResponse of type(s) application/json
{
    "failed-to-regenerate": {
        "value": {
            "major_error_code": "FAILED_TO_REGENERATE_CLIENT",
            "minor_error_code": "FAILED_TO_REGENERATE_CLIENT",
            "message": "Failed to revoke and recreate client."
        }
    }
}
array of string
parameters
Optional

parameters

string
message
Optional

message

string
major_error_code
Optional

major_error_code

string
minor_error_code
Optional

minor_error_code

string
http_status_code
Optional

http_status_code


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/vcf/tenant-mgmt/api/v1/auth/clients/regenerate