Leaf Link > Endpoints

About

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.

Note

The app information that will be highly referenced here is the application information registered by the client with the providers

API key

The API keys are the required authentication info for the Leaf widgets. It is created at a Leaf user level.

Endpoints

DescriptionEndpoints
Get all Leaf user API keysGET /api-keys
Create a Leaf user API keyPOST /api-keys
Revoke a Leaf user API keyDELETE /api-keys

Get all Leaf user API keys

 GET /api-keys

Get all API keys from a Leaf user.

Request examples

curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/api-keys?leafUserId={leafUserId}'
Response
[
{
"id": "uuid",
"key": "xxxx...xxxx",
"leafUserId": "uuid",
"expiresAt": "2024-04-25T18:32:25.530259",
"description": "test",
"valid": true
},
{
"id": "uuid",
"key": "xxxx...xxxx",
"leafUserId": "uuid",
"expiresAt": "2024-04-25T18:36:37.965906",
"description": "test",
"revokedAt": "2023-04-26T21:27:55.674731",
"valid": false
}
]

Create a Leaf user API key

 POST /api-keys

Creates a Leaf user API key.

Request body

It is requires few properties:

{
"leafUserId": "string",
"expiresIn": int,
"description": "string"
}
  • leafUserId: leaf user Id
  • expiresIn: time to expiration, in seconds. The minimum allowed value is 900 (15 minutes). The default valueis one year.
  • description: description to identify the API Key

Request examples

curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
-d '{ "leafUserId": "string", "expiresIn": 900, "description": "string" }'
'https://api.withleaf.io/services/usermanagement/api/api-keys'
Response
{
"key": "xxxxxxx",
"expiresAt": "2024-04-25T18:36:37.965906",
"valid": true
}

Revoke a Leaf user API key

 DELETE /api-keys

Revokes a Leaf user API key.

Request examples

curl -X DELETE \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/api-keys/{apiKeyId}'

Providers application info

AgLeader

To enable AgLeader as a provider in the widget you need to have your application already registered with AgLeader. You can find more info on how to create a developer account here.

Required integration

Soon we will add the necessary information to carry out this integration.

Endpoints

DescriptionEndpoints
Get all AgLeader app informationGET /app-keys/AgLeader
Get a AgLeader app informationGET /app-keys/AgLeader/{appName}
Create a AgLeader app informationPOST /app-keys/AgLeader/{appName}
Update a AgLeader app informationPUT /app-keys/AgLeader/{appName}
Delete a AgLeader app informationDELETE /app-keys/AgLeader/{appName}

Get all AgLeader app information

 GET /app-keys/AgLeader

Get all AgLeader app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/AgLeader'
Response
[
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
},
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
}
]

Get a AgLeader app information

 GET /app-keys/AgLeader/{appName}

Get a AgLeader app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/AgLeader/{appName}'
Response
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
}

Create a AgLeader app information

 POST /app-keys/AgLeader/{appName}

Create a AgLeader app information.

Request body
{
"privateKey": "string",
"publicKey": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/AgLeader/{appName}'

Update a AgLeader app information

 PUT /app-keys/AgLeader/{appName}

Update a AgLeader app information.

Request body
{
"privateKey": "string",
"publicKey": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/AgLeader/{appName}'

Delete a AgLeader app information

 DELETE /app-keys/AgLeader/{appName}

Delete a AgLeader app information.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/AgLeader/{appName}'

Climate FieldView

To enable Climate FieldView as a provider in the widget you need to have your application already registered with Climate FieldView. You can find more info on how to create a developer account here.

Required integration

Soon we will add the necessary information to carry out this integration.

Endpoints

DescriptionEndpoints
Get all Climate FieldView app informationGET /app-keys/ClimateFieldView
Get a Climate FieldView app informationGET /app-keys/ClimateFieldView/{appName}
Create a Climate FieldView app informationPOST /app-keys/ClimateFieldView/{appName}
Update a Climate FieldView app informationPUT /app-keys/ClimateFieldView/{appName}
Delete a Climate FieldView app informationDELETE /app-keys/ClimateFieldView/{appName}

Get all Climate FieldView app information

 GET /app-keys/ClimateFieldView

Get all Climate FieldView app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/ClimateFieldView'
Response
[
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
},
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
}
]

Get a Climate FieldView app information

 GET /app-keys/ClimateFieldView/{appName}

Get a Climate FieldView app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/ClimateFieldView/{appName}'
Response
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
}

Create a Climate FieldView app information

 POST /app-keys/ClimateFieldView/{appName}

Create a Climate FieldView app information.

Request body
{
"apiKey": "string",
"clientId": "string",
"clientSecret": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/ClimateFieldView/{appName}'

Update a Climate FieldView app information

 PUT /app-keys/ClimateFieldView/{appName}

Update a Climate FieldView app information.

Request body
{
"apiKey": "string",
"clientId": "string",
"clientSecret": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/ClimateFieldView/{appName}'

Delete a Climate FieldView app information

 DELETE /app-keys/ClimateFieldView/{appName}

Delete a Climate FieldView app information.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/ClimateFieldView/{appName}'

CNHI

To enable CNHI as a provider in the widget you need to have your application already registered with CNHI. You can find more info on how to create a developer account here.

Required integration

Soon we will add the necessary information to carry out this integration.

Endpoints

DescriptionEndpoints
Get all CNHI app informationGET /app-keys/CNHI
Get a CNHI app informationGET /app-keys/CNHI/{appName}/{clientEnvironment}
Create a CNHI app informationPOST /app-keys/CNHI/{appName}/{clientEnvironment}
Update a CNHI app informationPUT /app-keys/CNHI/{appName}/{clientEnvironment}
Delete a CNHI app informationDELETE /app-keys/CNHI/{appName}/{clientEnvironment}

Get all CNHI app information

 GET /app-keys/CNHI

Get all CNHI app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/CNHI'
Response
[
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "STAGE or PRODUCTION"
},
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "STAGE or PRODUCTION"
}
]

Get a CNHI app information

 GET /app-keys/CNHI/{appName}/{clientEnvironment}

Get a CNHI app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/CNHI/{appName}/{clientEnvironment}'
Response
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "STAGE or PRODUCTION"
}

Create a CNHI app information

 POST /app-keys/CNHI/{appName}/{clientEnvironment}

Create a CNHI app information.

Request body
{
"clientId": "string",
"clientSecret": "string",
"subscriptionKey": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/CNHI/{appName}/{clientEnvironment}'

Update a CNHI app information

 PUT /app-keys/CNHI/{appName}/{clientEnvironment}

Update a CNHI app information.

Request body
{
"clientId": "string",
"clientSecret": "string",
"subscriptionKey": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/CNHI/{appName}/{clientEnvironment}'

Delete a CNHI app information

 DELETE /app-keys/CNHI/{appName}/{clientEnvironment}

Delete a CNHI app information.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/CNHI/{appName}/{clientEnvironment}'

John Deere

To enable John Deere as a provider in the widget you need to have your application already registered with John Deere. You can find more info on how to create a developer account here.

Required integration

Soon we will add the necessary information to carry out this integration.

Endpoints

DescriptionEndpoints
Get all John Deere app informationGET /app-keys/JohnDeere
Get a John Deere app informationGET /app-keys/JohnDeere/{appName}/{clientEnvironment}
Create a John Deere app informationPOST /app-keys/JohnDeere/{appName}/{clientEnvironment}
Update a John Deere app informationPUT /app-keys/JohnDeere/{appName}/{clientEnvironment}
Delete a John Deere app informationDELETE /app-keys/JohnDeere/{appName}/{clientEnvironment}

Get all John Deere app information

 GET /app-keys/JohnDeere

Get all John Deere app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/JohnDeere'
Response
[
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "STAGE or PRODUCTION"
},
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "STAGE or PRODUCTION"
}
]

Get a John Deere app information

 GET /app-keys/JohnDeere/{appName}/{clientEnvironment}

Get a John Deere app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/JohnDeere/{appName}/{clientEnvironment}'
Response
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "STAGE or PRODUCTION"
}

Create a John Deere app information

 POST /app-keys/JohnDeere/{appName}/{clientEnvironment}

Create a John Deere app information.

Request body
{
"clientKey": "string",
"clientSecret": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/JohnDeere/{appName}/{clientEnvironment}'

Update a John Deere app information

 PUT /app-keys/JohnDeere/{appName}/{clientEnvironment}

Update a John Deere app information.

Request body
{
"clientKey": "string",
"clientSecret": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/JohnDeere/{appName}/{clientEnvironment}'

Delete a John Deere app information

 DELETE /app-keys/JohnDeere/{appName}/{clientEnvironment}

Delete a John Deere app information.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/JohnDeere/{appName}/{clientEnvironment}'

Trimble

To enable Trimble as a provider in the widget you need to have your application already registered with Trimble. You can find more info on how to create a developer account here.

Required integration

Soon we will add the necessary information to carry out this integration.

Endpoints

DescriptionEndpoints
Get all Trimble app informationGET /app-keys/Trimble
Get a Trimble app informationGET /app-keys/Trimble/{appName}
Create a Trimble app informationPOST /app-keys/Trimble/{appName}
Update a Trimble app informationPUT /app-keys/Trimble/{appName}
Delete a Trimble app informationDELETE /app-keys/Trimble/{appName}

Get all Trimble app information

 GET /app-keys/Trimble

Get all Trimble app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/Trimble'
Response
[
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
},
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
}
]

Get a Trimble app information

 GET /app-keys/Trimble/{appName}

Get a Trimble app information from the API Owner.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/Trimble/{appName}'
Response
{
"provider": "providerName",
"appName": "yourAppName",
"clientEnvironment": "PRODUCTION"
}

Create a Trimble app information

 POST /app-keys/Trimble/{appName}

Create a Trimble app information.

Request body
{
"applicationName": "string",
"clientId": "string",
"clientSecret": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/Trimble/{appName}'

Update a Trimble app information

 PUT /app-keys/Trimble/{appName}

Update a Trimble app information.

Request body
{
"applicationName": "string",
"clientId": "string",
"clientSecret": "string"
}
Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/Trimble/{appName}'

Delete a Trimble app information

 DELETE /app-keys/Trimble/{appName}

Delete a Trimble app information.

Request examples
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/usermanagement/api/app-keys/Trimble/{appName}'