Skip to content

Category API

7 endpoints.

GEThttp://localhost:3000/api/categories

Get all the categories saved on the server.

Responses

200Categories
[
  {
    "archives": [
      "0d50858d727723d856d2ab78564bb8e906e65f14",
      "7f03b8b1f337e1e42b2c2890533c0de7479d41ca"
    ],
    "id": "SET_1613080290",
    "name": "My great category",
    "pinned": 0,
    "search": null
  }
]

Your own instance address. Requests go from this browser straight to it.

PUThttp://localhost:3000/api/categories

Create a new Category.

Request body

application/x-www-form-urlencoded, multipart/form-data

Responses

200Success response
{
  "category_id": "SET_1613080290",
  "operation": "create_category",
  "success": 0
}
400Error response
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

DELETEhttp://localhost:3000/api/categories/{id}

Responses

200Success response
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}
423The category ID is currently locked for modification
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

GEThttp://localhost:3000/api/categories/{id}

Get the details of the specified category ID.

Responses

200Category
{
  "archives": [
    "0d50858d727723d856d2ab78564bb8e906e65f14",
    "7f03b8b1f337e1e42b2c2890533c0de7479d41ca"
  ],
  "id": "SET_1613080290",
  "name": "My great category",
  "pinned": 0,
  "search": null
}

Your own instance address. Requests go from this browser straight to it.

PUThttp://localhost:3000/api/categories/{id}

Modify a Category.

Request body

application/x-www-form-urlencoded, multipart/form-data

Responses

200Success response
{
  "category_id": "SET_1613080290",
  "operation": "update_category",
  "success": 0
}
400Error response
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}
423The Category is currently locked for modification
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

DELETEhttp://localhost:3000/api/categories/{id}/{archive}

Remove an Archive ID from a Category.

Path parameters

idstring · min: 14 · max: 14 · patternrequired
Category ID to remove from.
archivestring · min: 40 · max: 40 · patternrequired
Archive ID to remove.

Responses

200Result
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}
423The category ID is currently locked for modification
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

PUThttp://localhost:3000/api/categories/{id}/{archive}

Adds the specified Archive ID (see Archive API) to the given Category.

Path parameters

idstring · min: 14 · max: 14 · patternrequired
Category ID to add to.
archivestring · min: 40 · max: 40 · patternrequired

Responses

200Result
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}
423The category ID is currently locked for modification
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.