GET/compute/kindsmember
The Ipnops Compute kinds each Living Worlds area calls (climate, driving, robots, cities, health, agents, worlds3d, physics, games, twins), each with its parameters, inputs and outputs, and the machines serving it now. compute_allowed says whether this project may submit jobs (added in contract version 1, additive): a project not listed by the operator is refused with 403 on submission.
POST/compute/filesmember
Upload an input file for a compute job (the body is the file, up to 200 MB); returns its id. Kept by the service for 7 days.
Query
POST/compute/jobsmember
Start one compute kind. Parameters are checked against the kind's declared types before it is sent; inputs are files this project uploaded. Needs the project in LW_COMPUTE_TENANTS.
Body
kind | a kind from GET /compute/kinds |
params | {name: value} |
inputs | {input: file id} |
max_seconds | 60..21600, default 3600 |
idempotency_key | the same key returns the same job |
pool | a pool id, default the Ipnops fleet |
webhook | optional: an https address of this project's, called when the job ends, signed with the project's compute webhook secret (set it first with POST /compute/webhook-secret; see the note compute_webhooks) |
POST/compute/estimatemember
What one compute job would cost at most, with nothing started (added in contract version 1, additive). The body is a submit's without files: kind, params (checked against the kind's declared types), max_seconds, pool; the core passes it to the compute service's estimate and returns { estimate: { kind, dimension (gpu_seconds or cpu_seconds), max_seconds, compute_units, minutes, typical (null: no measured duration is held), basis, starts_nothing, billed: false }, units } where units says what compute_units, minutes and max_seconds are. An upper bound, not a prediction. The same gate as POST /compute/jobs: the project must be in LW_COMPUTE_TENANTS (403 otherwise); 503 with the reason when the compute side is not connected (IPNOPS_COMPUTE_KEY).
Body
kind | a kind from GET /compute/kinds, e.g. lw.life_run |
params | {name: value} |
max_seconds | 60..21600 (default 3600) |
pool | optional |
GET/compute/jobs/:idmember
A job this project started: state, progress, result and its outputs' sizes. wait_s keeps reading it, every few seconds, up to that many seconds (600 at most) and answers when it ends.
Query
GET/compute/jobs/:id/outputs/:namemember
One output of a finished job: as JSON { name, size, base64 } up to 20 MB, or with raw=1 its bytes streamed from Ipnops with no cap beyond Ipnops' own, with content-type, content-length and x-sha256 (a Range header is passed on; added in contract version 1, additive).
Query
raw | 1: the bytes, not JSON |
GET/compute/jobsmember
This project's compute jobs, newest first, a page at a time: { jobs: [ { id, kind, created_by, created_at, webhook } ], next_cursor } (null at the end). live=1 adds each job of the page as Ipnops shows it now (state, progress, outputs, served_by, usage), or live_error. A removed job is not listed (added in contract version 1, additive).
Query
limit | 1..100, default 50 |
after | the next_cursor of the page before |
live | 1: each job's state from Ipnops |
GET/compute/jobs/:id/eventsmember
A job of this project's events as Ipnops streams them (server-sent events: queued, started, progress, done, failed, cancelled), passed on as they come; the stream ends when the job has ended. after, or a Last-Event-ID header, resumes after that event (added in contract version 1, additive).
Query
after | the id of the last event seen |
POST/compute/jobs/:id/cancelmember
Cancel a job of this project at Ipnops; answers { job } as it stands after. A job that has ended is answered as it is (added in contract version 1, additive).
DELETE/compute/jobs/:idmember
Remove a job of this project: cancelled first when it has not ended, then each of its output files deleted at Ipnops where Ipnops allows (a held file stays and is named with the reason). Answers { removed, cancelled, state, outputs: { name: { file, deleted, reason? } }, note }; the job is then gone from every route of this project. Ipnops keeps its own record of the job, and the job's inputs are the project's files (DELETE /compute/files/:id) (added in contract version 1, additive).
GET/compute/files/:idmember
A file this project uploaded, as its bytes from Ipnops (content-type, content-length, x-sha256; a Range header is passed on). Another project's file is a 404 (added in contract version 1, additive).
DELETE/compute/files/:idmember
Delete a file this project uploaded, at Ipnops and here: 409 while a job or a hold keeps it; a file Ipnops no longer has (uploads are kept 7 days) is removed here with a note. Another project's file is a 404 (added in contract version 1, additive).
POST/compute/webhook-secretadmin
Make or replace this project's compute webhook secret (whsec_ and base64), answered once and never shown again; the old one stops at once. Every webhook of the project's compute jobs is signed with it: see the note compute_webhooks (added in contract version 1, additive).
DELETE/compute/webhook-secretadmin
Remove this project's compute webhook secret: a job that names a webhook is then refused until a secret is set again (added in contract version 1, additive).
POST/compute/pipelines/:namemember
Kinds chained: drive (carla.drive, then drive.plan from its camera and path: the plan beside the path driven) or voice (speech.say, speech.transcribe with the word error rate, face.animate).
Body
map | drive |
weather | drive |
frames | drive |
traffic | drive |
seed | drive |
at_s | drive |
text | voice |
voice | voice |
language | voice |
identity | voice |
face | voice: false to skip the face |
pool | a pool id |