Indexing Service
Github repository: https://github.com/ATTX-project/indexing-service
Table of Contents
Overview
The Indexing REST API has the following endpoints:
alias
- information on aliases from Elasticsearch;data
- index data to Elasticsearch;health
- checks if the application is running.
Current version: 0.2
(URL for the endpoint should take into consideration for the API http://host:4304/version/endpoint
)
Building Indexing Service
In order to work with the service start with:
- Indexing Service source - contains information on building both the project and the Docker image and testing from the source code;
- short tutorial on Gradle.
Elasticsearch Connection
The Indexing Service requires a connection with Elasticsearch. The connection with Elasticsearch is required in order to:
- perform operations such as bulk or simple index and replace index data with a given alias;
- retrieve aliases data, in order to index data or replace deprecated indexes.
Message Broker Connection
Indexing Service needs RabbitMQ Message Broker in order to communicate with UV plugins.
Environment Variables
MHOST
- container name or address for the MessageBroker-RabbitMQ database (defaults tolocalhost
);MUSER
- user name for MessageBroker (defaults touser
);MPROVQUEUE
- provenance queue in the MessageBroker (defaults toprovenance.inbox
);MRPCQUEUE
- RPC Queue for responding to messages received by the GraphManager Queue (defaults toattx.indexing.inbox
);MKEY
- password for MessageBroker (defaults topassword
);ESHOST
- Elasticsearch container name or address (defaults tolocalhost
);ESPORT
- Elasticsearch port (defaults to9210
);ESPORTB
- Elasticsearch second port (defaults to9310
).
Service API Endpoints
health Endpoint
health
GET API:- simple: http://localhost:4304/health reponds with
200
in order for other applications to know the service is running.
- simple: http://localhost:4304/health reponds with
alias Endpoint
alias/list
GET API: retrieve a list of aliases from Elasticsearch.
data Endpoint
data/index
POST API: register data in Elasticsearch using the message format.