Tags

Note

The Tags API can currently only be used by Administrator users.

Listing Tags

GET /api2/tags
Query Parameters:
 
  • display_name (optional) – Filter for a tag by display name. It must be an exact match to be returned.
  • id (optional) – Filter for a tag by its unique id.

Example Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "items" : [
    {
      "display_name": "biology",
      "id": "101",
    },
    {
      "display_name": "evolution",
      "id": "102",
    },
    {
      "display_name": "darwin",
      "id": "103",
    },
    {
      "display_name": "jurassic",
      "id": "104",
    },
  ]
}

Fetching a Tag

GET /api2/tags/(tag_id)

Fetch an individual tag by its unique ID.

Example Response:

HTTP/1.1 200 OK
Content-type: application/json

{
   "display_name": "jurassic",
   "id": "104",
}

Creating a Tag

POST /api2/tags

Add a new tag.

Json Parameters:
 
  • display_name (required) – The user-facing name for this tag.

Example Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Location: /api2/tags/106

{
  "display_name": "algorithm",
  "id": "106",
}

Updating a Tag

POST /api2/tags/(tag_id)
Json Parameters:
 
  • display_name (required) – Updates the tag’s display name.

Deleting a Tag(s)

DELETE /api2/tags/(tag_id1),(tag_id2),... (tag_idn)

Delete a tag (tags).

This endpoint is idempotent; attempting to delete a tag that does not exist will return a successful response.

Example Response:

HTTP/1.1 204 No Content

Previous topic

Media Files

Next topic

Users

This Page