API calls require an Authorisation header Bearer token.
See API Guides | Get Access Token
Section 1: Search assets by Collection instance
Return list of objects
Example: Return Reports and Datasets filtered on category:gold
Paginate using start and rows.
Example rows: 30 means 30 results returned per page.
start: 0 means return 30 rows start from the first row.
To return the next page increment start by rows. eg start: 30
Request
POST https://{your.domain.com}/api/v2/index/search/select
{
"params": {
"q": "*",
"fq": "asset:(REPORT DATASET) AND collection_category:(GOLD)",
"fl": "name,location,id,stewards_ids",
"defType": "edismax",
"wt": "json",
"sort": "name asc",
"start": 0,
"rows": 30
}
}
Response
{
"responseHeader": {
"status": 0,
"QTime": 1
},
"response": {
"numFound": 169,
"start": 0,
"numFoundExact": true,
"docs": [
{
"location": "test",
"name": "Report 1234",
"id": "1b96c222-a782-3fba-ad06-d9dc31352671",
"stewards_ids": [
"223b7f4c-a646-32a3-b0b3-d83a26716199",
"9f2ab0c1-3d4e-3a5b-8c7d-1e2f3a4b5c6d"
]
}
]
}
}
Note: stewards_ids is a list of user ids, one asset can have multiple stewards.**
Section 2: Get data steward email
Use the same search endpoint, filtering on the steward ids from Section 1. Returns name and email per steward.
The following POST will return the details for a single steward
POST https://{your.domain.com}/api/v2/index/search/select
{
"params": {
"q": "*",
"fq": "id:223b7f4c-a646-32a3-b0b3-d83a26716199",
"fl": "id,name,email",
"wt": "json"
}
}
The following example will return the details for multiple stewards
Get multiple stewards
```
POST https://{your.domain.com}/api/v2/index/search/select
{
"params": {
"q": "*",
"fq": "id:(223b7f4c-a646-32a3-b0b3-d83a26716199 9f2ab0c1-3d4e-3a5b-8c7d-1e2f3a4b5c6d)",
"fl": "id,name,email",
"wt": "json"
}
}
Response
{
"responseHeader": {
"status": 0,
"QTime": 1
},
"response": {
"numFound": 2,
"start": 0,
"numFoundExact": true,
"docs": [
{
"id": "223b7f4c-a646-32a3-b0b3-d83a26716199",
"name": "Test User One",
"email": "TESTUSER1@EXAMPLE.COM"
},
{
"id": "9f2ab0c1-3d4e-3a5b-8c7d-1e2f3a4b5c6d",
"name": "Test User Two",
"email": "TESTUSER2@EXAMPLE.COM"
}
]
}
}