album.delete

bearer

Delete a folder

Moves the folder's photos to the default folder, re-renders exactly those, and soft-deletes the folder. Returns the recrop job id; job_id 0 means the folder was empty (no recrop). The default folder cannot be deleted.

Parameters

Passed by name in the params object.

Name Type Required Description
id string yes Image UUID

Result

Returns jobResult:

Field Type Description
job_id * integer

Errors

Code Message When
2001 not_found No such resource owned by the caller.
1003 forbidden Not the owner, or outside a token's scope.

See the error reference for the full catalog, including the authentication codes.

Example

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "album.delete",
  "params": {
    "id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "job_id": 4242
  }
}

curl

curl -s https://peinture.gumeniuk.com/rpc \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"album.delete","params":{"id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"}}'

JavaScript

const res = await fetch("https://peinture.gumeniuk.com/rpc", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${token}`,
  },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 1, method: "album.delete", params: {"id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"},
  }),
});
const { result, error } = await res.json();

Go

body := []byte(`{"jsonrpc":"2.0","id":1,"method":"album.delete","params":{"id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"}}`)
req, _ := http.NewRequest("POST", "https://peinture.gumeniuk.com/rpc", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)

Try it

Sends a real request to /rpc from your browser. Paste a bearer token above — a JWT access token or a personal access token (pnt_…).