Indexing Data
Maestro offers flexible indexing at the repository, study, or individual document (analysis file) levels alongside a RESTful API for interacting with its core functionalities. There are two methods to interact with the Maestro API:
-
The Swagger UI: The Swagger UI is useful for exploration and simple use cases. It provides detailed descriptions of all available endpoints, expected inputs, and error responses. Depending on your deployment the swagger UI can be accessed from the following URLs.
-
Local:
http://localhost:11235/maestro/api-docs
-
Server:
https://<YOUR-URL>/maestro/api-docs
Maestro API Reference DocCheckout the Maestro API reference to view this information alongside a templated Maestro swagger doc.
-
-
cURL: Maestro's API can be accessed through the command line using cURL, allowing for more complex programmatic queries if desired. Templated cURL requests can be found from the Maestro Swagger UI
Indexing an Analysis
Using cURL
The following is an example of a cURL request for indexing a specfic analysisId:
curl -X POST \
http://localhost:11235/index/repository/<repositoryCode>/study/<studyId>/analysis/<analysisId> \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache'
Replace <repositoryCode>
, <studyId>
, and <analysisId>
with appropriate values.
Using Swagger UI
- Go to
http://localhost:11235/maestro/api-docs
- Under management-controller, select:
POST /index/repository/{repositoryCode}/study/{studyId}/analysis/{analysisId}
- Click Try it out & enter your
analysisId
,studyId
, andrepositoryCode
- Click Execute
Indexing a Study
Indexing by study is the most common method. This operation indexes all analyses in the specified study.
A study is an organized collection of analysis files. Analysis files are always tagged with a study_ID, which allows them to be grouped and managed together.
Using cURL
curl -X POST \
http://localhost:11235/index/repository/<repositoryCode>/study/<studyId> \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache'
Replace <repositoryCode>
and <studyId>
with appropriate values.
Using Swagger UI
The following is an example of a Swagger request for indexing a specfic studyId
- Go to
http://localhost:11235/maestro/api-docs
- Under management-controller, select
POST /index/repository/{repositoryCode}/study/{studyId}
- Click Try it out & enter your
studyId
andrepositoryCode
- Click Execute
Indexing a Repository
It is also possible to index an entire Song repository in one request, this will index all analyses in all studies within the specified repository.
Using cURL
curl -X POST \
http://localhost:11235/index/repository/<repositoryCode> \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache'
Replace <repositoryCode>
with the appropriate value.
Using Swagger UI
- Go to
http://localhost:11235/maestro/api-docs
- Under management-controller, select
POST /index/repository/{repositoryCode}
- Click Try it out
- Enter the
repositoryCode
of the Song repository you want to index - Click Execute
Successful Indexing Response
For all indexing operations, a successful response will look like this:
[
{
"indexName": "file_centric_1",
"failureData": {
"failingIds": {}
},
"successful": true
}
]
This response indicates that the indexing operation was successful and no failures were encountered.