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 -X 'POST' \
'https://jmapcloud.io/api/ss/rest/v1/authenticate' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"organizationId": "6cb23e44-8012-4ab0-852a-e4781d833699",
"username": "[email protected]",
"password": "hG8w&I9Fjs3A92Kl"
}'{
"message": "The result is the access and refresh tokens",
"result": {
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlBkOXo0RGpYbzl3ZjJWMkRqOVhFXyJ9.eyJodHRwczovL2Rldi12cHMuam1hcGNsb3VkLmlvL3JvbGVzIjpbIlNZU19BRE1JTiIsIk9SR19BRE1JTiJdLCJodHRwczovL2Rldi12cHMuam1hcGNsb3VkLmlvL29yZ2FuaXphdGlvbklkIjoiM2JmODkxNDctMmZiZi00NzVkLTg0MjUtMTgzYjk2Yzc2ZTNjIiwiaHR0cHM6Ly9kZXYtdnBzLmptYXBjbG91ZC5pby9lbWFpbCI6InNjb3Vsb21iZuBrMmdlb3NwYXRpYWwuY29tIiwiaHR0cHM6Ly9kZXYtdnBzLmptYXBjbG91ZC5pby9uaWNrbmFtZSI6InNjb3Vsb21iZSIsImh0dHBzOi7vZGV2LXZwcy5qbWFwY2xvdWQuaW8vbmFtZSI6IlPDqWJhc3RpZW4gQ291bG9tYmUiLCJpc3MiOiJodHRwczovL2F1dGgtZGV2LXZwcy5qbWFwY2xvdWQuaW8vIiwic3ViIjoiYXV0aDB8NjNlMTM5YmExYmZmOWU2YTc2MGFmMjQ0IiwiYXVkIjoiaHR0cHM6Ly9kZXYtdnBzLmptYXBjbG91ZC5pby8iLCJpYXQiOjE3NzQ4ODUwNzAsImV4cCI6MTc3NDg4NTM3MCwic2NvcGUiOiJvZmZsaW5lX2FjY2VzcyIsImd0eSI6InBhc3N3b3JkIiwiYXpwIjoiNGRqQ0M4VGt2TTBxM0djZHZYcHM3Y25KdEVXZnNNeXQifQ.QyXlTsdIc_xdE2jS9HMQsM4B_8VzOXLfV0-S8ciPpU0U7pDl4JwSEyUMWX4cDXetmfSlg3Cvaf8MTJW6dQgv4fp3BPChiQeuxoeObVWLsdm593MMyfnEUD289KBMfjWCqe0Qj6YZqOmKoIFEc6Fshwxsa0RveZ3TA8K2JGpav6N3gO4dL1tXwCg-oFYG3frFch3m9QK-3DOA4QwaQH4n8HJQZ5N-Yu61-fvkya2LGlffum9ziqQ0YGD2vHiw-UlZ9XjQTNzEcgsvqAFMaJEOUYZapKwLi5zgdrvnEXECYhROiDEZTVWLpwlMi-0fTzXf20W1pdvifMmyD0LeK5jUCQ",
"refreshToken": "v1.MTxij3Q5r5CCoERcP4tZkngKAIWgb0B9I7pkhunUKjsZF0ySlHFgrrU__rrfh4R3-E5SGbKM8WxTaWUaYzrOKDg",
"accessTokenExpireAt": "2026-03-30T15:42:50.665+00:00",
"accessTokenExpiration": 300
}
}Organization settings
/rest/v1/organizations/{organization}/settings/{setting}
{
"action": "add|update|delete",
"value": {}
}settingis the setting to add, update or deleteactionis the action to do. Possible values areadd,updateanddeletevalueis the value to add, update or delete. The value depends on the setting. See examples below.
Log streams
/rest/v1/organizations/{organization}/settings/logStreams
Add a DATADOG log stream
{
"action": "add",
"value": {
"streamType": "DATADOG",
"name": "My Datadog stream",
"apiKey": "My_S3Cr3t_K3Y",
"applicationKey": "My_S3Cr3t_K3Y",
"region": "US1"
}
streamTypeis requirednameis required and must be unique across all streamsapiKeyis requiredapplicationKeyis requiredregionis optional. Default toUS1if not specified
Add a WEBHOOK log stream
{
"action": "add",
"value": {
"streamType": "WEBHOOK",
"name": "My Webhook stream",
"payloadUrl": "https://domain.com/mywebhook/incoming",
"authorizationToken": "Bearer aGkgbW9tCg..."
}
}streamTypeis requirednameis required and must be unique across all streamspayloadUrlis requiredauthorizationTokenis optional
Update a DATADOG log stream
{
"action": "update",
"value": {
"name": "My Datadog stream",
"apiKey": "My_S3Cr3t_K3Y",
"applicationKey": "My_S3Cr3t_K3Y",
"region": "US1"
}
nameis required to identify which log stream you are editingapiKeyis optionalapplicationKeyis optionalregionis optional
Update a WEBHOOK log stream
{
"action": "update",
"value": {
"name": "My Webhook stream",
"payloadUrl": "https://domain.com/mywebhook/incoming",
"authorizationToken": "Bearer aGkgbW9tCg..."
}
}nameis required to identify which log stream you are editingpayloadUrlis optionalauthorizationTokenis optional
Delete a log stream
{
"action": "delete",
"value": "My Webhook stream"
}valueis required to identify which log stream you are deleting