Search across indexes for persons, assets and shots. Use optional filters to limit results to a project and specific indexes. Results are paginated with limit and offset.
Body
Required
-
Search query string (minimum 3 characters)
-
Filter search results by project ID
-
Maximum number of results per index
Default value is
3. -
Number of results to skip
Default value is
0. -
List of index names to search in
Values are
assets,shots, orpersons. Default value is["assets", "shots", "persons"].
POST
/data/search
curl
curl -X POST "http://api.example.com/data/search" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"query": "kitsu",
"project_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"limit": 3,
"offset": 0,
"index_names": [
"assets"
]
}'
import requests
url = "http://api.example.com/data/search"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json"
}
params = {}
payload = {
"query": "kitsu",
"project_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"limit": 3,
"offset": 0,
"index_names": [
"assets"
]
}
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
curl \
--request POST 'http://api.example.com/data/search' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"query":"kitsu","project_id":"a24a6ea4-ce75-4665-a070-57453082c25","limit":3,"offset":0,"index_names":["assets"]}'
Request examples
{
"query": "kitsu",
"project_id": "a24a6ea4-ce75-4665-a070-57453082c25",
"limit": 3,
"offset": 0,
"index_names": [
"assets"
]
}
Response examples (200)
{
"persons": [
{
"id": "a24a6ea4-ce75-4665-a070-57453082c25",
"...": null,
"name": "John Doe"
}
],
"assets": [],
"shots": [
{
"id": "a24a6ea4-ce75-4665-a070-57453082c25",
"...": null,
"name": "Shot 001"
}
]
}