# Logs

The following endpoints allow you to manage scenarios logs.

## List scenario logs

> Retrieves a collection of all logs for a scenario with a given ID. Returned logs are sorted by \`imtId\` in descending order.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios / Logs","description":"The following endpoints allow you to manage scenarios logs."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios/{scenarioId}/logs":{"get":{"tags":["Scenarios / Logs"],"summary":"List scenario logs","description":"Retrieves a collection of all logs for a scenario with a given ID. Returned logs are sorted by `imtId` in descending order.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"name":"from","in":"query","schema":{"type":"integer"},"description":"The timestamp in milliseconds that defines the starting point of time from which the logs should be retrieved. Older logs will not be returned."},{"name":"to","in":"query","schema":{"type":"integer"},"description":"The timestamp in milliseconds that defines the ending point of time to which the logs should be retrieved. Newer logs will not be returned."},{"name":"status","in":"query","schema":{"type":"integer","enum":[1,2,3]},"description":"Filters logs by the execution status. `1` is for success, `2` is for warning, and `3` is for error."},{"name":"durationFrom","in":"query","schema":{"type":"integer"},"description":"Filters logs to only include executions with a duration greater than or equal to this value (in milliseconds)."},{"name":"durationTo","in":"query","schema":{"type":"integer"},"description":"Filters logs to only include executions with a duration less than or equal to this value (in milliseconds)."},{"name":"operationsFrom","in":"query","schema":{"type":"integer"},"description":"Filters logs to only include executions with an operations count greater than or equal to this value."},{"name":"operationsTo","in":"query","schema":{"type":"integer"},"description":"Filters logs to only include executions with an operations count less than or equal to this value."},{"name":"transferFrom","in":"query","schema":{"type":"integer"},"description":"Filters logs to only include executions with a data transfer greater than or equal to this value (in bytes)."},{"name":"transferTo","in":"query","schema":{"type":"integer"},"description":"Filters logs to only include executions with a data transfer less than or equal to this value (in bytes)."},{"name":"executionName","in":"query","schema":{"type":"string"},"description":"Filters logs by the execution name (partial match)."},{"name":"creditsFrom","in":"query","schema":{"type":"integer"},"description":"Filters logs to only include executions with credits greater than or equal to this value (in centicredits)."},{"name":"creditsTo","in":"query","schema":{"type":"integer"},"description":"Filters logs to only include executions with credits less than or equal to this value (in centicredits)."},{"name":"showCheckRuns","in":"query","schema":{"type":"boolean"},"description":"If set to `true`, this parameter specifies that check runs should be hidden in the returned results. Check runs concern scenarios starting with a trigger in cases when the trigger does not find anything new."},{"name":"pg[offset]","in":"query","schema":{"type":"integer"},"description":"The number of entities you want to skip before getting entities you want."},{"name":"pg[limit]","in":"query","schema":{"type":"integer"},"description":"The maximum number of entities you want to get in the response."},{"name":"pg[showLast]","in":"query","schema":{"type":"boolean"},"description":"Include records with `last` value in the result set. Just in case of the `last` based paging."},{"name":"pg[last]","in":"query","schema":{"type":"integer"},"description":"The last retrieved key. In response, you get only entries that follow after the key."},{"name":"pg[sortBy]","in":"query","schema":{"type":"string"},"description":"The value that will be used to sort returned entities by."},{"name":"pg[sortDir]","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"The sorting order. It accepts the ascending and descending direction specifiers."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scenarioLogs":{"type":"array","items":{"type":"object","properties":{"imtId":{"type":"string"},"duration":{"type":"integer"},"operations":{"type":"integer"},"transfer":{"type":"integer"},"centicredits":{"type":"bigint"},"organizationId":{"type":"integer"},"teamId":{"type":"integer"},"id":{"type":"integer"},"type":{"type":"string"},"authorId":{"type":"integer"},"authorName":{"type":"string","nullable":true,"description":"Name of the user who triggered the scenario run. Null when authorId is missing or unknown."},"instant":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"status":{"type":"integer"}}}},"pg":{"type":"object","properties":{"last":{"type":"string","description":"Shown only when using the `last` based pagination."},"showLast":{"type":"boolean","description":"Shown only when using the `last` based pagination."},"sortBy":{"type":"string"},"sortDir":{"type":"string"},"limit":{"type":"integer"},"offset":{"type":"integer","description":"Shown only when using the `offset` based pagination."}}}}}}}}}}}}}
```

## Get execution log

> Retrieves an execution log with a given ID for a scenario with a given ID. It returns the execution details such as execution duration, type, and status.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios / Logs","description":"The following endpoints allow you to manage scenarios logs."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios/{scenarioId}/logs/{executionId}":{"get":{"tags":["Scenarios / Logs"],"summary":"Get execution log","description":"Retrieves an execution log with a given ID for a scenario with a given ID. It returns the execution details such as execution duration, type, and status.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"description":"The unique ID of the scenario execution. It can be retrieved from the [List scenario logs](/api-reference/scenarios/logs/get--scenarios--scenarioid--logs.md) endpoint under the ID key.","name":"executionId","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Execution log retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"scenarioLog":{"type":"object","properties":{"imtId":{"type":"string"},"duration":{"type":"integer"},"operations":{"type":"integer"},"transfer":{"type":"integer"},"centicredits":{"type":"bigint"},"organizationId":{"type":"integer"},"teamId":{"type":"integer"},"id":{"type":"integer"},"type":{"type":"string"},"authorId":{"type":"integer"},"authorName":{"type":"string","nullable":true,"description":"Name of the user who triggered the scenario run. Null when authorId is missing or unknown."},"instant":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"status":{"type":"integer"}}}}}}}}}}}}}
```

## Get scenario execution details

> Retrieves details about an execution.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios / Logs","description":"The following endpoints allow you to manage scenarios logs."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios/{scenarioId}/executions/{executionId}":{"get":{"tags":["Scenarios / Logs"],"summary":"Get scenario execution details","description":"Retrieves details about an execution.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"description":"The unique ID of the scenario execution. It can be retrieved from the [List scenario logs](/api-reference/scenarios/logs/get--scenarios--scenarioid--logs.md) endpoint under the ID key.","name":"executionId","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","description":"Status of the scenario execution:\n\n- RUNNING\n - SUCCESS\n - WARNING\n - ERROR "},"outputs":{"type":"object","additionalProperties":true,"description":"Outputs of the scenario execution. The structure of the outputs depends on the scenario configuration."},"error":{"type":"object","properties":{"name":{"type":"string","description":"Name of the error."},"message":{"type":"string","description":"Description of the error."},"causeModule":{"type":"object","properties":{"name":{"type":"string","description":"Name of the module that caused the error."},"appName":{"type":"string","description":"Name of the app that caused the error."}}}}}}}}}}}}}}}
```

## Operations by Module

> Retrieves an aggregated list of operations per module within a specified time period.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios / Logs","description":"The following endpoints allow you to manage scenarios logs."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios/{scenarioId}/modules/operations":{"get":{"tags":["Scenarios / Logs"],"deprecated":true,"summary":"Operations by Module","description":"Retrieves an aggregated list of operations per module within a specified time period.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"name":"days","in":"query","schema":{"type":"integer"},"description":"Days to summarize retrospectively. Default 1, must be between 1 and 30.","required":false}],"responses":{"200":{"description":"Module log retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"object","properties":{"moduleId":{"type":"integer"},"total":{"type":"integer","description":"The total number of module executions, including warnings and errors, within a specified time period."},"warnings":{"type":"integer"},"errors":{"type":"integer"}}}}}}}}}}}}}}
```

## List module logs

> Retrieves an operation logs of a given module within a given scenario. Returns the operation details such as execution id, timestamp or status.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios / Logs","description":"The following endpoints allow you to manage scenarios logs."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios/{scenarioId}/modules/{moduleId}/logs":{"get":{"tags":["Scenarios / Logs"],"summary":"List module logs","description":"Retrieves an operation logs of a given module within a given scenario. Returns the operation details such as execution id, timestamp or status.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"description":"The unique ID of the scenario module. It is available in the scenario blueprint that can be retrieved from the [Get scenario blueprint](/api-reference/scenarios/blueprint/get--scenarios--scenarioid--blueprint.md) endpoint.","name":"moduleId","in":"path","schema":{"type":"integer"},"required":true},{"name":"pg[offset]","in":"query","schema":{"type":"integer"},"description":"The number of entities you want to skip before getting entities you want."},{"name":"pg[limit]","in":"query","schema":{"type":"integer"},"description":"The maximum number of entities you want to get in the response."},{"name":"pg[showLast]","in":"query","schema":{"type":"boolean"},"description":"Include records with `last` value in the result set. Just in case of the `last` based paging."},{"name":"pg[last]","in":"query","schema":{"type":"integer"},"description":"The last retrieved key. In response, you get only entries that follow after the key."},{"name":"pg[sortBy]","in":"query","schema":{"type":"string"},"description":"The value that will be used to sort returned entities by."},{"name":"pg[sortDir]","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"The sorting order. It accepts the ascending and descending direction specifiers."}],"responses":{"200":{"description":"Module logs retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"moduleLogs":{"type":"array","items":{"type":"object","properties":{"imtId":{"type":"string"},"executionId":{"type":"string"},"organizationId":{"type":"integer"},"teamId":{"type":"integer"},"scenarioId":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"status":{"type":"integer"},"bundles":{"type":"integer"},"size":{"type":"integer"},"warning":{"type":"object","description":"Present when status equals 2.","properties":{"message":{"type":"string"}}},"error":{"type":"object","description":"Present when status equals 3.","properties":{"message":{"type":"string"}}}}}},"pg":{"type":"object","properties":{"last":{"type":"string","description":"Shown only when using the `last` based pagination."},"showLast":{"type":"boolean","description":"Shown only when using the `last` based pagination."},"sortBy":{"type":"string"},"sortDir":{"type":"string"},"limit":{"type":"integer"},"offset":{"type":"integer","description":"Shown only when using the `offset` based pagination."}}}}}}}}}}}}}
```
