Skip to content

Fetch details of a bookmark

get/api/bookmark/:id
Returns a bookmark details for the given bookmark 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 bookmark.

Response

Schema: application/json
codestring
dataIBookmarkModel
messagestring
IBookmarkModel
ts
export interface IBookmarkModel {
  id: number
  author_id: number
  collection_id: number
  name: string
  url: string
  description: string
  icon: string
  created_at: Date

  author?: IUserModel
  collection?: ICollectionModel
  tags?: ITagModel[]
}
export interface IBookmarkModel {
  id: number
  author_id: number
  collection_id: number
  name: string
  url: string
  description: string
  icon: string
  created_at: Date

  author?: IUserModel
  collection?: ICollectionModel
  tags?: ITagModel[]
}

Body application/json

json
{
  "code": "0",
  "data": {
    "id": 1,
    "name": "Bookmark",
    "description": "Description",
    "url": "http://www.domain.com",
    "icon": "http://www.domain.com/icon.png",
    "collection_id": 1,
    "collection": {
      "id": 1,
      "name": "Collection name"
    },
    "author_id": 1,
    "author": {
      "id": 1,
      "username": "Username",
      "fullname": "Fullname"
    },
    "tags": [
      {
        "id": 1,
        "name": "Tag 1"
      }
    ],
    "created_at": "2023-09-08 16:00:00"
  },
  "message": "Ok"
}
{
  "code": "0",
  "data": {
    "id": 1,
    "name": "Bookmark",
    "description": "Description",
    "url": "http://www.domain.com",
    "icon": "http://www.domain.com/icon.png",
    "collection_id": 1,
    "collection": {
      "id": 1,
      "name": "Collection name"
    },
    "author_id": 1,
    "author": {
      "id": 1,
      "username": "Username",
      "fullname": "Fullname"
    },
    "tags": [
      {
        "id": 1,
        "name": "Tag 1"
      }
    ],
    "created_at": "2023-09-08 16:00:00"
  },
  "message": "Ok"
}
json
// BOOKMARK_NOT_FOUND

{
  "code": "201",
  "message": "Bookmark not found"
}
// BOOKMARK_NOT_FOUND

{
  "code": "201",
  "message": "Bookmark not found"
}