intentic
Download the app
Download the app
The workspace

Run targets

The programs each repository declares, run on one of your own computers

On this page(6 sections)

A repository can declare programs that run on the owner's own machines rather than in the sandbox. One read lists what each repository declares and which of your computers could run one now; the other builds a target here, carries the build over and starts it there, in a terminal you can watch. The computer still decides whether it accepts programs this sandbox sends.

GET/runs/targetsWhat each repository can run on your computers

Every repository that declares run targets at `.intentic/run.json`, and which of your computers could run one now.

What you send

Nothing. Call it as it is.

What comes back

FieldType
reposobject[]
repostring
pathstring
targetsobject[]
namestring
descriptionstring
commandstring
devicestring
buildstring
artifactstring | object
programstring
argsstring[]
envobject
isolatedboolean
reachinteger[]
stopGraceSecondsinteger
errorstring
devicesobject[]
idstring
onlineboolean
programsboolean
allowedboolean
Try itanswered in this tab
curl
curl "$SANDBOX/runs/targets" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.runs.targets();
POST/runs/startRun a target on one of your computers

Builds it in the sandbox, carries the build to the computer and starts it there, in a terminal you can watch. A run of the same target already going there is stopped first. The computer still decides: its "Run programs this sandbox sends" switch has to be on.

What you send

FieldTypeWhere
reporequiredstringbody
targetrequiredstringbody
devicerequiredstringbody

What comes back

FieldType
sessionstring
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/runs/start" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"repo":"root","target":"…","device":"…"}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.runs.start({
  "repo": "root",
  "target": "…",
  "device": "…"
});
POST/runs/attachFollow a run on one of your computers in a terminal

Opens a terminal that follows a program already running on the computer: its last lines, then what it prints. Ctrl+C there stops it; Ctrl+D or closing the terminal leaves it running. A terminal of the target's still open there is answered instead.

What you send

FieldTypeWhere
reporequiredstringbody
targetrequiredstringbody
devicerequiredstringbody
idrequiredstringbody

What comes back

FieldType
sessionstring
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/runs/attach" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"repo":"root","target":"…","device":"…","id":"a1b2c3d4"}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.runs.attach({
  "repo": "root",
  "target": "…",
  "device": "…",
  "id": "a1b2c3d4"
});
GET/runs/activeWhat runs on one of your computers

The programs this sandbox started on the computer, running and ended, as the computer reports them.

What you send

FieldTypeWhere
devicerequiredstringquery

What comes back

FieldType
runsobject[]
devicestring
idstring
namestring
state"running" | "ended" | "unknown"
saidstring
exitCodeinteger
startedAtstring
endedAtstring
repostring
portsinteger[]
startedBystring
builtFromobject
commitstring
changedinteger
atstring
movedDuringBuildboolean
landsSinceinteger
terminalsobject[]
repostring
targetstring
sessionstring
errorstring
Try itanswered in this tab
curl
curl "$SANDBOX/runs/active?device=%E2%80%A6" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.runs.active({
  "device": "…"
});
POST/runs/stopStop a target's run on one of your computers

Ends the terminal it runs in and the program on the computer, with everything it started, and closes the ports the sandbox opened for it.

What you send

FieldTypeWhere
reporequiredstringbody
targetrequiredstringbody
devicerequiredstringbody
idstringbody

What comes back

FieldType
stoppedobject[]
idstring
textstring
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/runs/stop" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"repo":"root","target":"…","device":"…","id":"a1b2c3d4"}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.runs.stop({
  "repo": "root",
  "target": "…",
  "device": "…",
  "id": "a1b2c3d4"
});
GET/runs/outputWhat a run on one of your computers printed

The end of its log on the computer, or what it printed after an earlier read.

What you send

FieldTypeWhere
devicerequiredstringquery
idrequiredstringquery
sinceintegerquery
linesintegerquery

What comes back

FieldType
runobject
devicestring
idstring
namestring
state"running" | "ended" | "unknown"
saidstring
exitCodeinteger
startedAtstring
endedAtstring
repostring
portsinteger[]
startedBystring
builtFromobject
commitstring
changedinteger
atstring
movedDuringBuildboolean
landsSinceinteger
totalinteger
linesstring[]
Try itanswered in this tab
curl
curl "$SANDBOX/runs/output?device=%E2%80%A6&id=a1b2c3d4" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.runs.output({
  "device": "…",
  "id": "a1b2c3d4"
});
More in The workspace

Type to search every page, in the docs and the API reference.