-
Type: New Feature
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 8.3
-
Component/s: Query & PageProvider, Rest API
-
Epic Link:
-
Sprint:nxGang Sprint 8.3.2, nxGang Sprint 8.3.3, nxGang Sprint 8.3.4, nxGang Sprint 8.3.5, nxGang Sprint 8.3.6
-
Story Points:8
It should be possible to persist a page provider state from REST API, probably with additional segments on the "query" endpoint. Specifications of the endpoint to do. We want to be able to:
- get saved instances for a given page provider name
- create a new saved search instance for a given page provider name and its parameters
- update a saved search
- delete a saved search
In new web ui , sharing a saved search is made without new api, using the document id that holds the saved search information, and the default document-permissions element.
New Search endpoint
Allow to:
- Execute an arbitrary query (returning documents or result sets)
- Execute page provider
- Manage saved searches
Returns any object (that can be marshalled), not only Documents
Execute an arbitrary query
GET /search/lang/{queryLanguage}/execute?query=... GET /search/lang/nxql/execute?query=SELECT * FROM Document
Execute a page provider
GET /search/pp/{pageProviderName}/execute GET /search/pp/DOCUMENT_CONTENT/execute
Page provider definition? (if needed)
GET /search/pp/{pageProviderName}
Manage saved search
Create a “SavedSearch” object, with reader and writer, to easily manage them.
A SavedSearch should at least contains:
- An ID if any
- A title
- The page provider name / query (in different fields)
- Categories (flags?)
- The search parameters
Save a search - post a SavedSearch JSON object (including provider name or query, search title, categories (flags), search params
POST /search/saved
Returns the SavedSearches accessible by the current user, possibly filtered with the query params
GET /search/saved[?flags=foo,bar&pageProviderName=DOCUMENT_CONTENT] or GET /search/saved[?flag=foo&flag=bar&pageProviderName=DOCUMENT_CONTENT]
Get a saved search - get a SavedSearch JSON object
GET /search/saved/{id}
Update a saved search
PUT /search/saved/{id}
Delete a saved search
DELETE /search/saved/{id}
Execute a saved search, return the result, accepts pagination parameters
GET /search/saved/{id}/execute
TODO: discuss migration or compatibility use cases between existing saved searches, based on content views, and new ones created by REST (and are they visible in the JSF UI?)