Fetch details of a collection
get
/api/collection/:idReturns a collection details for the given collection ID.
Request
Security:
Bearer AuthRouter Params
idnumber
required
ID of the collection.
Response
Schema:
application/jsonICollectionModel
ts
export interface ICollectionModel {
id: number
author_id: number
name: string
icon: string
created_at: Date
author?: IUserModel
bookmarks?: IBookmarkModel[]
}export interface ICollectionModel {
id: number
author_id: number
name: string
icon: string
created_at: Date
author?: IUserModel
bookmarks?: IBookmarkModel[]
}Body application/json
json
// SUCCESS
{
"code": "0",
"data": {
"id": 1,
"author_id": 1,
"name": "Collection name",
"icon": "icons:nuxt",
"created_at": "2023-09-08 16:00:00"
},
"message": "Ok"
}// SUCCESS
{
"code": "0",
"data": {
"id": 1,
"author_id": 1,
"name": "Collection name",
"icon": "icons:nuxt",
"created_at": "2023-09-08 16:00:00"
},
"message": "Ok"
}json
// COLLECTION_NOT_FOUND
{
"code": "301",
"message": "Collection not found"
}// COLLECTION_NOT_FOUND
{
"code": "301",
"message": "Collection not found"
}