Zum Inhalt springen

REST-API: Store

Als Markdown ansehen

Erzeugt aus dem OpenAPI-Dokument des Daemons. Konventionen, Anmeldung, der CSRF-Header und der WebSocket stehen unter API.

Administrators only. The Store’s settings with the next check time, every catalog with its status, and the newer versions of installed apps. The topic store/admin carries the same and its changes.

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Administrators only. The apps of the enabled catalogs (or of one, by its id) at the newest version this box can run, whose id, name, description or author contains q.

Parameter

Name Ort Typ Pflicht Beschreibung
catalog query string nein
q query string nein

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Administrators only. Adds a custom catalog (unsigned, shown as unverified) by its repository URL: https:// for a public one, which is fetched at once as a job, or SSH (git@host:owner/repository.git) for a private one, for which the box makes a deploy key; add its public key to the repository and fetch the catalog then.

Anfrage-Body: application/json: AddCatalogRequest

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Administrators only. A catalog app’s detail page: its newest version for this box with the manifest, screenshots, homepage, the link to its source in the catalog, and every published version.

Parameter

Name Ort Typ Pflicht Beschreibung
catalog path string ja
appId path string ja

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

GET /api/store/catalogs/{catalog}/apps/{appId}/{version}/icon

Abschnitt betitelt „GET /api/store/catalogs/{catalog}/apps/{appId}/{version}/icon“

Administrators only. The icon of a catalog app’s version, checked against the index, with Content-Security-Policy: default-src ‘none’; sandbox and nosniff.

Parameter

Name Ort Typ Pflicht Beschreibung
catalog path string ja
appId path string ja
version path string ja
name query string nein

Antworten

  • 200: image/svg+xml: string (byte)

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

POST /api/store/catalogs/{catalog}/apps/{appId}/{version}/package

Abschnitt betitelt „POST /api/store/catalogs/{catalog}/apps/{appId}/{version}/package“

Administrators only. Takes a catalog app’s version from the box’s verified copy, checks it like an uploaded package plus the index’s hashes and images (store.package.hash_mismatch), the box’s version (app.package.box_too_old) and, for an older version, the same dataVersion (app.package.downgrade_unsupported), and keeps it for 15 minutes. Install it with POST /api/apps/packages/{packageId}/install.

Parameter

Name Ort Typ Pflicht Beschreibung
catalog path string ja
appId path string ja
version path string ja

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

GET /api/store/catalogs/{catalog}/apps/{appId}/{version}/screenshots/{name}

Abschnitt betitelt „GET /api/store/catalogs/{catalog}/apps/{appId}/{version}/screenshots/{name}“

Administrators only. A screenshot of a catalog app’s version (PNG, JPEG or WebP), checked against the index, with Content-Security-Policy: default-src ‘none’; sandbox and nosniff.

Parameter

Name Ort Typ Pflicht Beschreibung
catalog path string ja
appId path string ja
version path string ja
name path string ja

Antworten

  • 200: image/png: string (byte)

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Administrators only. Switches a catalog on (it is fetched at once) or off, or sets (user:token) or removes (empty) the read token for its private images.

Parameter

Name Ort Typ Pflicht Beschreibung
key path integer (int64) ja

Anfrage-Body: application/json: UpdateCatalogRequest

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Administrators only. Removes a custom catalog and its copy; apps installed from it stay and get no more updates from it. The project’s catalogs can only be switched off (store.catalog.built_in).

Parameter

Name Ort Typ Pflicht Beschreibung
key path integer (int64) ja

Antworten

  • 204

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Administrators only. Fetches one catalog now as a job. A failure keeps the last verified copy and is shown with the catalog.

Parameter

Name Ort Typ Pflicht Beschreibung
key path integer (int64) ja

Antworten

  • 202: application/json: Job

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Administrators only. Checks now as a job: fetches every enabled catalog, then installs automatic updates and announces the others, as the daily check does.

Antworten

  • 202: application/json: Job

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.

Administrators only. Sets the update policy (automatic, notify, none), the daily check time (HH:mm in the box’s time zone; the box adds its own delay of up to an hour) and the channel (stable reads each catalog’s branch catalog, beta its branch catalog-next). A new channel fetches every catalog at once.

Anfrage-Body: application/json: StoreSettingsRequest

Antworten

Jeder Fehler antwortet mit Problem Details (application/problem+json) und einem stabilen Code aus der Fehlerreferenz.