Tasks
get/tasks/{id}

Request

  • Base URL: http://localhost:10998/api
  • URL: http://localhost:10998/api/tasks/{id}
  • Auth: none declared

Path parameters

idstring required

Unique task ID assigned by dstack server

Example:23a2c7a0-6c88-48ee-8028-b9ad9f6f5c24

Response

Task info

idstring required

Unique task ID assigned by dstack server

status'pending' | 'preparing' | 'pulling' | 'creating' | 'running' | 'terminated' required
termination_reason'executor_error' | 'creating_container_error' | 'container_exited_with_error' | 'done_by_runner' | 'terminated_by_user' | 'terminated_by_server' | 'max_duration_exceeded' required
termination_messagestring required

A shim-generated message or N last lines from the container logs

container_namestring required
container_idstring required
gpu_idsGpuID[] nullable required

An array of GPU identifiers or null if this information is not yet available

Example response

{
  "id": "23a2c7a0-6c88-48ee-8028-b9ad9f6f5c24",
  "status": "terminated",
  "ports": [
    {
      "host": 32770,
      "container": 80
    }
  ],
  "container_name": "horrible-mule-1-0-0-44f7cb95",
  "container_id": "a6bb8d4bb8af8ec72482ecd194ff92fac9974521aa5ad8a46abfc4f0ba858775",
  "gpu_ids": [
    "GPU-2b79666e-d81f-f3f8-fd47-9903f118c3f5"
  ]
}

Changes

    • info

      api tag Tasks added

    • warning

      added the new container_exited_with_error enum value to the response property for the response status

    • warning

      added the new creating_container_error enum value to the response property for the response status

    • warning

      added the new done_by_runner enum value to the response property for the response status

    • warning

      added the new executor_error enum value to the response property for the response status

    • warning

      added the new max_duration_exceeded enum value to the response property for the response status

    • warning

      added the new terminated_by_server enum value to the response property for the response status

    • warning

      added the new terminated_by_user enum value to the response property for the response status

    • info

      removed the CONTAINER_EXITED_WITH_ERROR enum value from the response property for the response status

    • info

      removed the CREATING_CONTAINER_ERROR enum value from the response property for the response status

    • info

      removed the DONE_BY_RUNNER enum value from the response property for the response status

    • info

      removed the EXECUTOR_ERROR enum value from the response property for the response status

    • info

      removed the TERMINATED_BY_SERVER enum value from the response property for the response status

    • info

      removed the TERMINATED_BY_USER enum value from the response property for the response status