Search
API endpoint to make queries and retrieve results
Retrieve results
- GET /api/search
GET /api/search/ HTTP/1.1
Host: localhost
Accept: application/json
Authorization: Basic YWRtaW46YWRtaW4=
curl -i -X GET https://localhost/api/search/ -H "Accept: application/json" --user admin:admin
GET /api/search/ HTTP/1.1
Host: localhost
Accept: application/json
Authorization: Basic YWRtaW46YWRtaW4=
Filters
The most commonly used filters used by ESSArch to retrieve objects.
- GET /api/search/<uuid>
Retrieves one single indexed object
- GET /api/search/indices=<index>,<index>
Retrieves objects from a particular index
- GET /api/search/extension=<extension>,<extension>
Retrieves objects filtered by extensions e.g. xml, pdf, docx etc
- GET /api/search/type=<type>
Retrieves objects filtered by type e.g. box, document, image, folder etc
- GET /api/search/agents=<agent id>,<agent id>
Retrieves results from one or more authority record
- GET /api/agents/archives=<archive id>,<archive id>
Retrieves results from one or more top-level resources (Fonds/Archives)
Combining filters
One or more filters can be combined in a query by adding a & between filters.
- GET /api/agents/archives=<archive id>&extension=pdf%q=meeting minutes
The above query would retrieve all pdf documents containing the phrase “meeting minutes” from a particular top-level resource (Fond/Archive)
Stored Search
Api endpoint that allows stored searches to be viewed or edited
- GET /api/me/searches/
Retrieves the stored searches for the logged in user
GET /api/me/searches/ HTTP/1.1
Host: localhost
Accept: application/json
Authorization: Basic YWRtaW46YWRtaW4=
curl -i -X GET https://localhost/api/me/searches/ -H "Accept: application/json" --user admin:admin
GET /api/me/searches/ HTTP/1.1
Host: localhost
Accept: application/json
Authorization: Basic YWRtaW46YWRtaW4=
- POST /me/searches/
Stores a search for the logged in user
- Parameters:
name – The stored search name
query – The query to be stored