Skip to content

Tags

Projects

GET /projects/:id/tags

Get tags list by type

Params:

  • type - String required any of:
    • images
    • figures

Response:

[
  {
    "id": 1,
    "projectId": 1,
    "title": "bad",
    "createdBy": 1,
    "hotkey": "",
    "createdAt": "2018-04-09T18:56:17.273Z",
    "updatedAt": "2018-04-10T13:58:49.947Z"
  },
  {
    "id": 2,
    "projectId": 1,
    "title": "good",
    "createdBy": 1,
    "hotkey": "",
    "createdAt": "2018-04-09T18:56:17.273Z",
    "updatedAt": "2018-04-10T13:58:49.947Z"
  }
]

POST /projects/:id/tags

Create tag by type

Params:

  • type - String required any of:
    • images
    • figures

Example:

{
  "type": "images",
  "title": "good",
  "hotkey": "G"
}

Response:

{
  "id": 1
}

PUT /projects/:projectId/tags/:id

Update tag by id and type

Params:

  • type - String required any of:
    • images
    • figures

Example:

{
  "type": "images",
  "title": "bad",
  "hotkey": "B"
}

Response:

{
  "success": true
}

DELETE /projects/:projectId/tags/:id

Delete tag by id and type

Params:

  • type - String required any of:
    • images
    • figures

Example:

?type=images

Response:

{
  "success": true
}