v1

latestSwagger 2.02026-07-172964242.9 KB
Database

Get database task log

Returns the log of a particular task for a database.

get/v1/databases/{database_id}/tasks/{task_id}/log

Path parameters

database_idstring required

A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.

task_idstring uuid required

ID of the task to get the log for.

Query parameters

after_entry_idstring uuid

ID of the entry to start from.

limitinteger

Maximum number of entries to return.

Response

OK response.

database_idstring

The database ID of the task log. Deprecated: use entity_id instead.

entity_idstring required

The entity ID (database_id or host_id) that this task log belongs to.

last_entry_idstring

The ID of the last entry in the task log.

scope'database' | 'host' required

The scope of the task (database or host).

task_idstring required

The unique ID of the task log.

task_status'pending' | 'running' | 'completed' | 'failed' | 'unknown' | 'canceled' | 'canceling' required

The status of the task.

Example response

{
  "entity_id": "storefront",
  "entries": [
    {
      "message": "refreshing current state",
      "timestamp": "2025-06-18T17:53:19Z"
    },
    {
      "fields": {
        "duration_ms": 8972
      },
      "message": "finished refreshing current state (took 8.972080116s)",
      "timestamp": "2025-06-18T17:53:28Z"
    },
    {
      "fields": {
        "host_id": "host-1",
        "resource_id": "storefront-n1-689qacsi-backup",
        "resource_type": "swarm.pgbackrest_config"
      },
      "message": "creating resource swarm.pgbackrest_config::storefront-n1-689qacsi-backup",
      "timestamp": "2025-06-18T17:53:29Z"
    },
    {
      "fields": {
        "host_id": "host-2",
        "resource_id": "storefront-n2-9ptayhma-backup",
        "resource_type": "swarm.pgbackrest_config"
      },
      "message": "creating resource swarm.pgbackrest_config::storefront-n2-9ptayhma-backup",
      "timestamp": "2025-06-18T17:53:29Z"
    },
    {
      "fields": {
        "duration_ms": 383,
        "host_id": "host-3",
        "resource_id": "n3",
        "resource_type": "swarm.pgbackrest_stanza",
        "success": true
      },
      "message": "finished creating resource swarm.pgbackrest_stanza::n3 (took 383.568613ms)",
      "timestamp": "2025-06-18T17:54:02Z"
    },
    {
      "fields": {
        "duration_ms": 1181,
        "host_id": "host-1",
        "resource_id": "n1",
        "resource_type": "swarm.pgbackrest_stanza",
        "success": true
      },
      "message": "finished creating resource swarm.pgbackrest_stanza::n1 (took 1.181454868s)",
      "timestamp": "2025-06-18T17:54:03Z"
    }
  ],
  "last_entry_id": "0197842d-303b-7251-b814-6d12c98e7d25",
  "scope": "database",
  "task_id": "0197842c-7c4f-7a8c-829e-7405c2a41c8c",
  "task_status": "completed"
}