API

AllocationLog

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/hosting/apps/{app_id}/deployment_dashboard/nomad/allocations/{allocation_id}/logs load Live Nomad task logs

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

allocation_log, err := client.AllocationLog(nil).Load(map[string]any{"allocation_id": "example", "app_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(allocation_log)

Lua

Construct client as shown in the Lua setup, then call the operations:

local allocation_log, err = client:AllocationLog():load({ allocation_id = "example", app_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$allocation_log = $client->AllocationLog()->load(["allocation_id" => "example", "app_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

allocation_log = client.AllocationLog().load({"allocation_id": "example", "app_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

allocation_log = client.AllocationLog.load({ "allocation_id" => "example", "app_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const allocation_log = await client.AllocationLog().load({ allocation_id: "example", app_id: "example" })

Fields

Field Type Required Description
allocation_id string Yes Allocation Id
environment string No Environment
fetched_at string Yes Fetched At
location one,string,null No Location
logs string Yes Logs
namespace string Yes Namespace
offset integer Yes Offset
origin string Yes Origin
service string No Service
task string Yes Task
type string Yes Type

load

GET /api/v1/hosting/apps/{app_id}/deployment_dashboard/nomad/allocations/{allocation_id}/logs

Operation ID: get_api_v1_hosting_apps_app_id_deployment_dashboard_nomad_allocations_allocation_id_logs.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
app_id path string Yes
allocation_id path string Yes
task query string No
type query enum: stdout, stderr No
origin query enum: start, end No
offset query integer No

Responses

200: Live Nomad task logs

application/json

Property Type Required Description
allocation_id string Yes
environment string No
fetched_at string (date-time) Yes
location string No
logs string Yes
namespace string Yes
offset integer Yes
origin enum: start, end Yes
service string No
task string Yes
type enum: stdout, stderr Yes
400: Invalid task or log options -- including a task name the allocation does not have

application/json

Property Type Required Description
error string Yes
401: Unauthorized
403: Forbidden
404: The app, allocation, or selector names nothing

application/json

Property Type Required Description
error string Yes
410: Nomad no longer holds the allocation, so its logs are gone

application/json

Property Type Required Description
error string Yes
422: Unprocessable entity
502: Nomad request failed

application/json

Property Type Required Description
error string Yes