CNHI Credentials

Form of a CNHI Credentials resource:

{
"status": "str",
"clientId": "str",
"clientSecret": "str",
"subscriptionKey": "str",
"refreshToken": "str",
"clientEnvironment": "STAGE or PRODUCTION"
}

Endpoints

DescriptionEndpoints
Get the CNHI credentialsGET /users/{leafUserId}/cnhi-credentials
Create a CNHI credentialsPOST /users/{leafUserId}/cnhi-credentials
Delete CNHI credentialsDELETE /users/{leafUserId}/cnhi-credentials

CNHI Credentials Endpoints

Get the CNHI credentials]

 GET /users/{leafUserId}/cnhi-credentials
Get the CNHI credentials of the Leaf User based on its id and returns a JSON with the credentials.

Request examples

curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/users/{leafUserId}/cnhi-credentials'

Response

A CNHI credentials resource as a JSON.

Create a CNHI credentials

 POST /users/{leafUserId}/cnhi-credentials
Create a CNHI credentials for the Leaf User.

Request examples

A CNHI credentials.

{
"clientId": "str",
"clientSecret": "str",
"subscriptionKey": "str",
"refreshToken": "str",
"clientEnvironment": "STAGE or PRODUCTION"
}
curl -X POST \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"clientId": "str", "clientSecret": "str", "subscriptionKey": "str", "refreshToken": "str", "clientEnvironment": "STAGE or PRODUCTION"}' \
'https://api.withleaf.io/services/usermanagement/api/users/{leafUserId}/cnhi-credentials'

Response

A CNHI Credentials with status.

Delete CNHI credentials

 DELETE /users/{leafUserId}/cnhi-credentials
Delete Leaf User's CNHI credentials.

Request examples

curl -X DELETE \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/users/{leafUserId}/cnhi-credentials'