API

API for developers

get
Get Folders

https://your-site.com/wp-json/njt-fbv/public/v1/folders
This endpoint allows you to get folders
Request
Response
Request
Headers
Authentication
required
string
Bearer Token
Response
200: OK
{
"success": true,
"data": {
"folders": [
{
"id": 1087,
"text": "Bird",
"children": [],
"li_attr": {
"data-count": 1,
"data-parent": 0
},
"count": 19
},
{
"id": 1088,
"text": "Cat",
"children": [],
"li_attr": {
"data-count": 1,
"data-parent": 0
},
"count": 14
},
{
"id": 1089,
"text": "Dog",
"children": [],
"li_attr": {
"data-count": 1,
"data-parent": 0
},
"count": 23
}
]
}
}
401: Unauthorized
{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to do that.",
"data": {
"status": 401
}
}

post
Add attachment(s) to folder

https://your-site.com/wp-json/njt-fbv/public/v1/folder/set-attachment
Request
Response
Request
Headers
Authentication
required
string
Bearer Token
Form Data Parameters
folder
required
number
The folder id
ids
required
number
The attachment ID, it could be a number or an array
Response
200: OK
{
"success": true
}
401: Unauthorized
{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to do that.",
"data": {
"status": 401
}
}

‚Äč