Getting started
Back to home
Getting started

Read deployment logs

Read a build or deployment log in chunks of up to 32,768 characters. Pass nextCursor back as cursor to continue.

GET/api/customer/v1/projects/{projectId}/deployments/{deploymentId}/logs

Path parameters

NameValue
projectIdRequired resource ID from an earlier API response.
deploymentIdRequired resource ID from an earlier API response.

Query parameters

NameTypeRequiredLimits
cursorstringNoSee schema
limitintegerNoMinimum 1; Maximum 32768

Example request

Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.

curl --request GET "$HCODE_BASE_URL/api/customer/v1/projects/${PROJECT_ID}/deployments/${DEPLOYMENT_ID}/logs" \
  --header "Authorization: Bearer $HCODE_API_KEY"

Response

The JSON shape is defined in the response schema.

Response schema
{
  "type": "object",
  "properties": {
    "logs": {
      "type": "string"
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "truncated": {
      "type": "boolean"
    }
  },
  "required": [
    "logs",
    "nextCursor",
    "truncated"
  ],
  "additionalProperties": true
}

See errors and retries for failure responses.