Valley Credentials

Form of a Valley Credentials resource:

{
"apid": "str",
"initializationVector": "str",
"key": "str",
"username": "str",
"password": "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 Valley credentialsGET /users/{leafUserId}/valley-credentials
Create a Valley credentialsPOST /users/{leafUserId}/valley-credentials
Delete Valley credentialsDELETE /users/{leafUserId}/valley-credentials

Valley Credentials Endpoints

Get the Valley credentials

 GET /users/{leafUserId}/valley-credentials

Get the Valley 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}/valley-credentials'

Response

{
"id": "uuid",
"status": "str",
"createdTime": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"apid": "str",
"key": "str",
"initializationVector": "str",
"username": "str",
}

Create a Valley credentials

 POST /users/{leafUserId}/valley-credentials

Create a Valley credentials for the Leaf User.

Request body

{
"apid": "str",
"initializationVector": "str",
"key": "str",
"username": "str",
"password": "str"
}

Request examples

curl -X POST \
-H 'Authorization: Bearer YOUR_TOKEN' \
-d '{"apid": "str", "initializationVector": "str", "key": "str", "username": "str", "password": "str"}' \
'https://api.withleaf.io/services/usermanagement/api/users/{leafUserId}/valley-credentials'

Response

A Valley credentials with status.

{
"id": "uuid",
"status": "OK",
"createdTime": "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
"apid": "str",
"key": "str",
"initializationVector": "str",
"username": "str",
}

Delete Valley credentials

 DELETE /users/{leafUserId}/valley-credentials

Delete Leaf User's Valley credentials.

Request examples

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

Troubleshooting

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

Events

 GET /users/{leafUserId}/valley-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}
/valley-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.