Raven Credentials

Form of a Raven Credentials resource:

{
"clientId": "str",
"clientSecret": "str",
"refreshToken": "str",
"accessToken": "str"
}

All HTTP methods should be prepended by this service's endpoint:

https://api.withleaf.io/services/usermanagement/api

See below the REST resources and their endpoints available in this service.

Endpoints

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

Raven Credentials Endpoints

Get the Raven credentials

 GET /users/{leafUserId}/raven-credentials

Get the Raven credentials of the Leaf User based on its id and returns a JSON with the credentials. If during background processing we detect that this credential is no longer valid, the value of the status will be changed.

Request examples

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

Response

{
"id": "str",
"status": "str",
"createdTime": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"tokenMetadata": {"scopes": ["str"]},
"clientId": "str",
"clientSecret": "str",
"refreshToken": "str",
"accessToken": "str"
}

Create a Raven credentials

 POST /users/{leafUserId}/raven-credentials

Create a Raven credentials for the Leaf User.

Request body

{
"clientId": "str",
"clientSecret": "str",
"refreshToken": "str"
}

Request examples

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

Response

A Raven Credentials with status.

{
"id": "str",
"status": "str",
"createdTime": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"tokenMetadata": {"scopes": ["str"]},
"clientId": "str",
"clientSecret": "str",
"refreshToken": "str",
"accessToken": "str"
}

Delete Raven credentials

 DELETE /users/{leafUserId}/raven-credentials

Delete Leaf User's Raven credentials.

Request examples

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

Troubleshooting

With these endpoints, you can do some troubleshooting to see your credential's health.

Events

 GET /users/{leafUserId}/raven-credentials/events

Get the logs of the provider credential based on the LeafUserId sent.

Request examples

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

Response

[
{
"body": "string",
"createdDate": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"headers": "string",
"id": "string",
"statusCode": "int"
}
]
warning

The logs are available only for 30 days and once the credential is deleted or disassociated with the Leaf User, the logs are no longer available.