John Deere Credentials

Form of a John Deere Credentials resource:

{
"status": "str",
"clientKey": "str",
"clientSecret": "str",
"tokenId": "str",
"tokenSecretKey": "str",
"accessToken": "str",
"refreshToken": "str",
"scopes": ["str"]
}

Endpoints

DescriptionEndpoints
Get the John Deere credentialsGET /users/{leafUserId}/john-deere-credentials
Create a John Deere credentialsPOST /users/{leafUserId}/john-deere-credentials
Delete John Deere credentialsDELETE /users/{leafUserId}/john-deere-credentials

John Deere Credentials Endpoints

Get the John Deere credentials

 GET /users/{leafUserId}/john-deere-credentials

Get the John Deere 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}/john-deere-credentials'

Response

{
"clientKey": "str",
"clientSecret": "str",
"tokenId": "str",
"tokenSecretKey": "str",
"accessToken": "str",
"refreshToken": "str",
"status": "str",
"clientEnvironment": "STAGE or PRODUCTION",
"scopes": ["str"]
}

Create a John Deere credentials

 POST /users/{leafUserId}/john-deere-credentials

Create a John Deere credentials for the Leaf User.

Request examples

{
"clientKey": "str",
"clientSecret": "str",
"accessToken": "str",
"refreshToken": "str",
"clientEnvironment": "STAGE or PRODUCTION"
}
curl -X POST \
-H 'Authorization: Bearer YOUR_TOKEN' \
-d '{"clientKey": "str","clientSecret": "str","accessToken": "str","refreshToken": "str","clientEnvironment": "STAGE or PRODUCTION"}' \
'https://api.withleaf.io/services/usermanagement/api/users/{leafUserId}/john-deere-credentials'

Response

A John Deere credentials with status.

{
"clientKey": "str",
"clientSecret": "str",
"tokenId": "str",
"tokenSecretKey": "str",
"accessToken": "str",
"refreshToken": "str",
"status": "str",
"clientEnvironment": "STAGE or PRODUCTION"
}

Delete John Deere credentials

 POST /users/{leafUserId}/john-deere-credentials

Delete Leaf User's John Deere credentials.

Request examples

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

Troubleshooting

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

Events

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