Skip to main content
Browse Documentation
HTTP - Management

Get block logsBeta

Created by zengenti, last updated 30 Sep 2021

Gets the container logs for a running block.

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

Parameters

NameParameter typeTypeFormatDescriptionExampleRequired
projectIdpathstringThe project identifier found in the project overview screen of the management consolemovieDbtrue
blockIdpathstringThe block identifiermovie-listingtrue
branchIdpathstringThe branch identifiermaintrue
versionpathstringA label of either live or latest, or a valid version number.4true
dataCenterquerystringThe name of the data center to view block logs inhq, manchester, londontrue
includeTimestampsquerybooleanWhether or not to include system timestamps in block logsfalse
previousquerybooleanWhether or not to show the last terminated container's logsfalse
linesquerynumberintegerThe number of log lines to returnfalse
sinceSecondsquerynumberintegerReturn logs since the specified number of secondsfalse

Examples

Get the container logs of a block

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

Get logs occurred since the last 10 seconds

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

Include timestamps in the logs

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

Return the last 500 log lines

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

Responses

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