Skip to content

Fetch details of a tag

get/api/tag/:id
Returns a tag details for the given tag ID.

Request

Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.Example: Authorization: Bearer <token>

Router Params

idnumber
required
ID of the tag.

Response

Schema: application/json
codestring
dataITagModel[]
messagestring
ITagModel
ts
export interface ITagModel {
  id: number
  author_id: number
  name: string

  author?: IUserModel
  bookmarks?: IBookmarkModel[]
}
export interface ITagModel {
  id: number
  author_id: number
  name: string

  author?: IUserModel
  bookmarks?: IBookmarkModel[]
}

Body application/json

json
// SUCCESS

{
  "code": "0",
  "data": {
    "id": 1,
    "author_id": 1,
    "name": "Tag name"
  },
  "message": "Ok"
}
// SUCCESS

{
  "code": "0",
  "data": {
    "id": 1,
    "author_id": 1,
    "name": "Tag name"
  },
  "message": "Ok"
}
json
// TAG_NOT_FOUND

{
  "code": "401",
  "message": "Tag not found"
}
// TAG_NOT_FOUND

{
  "code": "401",
  "message": "Tag not found"
}