NomadLog
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/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:
nomad_log, err := client.NomadLog(nil).Load(map[string]any{"app_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(nomad_log)
Lua
Construct client as shown in the Lua setup, then call the operations:
local nomad_log, err = client:NomadLog():load({ app_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$nomad_log = $client->NomadLog()->load(["app_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
nomad_log = client.NomadLog().load({"app_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
nomad_log = client.NomadLog.load({ "app_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const nomad_log = await client.NomadLog().load({ 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/logs
Operation ID: nomad_logs_api_v1_app_deployment_dashboard.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
app_id |
path |
string |
Yes | |
service |
query |
string |
No | Service id |
environment |
query |
string |
No | Environment id |
location |
query |
string |
No | Location code or name. |
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: The selectors match more than one service
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 |