Skip to main content

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

(GET) /api/resources/segments/search/profiles

Returns a list of all search profiles with id and name. Example:

CODE
[
    {
        "name": "Problem search",
        "id": "a25cab1ef1d246d4809f2311745bbdb6"
    },
    {
        "name": "My beloved one",
        "id": "5ba6633dcfed4bc1a2aa2c2153cd73ee"
    }
]
Get profile details
(GET) /api/resources/segments/view/search/profiles/{id}

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.

CODE
{
    "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
(POST) /api/resources/segments/search/profiles

Include a JSON in the body with these parameters:

  • action: Must be "Update"
  • id: The profile to update
  • name: Optional. To change the name.
  • data: Optional. To change the query object

Example of a body message to update name and data:

CODE
{
	"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
(POST) /api/resources/segments/search/profiles

Include a JSON in the body with these parameters:

  • action: Must be "Add"
  • name: Optional. To change the name.
  • data: Optional. To change the query object

Example of a body message to update name and data:

CODE
{
	"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
(POST) /api/resources/segments/search/profiles

Include a JSON in the body with these parameters:

  • action: Must be "Delete"
  • id: The profile to update

Example of a body message to update name and data:

CODE
{
	"action": "Delete",
    "id": "a25cab1ef1d246d4809f2311745bbdb6"
}


The method returns no data. No error is returned If the id does not exist.




 

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.