Integrations

Indexing Operations

Introduction

Below are the basic operations that can be performed via API on the search engine, its filters and collections, and for its indexing. All calls are found in Minerva. For more details on the endpoints, see Swagger

Allows searching in SolR with different filters.

It consists of a POST call to https://{{host}}/gateway/api/v1/indexer/{target}/search including the search parameters in the body.

For this endpoint it is highly recommended to include the "x-language" header, since objects always contain translated values and multilanguage values. If it is not included, they will come in the application's default language.

Indexing an object

Allows indexing a specific object (ENTITY or RELATIONSHIP) for the KERNO collection, and will always automatically generate a SNAPSHOT.

It consists of the following call:

POST https://{{host}}/gateway/api/admin/minerva/index

Getting all documents

Allows retrieving all documents indexed in Anjana's Kerno collection.

It consists of the following call:

GET https://{{host}}/gateway/api/admin/minerva/kerno/getAll

For this endpoint it is highly recommended to include the "x-language" header, since objects always contain translated values and multilanguage values. If it is not included, they will come in the application's default language.

If, on the other hand, a language that does not exist in the system is specified, the international fields will not appear in the returned data.

To correctly retrieve all documents, the call must be made using a curl command specifying a file in which to save the response. Example:

curl -X GET ^  https://dev44.anjanadata.org/gateway/api/admin/minerva/kerno/getAll \
-H "accept: */*" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJwcnVlYmEucHJ1ZWJhIiwiYXVkIjoid2ViIiwicm9sZXMiOiJST0xFX0FTU09DSUFURURfQlVTSU5FU1NfUFJPQ0VTU0VTX0NIQU5HRV9TVE…." \
  -o C:\Users\user\Escritorio\file.json


Getting all snapshots of an object

Allows retrieving all snapshots of an object.

It consists of the following call:

GET https://{{host}}/gateway/api/admin/minerva/snapshots/getAll/{objectSubType}/{idObject}

For this endpoint it is highly recommended to include the "x-language" header, since objects always contain translated values and multilanguage values. If it is not included, they will come in the application's default language.

If, on the other hand, a language that does not exist in the system is specified, the international fields will not appear in the returned data.


Creating a filter configuration

This endpoint allows creating the different filters to be used in Anjana based on the data provided

POST https://{{host}}/gateway/api/admin/minerva/create/filterConf


Updating a filter configuration

This endpoint allows updating the specified filter with the information provided.

PATCH https://{{host}}/gateway/api/admin/minerva/update/filterConf


Collection update

This endpoint performs an update of the collection. This means it will first delete it, then create the fields (both the collection's basic fields and those found in Anjana's attribute_definition table).

This endpoint can be used for any Anjana collection.

The endpoint is:

PUT https://{{host}}/gateway/api/admin/minerva/collection/update


Deleting a field from a collection

To delete a field, it is necessary to delete all the data in the collection first; the data is deleted first and then the field is deleted, so if you want the collection to have its data loaded again, you must call the indexAll endpoint.

The endpoint is:

DELETE https://{{host}}/gateway/api/admin/minerva/collection/delete-field/STATE/KERNO