Skip to main content
GET/api/management/projects/{projectId}/blocks/{blockId}/{branchId}/versions/{version}/logs?dataCenter=hq

Parameters

NameParameter typeTypeFormatDescription
projectId(required)pathstring-The project identifier found in the project overview screen of the management console.
blockId(required)pathstring-The block identifier
branchId(required)pathstring-The branch identifier
version(required)pathstring-A label of either live or latest, or a valid version number.
dataCenter(required)querystring-The name of the data center to view block logs in
includeTimestampsqueryboolean-Whether or not to include system timestamps in block logs
previousqueryboolean-Whether or not to show the last terminated container's logs
linesquerynumberintegerThe number of log lines to return
sinceSecondsquerynumberintegerReturn logs since the specified number of seconds

Responses

HTTP status codeReasonModel
200Success
401UnauthorizedError
403ForbiddenError
422Validation errorError
500Internal server errorError

Examples

Get the container logs of a block

HTTP
GET: /api/management/projects/movieDb/blocks/movielisting/main/versions/5/logs?dataCenter=manchester

Get logs occurred since the last 10 seconds

HTTP
GET: /api/management/projects/movieDb/blocks/movielisting/main/versions/5/logs?dataCenter=manchester&since=10

Include timestamps in the logs

HTTP
GET: /api/management/projects/movieDb/blocks/movielisting/main/versions/5/logs?dataCenter=manchester&includeTimestamps=true

Return the last 500 log lines

HTTP
GET: /api/management/projects/movieDb/blocks/movielisting/main/versions/5/logs?dataCenter=london&lines=500

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request