resources/segments/search/profiles
To save, load and update search profiles. A profile stands for the "query" node you include with a search.
Note: The profiles are private to the current user.
URLs
(GET) /api/resources/segments/search
(GET) /api/resources/segments/search/{id}
(POST) /api/resources/segments/search
ACTIONS
The following API calls let you retrieve profiles, update, add and delete profiles.
Get all profiles |
Returns a list of all search profiles with id and name. Example: [
{
"name": "Problem search",
"id": "a25cab1ef1d246d4809f2311745bbdb6"
},
{
"name": "My beloved one",
"id": "5ba6633dcfed4bc1a2aa2c2153cd73ee"
}
] |
Get profile details |
Parameter id is the profile you want to retrieve. This returns your query node. The data property is the query object for use in API call resources/segments/search. {
"id": "a25cab1ef1d246d4809f2311745bbdb6",
"name": "Problem search",
"data": {
"skip": 0, "take": 20,
"languages": [
{ "loc": "de" },
{ "loc": "en" },
{ "loc": "fr" }
]
}
}You receive an error if the requested profile does not exist. |
Update profile |
Include a JSON in the body with these parameters:
Example of a body message to update name and data: {
"action": "Update",
"id": "a25cab1ef1d246d4809f2311745bbdb6",
"name": "New name",
"data": {
"languages": [
{ "loc": "de" },
{ "loc": "fr" }
]
}
}The method returns the updated profile, see the "Get profile details" description. You receive an error if the requested profile does not exist. |
Add profile |
Include a JSON in the body with these parameters:
Example of a body message to update name and data: {
"action": "Add",
"name": "My new profile",
"data": {
"languages": [
{ "loc": "de" },
{ "loc": "fr" }
]
}
}The method returns the updated profile, see the "Get profile details" description. |
Delete profile |
Include a JSON in the body with these parameters:
Example of a body message to update name and data: {
"action": "Delete",
"id": "a25cab1ef1d246d4809f2311745bbdb6"
}The method returns no data. No error is returned If the id does not exist. |
Copyright Wordbee - Buzzin' Outside the Box since 2008