REST API áttekintés

API · v1.4.0

Imports

5 végpont. Az útvonalak a saját példánya /api/v1 címéhez képest értendők; a hitelesítést az áttekintő oldal írja le.

GET /workspaces/{workspace}/imports

List the workspace's imports, newest first

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

cursorquerystring

Opaque cursor taken from meta.next_cursor of the previous page; omit it for the first page.

limitqueryinteger

Page size.

Válaszok

  • 200
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

POST /workspaces/{workspace}/imports

Upload an Uptime Kuma SQLite database or 1.23 JSON backup and queue its analysis

The file must start like a SQLite database or a JSON document; anything else is a 422 on file. A workspace whose previous import has not finished (or was analysed but neither run nor deleted) gets a 409 problem of type urn:problem:import-in-progress.

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

Kéréstörzs

NévTípusLeírás
filekötelezőstring

Maximum file size: 262144 kilobytes.

historyboolean
pausedboolean

Válaszok

  • 202
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated
  • 422 Validation error

GET /workspaces/{workspace}/imports/{import}

Show an import with its report

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

importkötelezőpathstring

The import ID

Válaszok

  • 200
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

DELETE /workspaces/{workspace}/imports/{import}

Delete an import and its stored file

An import that is being analysed or run cannot be deleted (409 problem of type urn:problem:import-in-progress). The entities a completed run created stay.

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

importkötelezőpathstring

The import ID

Válaszok

  • 204 No content
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated

POST /workspaces/{workspace}/imports/{import}/run

Run an analysed import

Only an import in status analyzed can be run; any other status is a 409 problem of type urn:problem:import-not-analyzed.

Paraméterek

NévHelyTípusLeírás
workspacekötelezőpathstring

The workspace slug

importkötelezőpathstring

The import ID

Válaszok

  • 202
  • 404 Not found
  • 403 Authorization error
  • 401 Unauthenticated