pydo.apps.get_logs_active_deployment()

Description

Retrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id.

Parameters

Name Type Required Description Default Value
app_id string True The app ID
component_name string True An optional component name. If set, logs will be limited to this component only.
follow boolean False Whether the logs should follow live updates.
type string True The type of logs to retrieve
- BUILD: Build-time logs
- DEPLOY: Deploy-time logs
- RUN: Live run-time logs
- RUN_RESTARTED: Logs of crashed/restarted instances during runtime
UNSPECIFIED
pod_connection_timeout string False An optional time duration to wait if the underlying component instance is not immediately available. Default: 3m.

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

get_resp = client.apps.get_logs_active_deployment(app_id="a6adf840", component_name="component")

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON object with urls that point to archived logs

Click to expand an example response for logs.
{
  "value": {
    "live_url": "https://logs-example/build.log",
    "url": "https://logs/build.log",
    "historic_logs": [
      "https://logs-example/archive/build.log"
    ]
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}