All docsStellar LinkRF bench · by Stellar Systems v0.4.0

API Reference

Campaigns

Campaigns: sequences of scenarios and their executions

GET/api/v1/campaign-runs

List runs#

List campaign executions.

Returns every recorded campaign execution, finished or not, with its position in the campaign, its step attempts and its verdict. Execution state is persistent and survives a restart of the device.

Responses

200OKapplication/json

array of CampaignStateDRO

idrequired

string

campaignrequired

string

statusrequired

string

cursorrequired

integer

≥ 0

total_stepsrequired

integer

≥ 0

verdict

boolean · nullable

true / false / null. null until the campaign has finished: a campaign that did not run to completion has no verdict.

pause_requestedrequired

boolean

A pause is asked for and has not yet taken effect.

attemptsrequired

array of AttemptDRO

AttemptDRO · 5 fields
steprequired

string

outcomerequired

string

run_id

string · nullable

detailrequired

string

at_uptime_msrequired

integer · int64

Milliseconds since the daemon started, not since the epoch. The device has no real-time clock, so this is not a wall-clock time.

≥ 0

started_at_uptime_msrequired

integer · int64

≥ 0

Request

curl "http://192.168.2.1:8080/api/v1/campaign-runs"

Response

[
  {
    "id": "string",
    "campaign": "string",
    "status": "string",
    "cursor": 0,
    "total_steps": 0,
    "verdict": true,
    "pause_requested": true,
    "attempts": [
      {
        "step": "string",
        "outcome": "string",
        "run_id": "string",
        "detail": "string",
        "at_uptime_ms": 0
      }
    ],
    "started_at_uptime_ms": 0
  }
]
GET/api/v1/campaign-runs/{id}

Get run#

Get a campaign execution.

verdict is null until the campaign has finished: a campaign that did not run to completion has no verdict. Attempt times count from daemon start, not wall-clock time.

Path parameters

idrequired

string

Execution id

Responses

200OKapplication/json
idrequired

string

campaignrequired

string

statusrequired

string

cursorrequired

integer

≥ 0

total_stepsrequired

integer

≥ 0

verdict

boolean · nullable

true / false / null. null until the campaign has finished: a campaign that did not run to completion has no verdict.

pause_requestedrequired

boolean

A pause is asked for and has not yet taken effect.

attemptsrequired

array of AttemptDRO

AttemptDRO · 5 fields
steprequired

string

outcomerequired

string

run_id

string · nullable

detailrequired

string

at_uptime_msrequired

integer · int64

Milliseconds since the daemon started, not since the epoch. The device has no real-time clock, so this is not a wall-clock time.

≥ 0

started_at_uptime_msrequired

integer · int64

≥ 0

404Not foundapplication/json

ApiErrorDRO

Request

curl "http://192.168.2.1:8080/api/v1/campaign-runs/<id>"

Response

{
  "id": "string",
  "campaign": "string",
  "status": "string",
  "cursor": 0,
  "total_steps": 0,
  "verdict": true,
  "pause_requested": true,
  "attempts": [
    {
      "step": "string",
      "outcome": "string",
      "run_id": "string",
      "detail": "string",
      "at_uptime_ms": 0
    }
  ],
  "started_at_uptime_ms": 0
}
POST/api/v1/campaign-runs/{id}/pause

Pause#

Pause a campaign execution.

The pause takes effect at the next step boundary: the step in progress runs to completion. Returns 202 with pause_requested: true until the pause has taken effect.

Path parameters

idrequired

string

Execution id

Responses

202Pause requested — it takes effect at the next step boundaryapplication/json
idrequired

string

campaignrequired

string

statusrequired

string

cursorrequired

integer

≥ 0

total_stepsrequired

integer

≥ 0

verdict

boolean · nullable

true / false / null. null until the campaign has finished: a campaign that did not run to completion has no verdict.

pause_requestedrequired

boolean

A pause is asked for and has not yet taken effect.

attemptsrequired

array of AttemptDRO

AttemptDRO · 5 fields
steprequired

string

outcomerequired

string

run_id

string · nullable

detailrequired

string

at_uptime_msrequired

integer · int64

Milliseconds since the daemon started, not since the epoch. The device has no real-time clock, so this is not a wall-clock time.

≥ 0

started_at_uptime_msrequired

integer · int64

≥ 0

404Not foundapplication/json

ApiErrorDRO

Request

curl -X POST "http://192.168.2.1:8080/api/v1/campaign-runs/<id>/pause"

Response

{
  "id": "string",
  "campaign": "string",
  "status": "string",
  "cursor": 0,
  "total_steps": 0,
  "verdict": true,
  "pause_requested": true,
  "attempts": [
    {
      "step": "string",
      "outcome": "string",
      "run_id": "string",
      "detail": "string",
      "at_uptime_ms": 0
    }
  ],
  "started_at_uptime_ms": 0
}
POST/api/v1/campaign-runs/{id}/resume

Resume#

Resume a campaign execution.

Continues the execution in the background from the step where it stopped, and returns 202. Refused with 409 when the execution has already finished or another campaign is running.

Path parameters

idrequired

string

Execution id

Responses

202Acceptedapplication/json
idrequired

string

campaignrequired

string

statusrequired

string

cursorrequired

integer

≥ 0

total_stepsrequired

integer

≥ 0

verdict

boolean · nullable

true / false / null. null until the campaign has finished: a campaign that did not run to completion has no verdict.

pause_requestedrequired

boolean

A pause is asked for and has not yet taken effect.

attemptsrequired

array of AttemptDRO

AttemptDRO · 5 fields
steprequired

string

outcomerequired

string

run_id

string · nullable

detailrequired

string

at_uptime_msrequired

integer · int64

Milliseconds since the daemon started, not since the epoch. The device has no real-time clock, so this is not a wall-clock time.

≥ 0

started_at_uptime_msrequired

integer · int64

≥ 0

409Finished, or another campaign is runningapplication/json

ApiErrorDRO

Request

curl -X POST "http://192.168.2.1:8080/api/v1/campaign-runs/<id>/resume"

Response

{
  "id": "string",
  "campaign": "string",
  "status": "string",
  "cursor": 0,
  "total_steps": 0,
  "verdict": true,
  "pause_requested": true,
  "attempts": [
    {
      "step": "string",
      "outcome": "string",
      "run_id": "string",
      "detail": "string",
      "at_uptime_ms": 0
    }
  ],
  "started_at_uptime_ms": 0
}
POST/api/v1/campaign-runs/{id}/steps/{step}/rerun

Rerun step#

Re-run one step of a campaign execution.

Runs the named step again and waits for it to finish; the reply carries the new attempt appended to the execution. Refused with 409 while the campaign is running.

Path parameters

idrequired

string

Execution id

steprequired

string

Step id, as the campaign names it

Responses

200OKapplication/json
idrequired

string

campaignrequired

string

statusrequired

string

cursorrequired

integer

≥ 0

total_stepsrequired

integer

≥ 0

verdict

boolean · nullable

true / false / null. null until the campaign has finished: a campaign that did not run to completion has no verdict.

pause_requestedrequired

boolean

A pause is asked for and has not yet taken effect.

attemptsrequired

array of AttemptDRO

AttemptDRO · 5 fields
steprequired

string

outcomerequired

string

run_id

string · nullable

detailrequired

string

at_uptime_msrequired

integer · int64

Milliseconds since the daemon started, not since the epoch. The device has no real-time clock, so this is not a wall-clock time.

≥ 0

started_at_uptime_msrequired

integer · int64

≥ 0

409The campaign is runningapplication/json

ApiErrorDRO

Request

curl -X POST "http://192.168.2.1:8080/api/v1/campaign-runs/<id>/steps/<step>/rerun"

Response

{
  "id": "string",
  "campaign": "string",
  "status": "string",
  "cursor": 0,
  "total_steps": 0,
  "verdict": true,
  "pause_requested": true,
  "attempts": [
    {
      "step": "string",
      "outcome": "string",
      "run_id": "string",
      "detail": "string",
      "at_uptime_ms": 0
    }
  ],
  "started_at_uptime_ms": 0
}
GET/api/v1/campaigns

List#

List campaigns.

Returns every campaign loaded on the device, with its step count, tags and schedule when it has one. Campaign routes return 501 when the device has no persistent storage configured for campaigns.

Responses

200OKapplication/json

array of CampaignSummaryDRO

namerequired

string

display_name

string · nullable

descriptionrequired

string

stepsrequired

integer

≥ 0

cron

string · nullable

The cron expression, when this campaign schedules itself.

tagsrequired

array of string

Request

curl "http://192.168.2.1:8080/api/v1/campaigns"

Response

[
  {
    "name": "string",
    "display_name": "string",
    "description": "string",
    "steps": 0,
    "cron": "string",
    "tags": [
      "string"
    ]
  }
]
GET/api/v1/campaigns/active

Active#

Get the active campaign.

Returns the campaign execution in progress, or active: null when none is, together with a description of who would carry out a board action (such as a power cycle) requested by a campaign step.

Responses

200OKapplication/json
active

ActiveDRO · nullable

ActiveDRO · 5 fields
idrequired

string

campaignrequired

string

cursorrequired

integer

≥ 0

totalrequired

integer

≥ 0

pausingrequired

boolean

board_providerrequired

string

Who would perform a board action (such as a power cycle) requested by a campaign step, in words.

Request

curl "http://192.168.2.1:8080/api/v1/campaigns/active"

Response

{
  "active": {
    "id": "string",
    "campaign": "string",
    "cursor": 0,
    "total": 0,
    "pausing": true
  },
  "board_provider": "string"
}
GET/api/v1/campaigns/{name}

Get one#

Get a campaign.

Returns the full campaign document: metadata, steps, pass criteria and schedule.

Path parameters

namerequired

string

Campaign identifier

Responses

200The campaign document
404Not foundapplication/json

ApiErrorDRO

Request

curl "http://192.168.2.1:8080/api/v1/campaigns/<name>" \
  -o response.bin

Response

{}
POST/api/v1/campaigns/{name}/run

Run#

Start a campaign.

Starts the named campaign in the background and returns its execution state with 202. Only one campaign runs at a time: a start while another campaign is running is refused with 409. Follow progress with GET /api/v1/campaign-runs/{id}.

Path parameters

namerequired

string

Campaign to run

Responses

202Acceptedapplication/json
idrequired

string

campaignrequired

string

statusrequired

string

cursorrequired

integer

≥ 0

total_stepsrequired

integer

≥ 0

verdict

boolean · nullable

true / false / null. null until the campaign has finished: a campaign that did not run to completion has no verdict.

pause_requestedrequired

boolean

A pause is asked for and has not yet taken effect.

attemptsrequired

array of AttemptDRO

AttemptDRO · 5 fields
steprequired

string

outcomerequired

string

run_id

string · nullable

detailrequired

string

at_uptime_msrequired

integer · int64

Milliseconds since the daemon started, not since the epoch. The device has no real-time clock, so this is not a wall-clock time.

≥ 0

started_at_uptime_msrequired

integer · int64

≥ 0

404Not foundapplication/json

ApiErrorDRO

409Another campaign is runningapplication/json

ApiErrorDRO

Request

curl -X POST "http://192.168.2.1:8080/api/v1/campaigns/<name>/run"

Response

{
  "id": "string",
  "campaign": "string",
  "status": "string",
  "cursor": 0,
  "total_steps": 0,
  "verdict": true,
  "pause_requested": true,
  "attempts": [
    {
      "step": "string",
      "outcome": "string",
      "run_id": "string",
      "detail": "string",
      "at_uptime_ms": 0
    }
  ],
  "started_at_uptime_ms": 0
}

↑↓ to moveEnter to open