Deployment Logs

View logs relating to the operation of a Deployment.

Deployment Logs assist clients in managing their Deployment.

Representations

DeploymentLog

The data representation of a Deployment log.

type
String
Can be "HTTP_REQUEST", "APPLICATION_TEXT", or "APPLICATION_JSON"
deploymentId
String

Unique identifier of the Deployment.

applicationName
String

Name of the Connect application.

severity

Severity of the log message.

Default: DEFAULT
timestamp

Timestamp of the log message.

details
Any

Event details of the log message.

Example: json
{
"type": "APPLICATION_TEXT",
"deploymentId": "ae4b0e53-c6b0-4d5d-9ba7-3e60496c17a1",
"applicationName": "service",
"severity": "DEFAULT",
"timestamp": "2023-03-15T11:05:01.912Z",
"details": {
"message": "Listening on port: 8080"
}
}

DeploymentLogCursorPagedQueryResponse

A cursor paged query result containing an array of DeploymentLog.

data
Array of DeploymentLog

Array of DeploymentLog objects.

next
String

The next page token.

DeploymentLogSeverity

The severity of the log message.

DEFAULT

The log entry has no assigned severity level.

DEBUG

Debug or trace information.

INFO

Routine information, such as ongoing status or performance.

NOTICE

Normal but significant events, such as start up, shut down, or a configuration change.

WARNING

Warning events might cause problems.

ERROR

Error events are likely to cause problems.

CRITICAL

Critical events cause more severe problems or outages.

ALERT

A person must take an action immediately.

EMERGENCY

One or more systems are unusable.

Query Deployment Logs

Query Deployment Logs by ID

GET
https://connect.{region}.commercetools.com/{projectKey}/deployments/{id}/logs

Retrieves logs for the given deployment.

OAuth 2.0 Scopes:
manage_project:{projectKey} , manage_connectors_deployments:{projectKey} , view_connectors_deployments:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

The Composable Commerce Project key.

id
String

id of the Deployment

Query parameters:
pageToken
String
applicationName
String

Filter results by a specific applicationName.

startDate

Filter results by defining a start date. This value can be up to 30 days in the past.

endDate

Filter results by defining an end date of the logs.

Response:
Request Example:cURL
curl --get https://connect.{region}.commercetools.com/{projectKey}/deployments/{id}/logs -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: DeploymentLogCursorPagedQueryResponsejson
{
"data": [
{
"type": "APPLICATION_TEXT",
"deploymentId": "ae4b0e53-c6b0-4d5d-9ba7-3e60496c17a1",
"applicationName": "cartExtension",
"severity": "DEFAULT",
"timestamp": "2023-03-15T11:05:01.912Z",
"details": {
"message": "Listening on port: 8080"
}
}
],
"next": "EAE4tNC3g73ogeEpSr4GIioiGgoYNjQxMWE2NmMwMDA4NDI2OTc1MDQ4YWIyKgwI7MzGoAYQq"
}

Query Deployment logs by Key

GET
https://connect.{region}.commercetools.com/{projectKey}/deployments/key={key}/logs

Retrieves logs for the given deployment.

OAuth 2.0 Scopes:
manage_project:{projectKey} , manage_connectors_deployments:{projectKey} , view_connectors_deployments:{projectKey}
Path parameters:
region
String

Region in which the Project is hosted.

projectKey
String

The Composable Commerce Project key.

key
String

key of the Deployment

Query parameters:
pageToken
String
applicationName
String

Filter results by a specific applicationName.

startDate

Filter results by defining a start date. This value can be up to 30 days in the past.

endDate

Filter results by defining an end date of the logs.

Response:
Request Example:cURL
curl --get https://connect.{region}.commercetools.com/{projectKey}/deployments/key={key}/logs -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: DeploymentLogCursorPagedQueryResponsejson
{
"data": [
{
"type": "APPLICATION_TEXT",
"deploymentId": "ae4b0e53-c6b0-4d5d-9ba7-3e60496c17a1",
"applicationName": "cartExtension",
"severity": "DEFAULT",
"timestamp": "2023-03-15T11:05:01.912Z",
"details": {
"message": "Listening on port: 8080"
}
}
],
"next": "EAE4tNC3g73ogeEpSr4GIioiGgoYNjQxMWE2NmMwMDA4NDI2OTc1MDQ4YWIyKgwI7MzGoAYQq"
}