API Reference

Examples

Authenticate

Before making requests to the platform, you must use one of the following methods to authenticate.

Using an API key

If you have an API key, you can use it in every call by putting it in the URL or the headers of the requests. This is the preferred method for using the API.

curl --request GET \
     --url https://jmapcloud.io/api/mcs/rest/v1/organizations/organization/projects?apiKey=J9dh&skTjks9lks8K82Jhzod2J2j \
     --header 'Accept: application/json'
curl --request GET \
     --url https://jmapcloud.io/api/mcs/rest/v1/organizations/organization/projects \
     --header 'Accept: application/json'
     --header 'Api-Key: J9dh&skTjks9lks8K82Jhzod2J2j'

Using user credentials

If you want to use user credential to access the API, you must call the authenticate endpoint (https://jmapcloud.readme.io/reference/getaccesstoken) with the username and password. This will return the JWT token that you must add in the headers of every request.

/rest/v1/authenticate

curl --request POST \
     --url https://jmapcloud.io/api/ss/rest/v1/authenticate \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "username": "[email protected]",
     "password": "hG8w&I9Fjs3A92Kl"
}
'
{
  "message": "The result is the access token",
  "result": "eyJhcGciOiJSUzI1NiIsInP5cCI6IkpXVCIsImtpZCI6I7pKMTRnTHZlQndub2xDWQ5lNHNRViJ9.eyJodHRwczovL2Rldi5qbWFwY2xvdWQuaW8vcm9sZXMiOlsiT1JHX0FETUlOIiwiT1JHX0VESVRPUiIsIk9SR19WSUVXRVIiLCJTWVNfQURNSU4iXSwiaHR0cHM6Ly9kZXYuam1hcGNsb3VkLmlvL2VtYWlsIjoiYWRtaW5AazJnZW9zcGF0aWFsLmNvbSIsImh0dHBzOi8vZGV2LmptYXBjbG91ZC5pby9uaWNrbmFtZSI6ImFkbWluIiwiaHR0cHM6Ly9kZXYuam1hcGNsb3VkLmlvL25hbWUiOiJTdXBlciBBZG1pbiBKTWFwIENsb3VkIiwiaHR0cHM6Ly9kZXYuam1hcGNsb3VkLmlvL3VzZXJfbWV0YWRhdGEiOnsicm9sZXMiOiJTWVNfQURNSU4sT1JHX0FETUlOLE9SR19FRElUT1IsT1JHX1ZJRVdFUiIsIm9yZ2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