Canonical Job API
The Job API from Canonical — 7 operation(s) for job.
Operations 9
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“How does an agent ask the server for the next job on its queues?”
“What does an agent get back when no job is waiting on its queues?”
Tell an agent
Request the next available job for my agent's queues.
Fetch a job to run from the queues this agent supports.
Ask an LLM
“How do I submit a test job to a Testflinger queue?”
“Can I set a priority and a global timeout when I submit a job?”
Tell an agent
Submit a job to queue {job_queue}.
Queue job {name} on {job_queue} with priority {job_priority}.
Ask an LLM
“Can I find all jobs carrying a certain tag?”
“Which of my tagged jobs are still running?”
Tell an agent
Search for jobs tagged {tags}.
Find jobs matching {match} of tags {tags} in state {state}.
GET
/v1/job/{job_id}
Get a job's definition · Request the json job definition for a specified job, even if it has
#
Ask an LLM
“What did I submit as the definition of a job that already ran?”
“Can I see the provision and test data of a past job?”
Tell an agent
Show the job definition for {job_id}.
Get the submitted JSON of job {job_id}.
POST
/v1/job/{job_id}/action
Take an action on a job · Take action on the job status for a specified job ID
#
Ask an LLM
“How do I change the status of a job that is queued or running?”
“Which job actions does the server accept for a job ID?”
Tell an agent
Apply action {action} to job {job_id}.
Send the {action} action to job {job_id}.
POST
/v1/job/{job_id}/events
Forward job status events to a webhook · Post status updates from the agent to the server to be forwarded
#
Ask an LLM
“How does an agent push job status events to the webhook the user registered?”
“Can job events be forwarded to the configured status webhook?”
Tell an agent
Post events {events} for job {job_id} to webhook {job_status_webhook}.
Forward job {job_id} status updates to {job_status_webhook}.
GET
/v1/job/{job_id}/position
Get a job's place in the queue · Return the position of the specified jobid in the queue
#
Ask an LLM
“How many jobs are ahead of mine in the queue?”
“Has my queued job moved up yet?”
Tell an agent
Show the queue position of job {job_id}.
Tell me where job {job_id} sits in its queue.
GET
/v1/job/{job_id}/attachments
Download a job's attachments · Return the attachments bundle for a specified job_id
#
Ask an LLM
“Where can an agent download the files attached to a job?”
“Can I retrieve the attachment tarball I uploaded with a job?”
Tell an agent
Download the attachments bundle for job {job_id}.
Get the attachment tarball of job {job_id}.
POST
/v1/job/{job_id}/attachments
Upload a job's attachments · Post attachment bundle for a specified job_id
#
Ask an LLM
“How do I attach local files to a job I submitted?”
“Can I send an attachment bundle along with a test job?”
Tell an agent
Upload the attachments bundle for job {job_id}.
Attach this tarball to job {job_id}.
Documentation
Documentation
https://snapcraft.io/docs/reference/development/snapd-rest-api/
Documentation
https://ubuntu.com/landscape/docs
APIReference
https://documentation.ubuntu.com/landscape/reference/api/
Documentation
https://documentation.ubuntu.com/lxd/latest/rest-api/
APIReference
https://documentation.ubuntu.com/lxd/latest/api-extensions/
Documentation
https://ubuntu.com/security/api/docs
APIReference
https://ubuntu.com/security/api/spec.json
Documentation
https://documentation.ubuntu.com/pebble/
Documentation
https://canonical-testflinger.readthedocs-hosted.com/en/latest/
Documentation
https://documentation.ubuntu.com/anbox-cloud/
Specifications
Other Resources
HowTo
https://snapcraft.io/docs/how-to-guides/snap-development/use-the-rest-api/
ReleaseNotes
https://documentation.ubuntu.com/landscape/reference/release-notes/
Portal
https://ubuntu.com/landscape
SourceCode
https://github.com/canonical/lxd
Portal
https://canonical.com/lxd
Portal
https://ubuntu.com/security
SourceCode
https://github.com/canonical/pebble
SourceCode
https://github.com/canonical/testflinger
SourceCode
https://github.com/canonical/hardware-api
Portal
https://ubuntu.com/certified
SourceCode
https://github.com/canonical/identity-platform-api
SourceCode
https://github.com/canonical/test_observer
Portal
https://canonical.com/anbox-cloud
SourceCode
https://github.com/canonical/cos-registration-server