Your submission was sent successfully! Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

API Endpoints: Snaps

POST /snaps

Perform actions on snaps by computer IDs.

Required parameters:

  • action: The action to perform for the provided snaps.
  • computer_ids: The numerical IDs of the computers.
  • snaps: An array of snaps to perform the action(s) on.

Optional parameters:

  • deliver_after
  • deliver_after_window

Example request:

curl -X POST   -H "Authorization: Bearer $JWT"   -d '{
	"action": "install",
	"computer_ids": [23],
	"snaps": [
    	{"name": "hello"},
    	{"name": "spotify"}
	]
  }'   https://landscape.canonical.com/api/v2/snaps

Example output:

{
  "id": 214,
  "creation_time": "2024-04-10T23:29:25Z",
  "creator": {
	"name": "John Allen Smith",
	"email": "john@example.com",
	"id": 1
  },
  "type": "ActivityGroup",
  "summary": "Install snaps on computer",
  "completion_time": null,
  "parent_id": null,
  "deliver_delay_window": 0,
  "result_text": null,
  "result_code": null,
  "activity_status": "undelivered"
}

This page was last modified 4 months ago. Help improve this document in the forum.