Get Event Logs
As events can fail over time, we provide the ability to browse all logs for your events. The API provides various endpoints to get all logs and jobs.
GET
Get all logs
https://api.moltin.com/v2/integrations/logs
Query Parameters:
Name | Required | Type | Description |
---|---|---|---|
page[limit] | Optional | integer | The number of items to return per page. |
page[offset] | Optional | integer | The number of items to offset the results by. Offset is zero-based. |
Headers:
Name | Required | Type | Description |
---|---|---|---|
Authorization | Required | string | The Bearer token to grant access to the API. |
200 OK
{
"data": [
{
"id": "11de4222-fbda-498c-9ecb-cd46d598712f",
"type": "integration-log",
"succeeded": false,
"attempt": 1,
"processing_time": 0.2529,
"body": "Not found",
"status_code": 404,
"error_detail":
"Received a status code outside of 2xx range - treating webhook as a fail",
"relationships": {
"integration": {
"data": {
"type": "integration",
"id": "8edd44ef-1856-4456-90ec-d9fab8a25049"
}
},
"job": {
"data": {
"type": "integration-job",
"id": "3b69a7e2-78ad-4ee6-8a81-c9b1b8a9cd26"
}
}
},
"meta": {
"timestamps": {
"created_at": "2017-10-30T18:15:40.087650928Z"
}
}
}
],
"meta": {
"limit": 100,
"offset": 0,
"current": 1,
"total": 1
},
"results": {
"total": 1
}
}
curl -X GET https://api.moltin.com/v2/integrations/logs \
-H "Authorization: Bearer XXXX"
GET
Get logs for an Event
https://api.moltin.com/v2/integrations/:id/logs
Path Parameters:
Name | Required | Type | Description |
---|---|---|---|
id | Required | string | The ID for the event. |
Query Parameters:
Name | Required | Type | Description |
---|---|---|---|
page[limit] | Optional | integer | The number of items to return per page. |
page[offset] | Optional | integer | The number of items to offset the results by. Offset is zero-based. |
Headers:
Name | Required | Type | Description |
---|---|---|---|
Authorization | Required | string | The Bearer token to grant access to the API. |
200 OK
{
"data": [
{
"id": "11de4222-fbda-498c-9ecb-cd46d598712f",
"type": "integration-log",
"succeeded": false,
"attempt": 1,
"processing_time": 0.2529,
"body": "Not found",
"status_code": 404,
"error_detail":
"Received a status code outside of 2xx range - treating webhook as a fail",
"relationships": {
"integration": {
"data": {
"type": "integration",
"id": "8edd44ef-1856-4456-90ec-d9fab8a25049"
}
},
"job": {
"data": {
"type": "integration-job",
"id": "3b69a7e2-78ad-4ee6-8a81-c9b1b8a9cd26"
}
}
},
"meta": {
"timestamps": {
"created_at": "2017-10-30T18:15:40.087650928Z"
}
}
}
],
"meta": {
"limit": 100,
"offset": 0,
"current": 1,
"total": 1
},
"results": {
"total": 1
}
}
curl -X GET https://api.moltin.com/v2/integrations/:id/logs \
-H "Authorization: Bearer XXXX"
GET
Get jobs for an Event
https://api.moltin.com/v2/integrations/:id/jobs
Path Parameters:
Name | Required | Type | Description |
---|---|---|---|
id | Required | string | The ID for the event. |
Headers:
Name | Required | Type | Description |
---|---|---|---|
Authorization | Required | string | The Bearer token to grant access to the API. |
200 OK
{
"data": [
{
"id": "6560f600-b610-4c02-88ac-0d120e3d5071",
"type": "integration-job"
},
{
"id": "353c015a-92ab-4c06-ab8a-bef8a451b9be",
"type": "integration-job"
},
{
"id": "4af82fba-8f0a-41b1-add6-0fa16fe3579e",
"type": "integration-job"
}
]
}
curl -X GET https://api.moltin.com/v2/integrations/:id/jobs \
-H "Authorization: Bearer XXXX"
GET
Get all logs for a job
https://api.moltin.com/v2/integrations/:event_id/jobs/:id/logs
Path Parameters:
Name | Required | Type | Description |
---|---|---|---|
id | Required | string | The ID for the job. |
event_id | Required | string | The ID for the event. |
Headers:
Name | Required | Type | Description |
---|---|---|---|
Authorization | Required | string | The Bearer token to grant access to the API. |
200 OK
curl -X GET https://api.moltin.com/v2/integrations/:event_id/jobs/:id/logs \
-H "Authorization: Bearer XXXX"