Search (REST)
GET <baseurl>/api/v1/collections/<collname>/search/<keywords url encoded>
This is the API equivalent of disp = search.
Parameters
Name |
Type |
Description |
Default |
---|---|---|---|
page |
integer |
Page number |
1 |
per_page |
integer |
Count results per page |
10 |
kind |
string |
Where we should search the results. |
all |
exclude_posts |
string |
IDs of posts/items which should be excluded from results. Use |
Response
Name |
Type |
Description |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
found |
integer |
Number of found items/posts |
||||||||||||||||||
page |
integer |
Current page |
||||||||||||||||||
page_size |
integer |
Number items/posts per page |
||||||||||||||||||
pages_total |
integer |
Number of total pages |
||||||||||||||||||
results |
array |
Array of results list, see the properties in the table below
|
Errors
Error code |
HTTP response |
Message |
---|---|---|
access_requires_login |
403 |
You need to log in before you can access this section. |
access_denied |
403 |
You are not a member of this section, therefore you are not allowed to access it. |
wrong_route |
404 |
Collection name is not defined |
unknown_collection |
404 |
No collection found in DB by requested url name |
wrong_route |
404 |
Collection controller is not defined |
no_search_results |
200 |
Sorry, we could not find anything matching your request, please try to broaden your search. |
Used for:
- Search items in modal window to merge posts
- Search items in modal window to insert short link by Short Links / ForeverLinks / Quick Links Plugin