Anno Lab API (V1)
Search…
⌃K

Search Instruments

Search a project for instruments and annotations that match the search criteria
post
https://api.annolab.ai
/v1/instrument/search
Search instruments and their data
Search a project for information related to instruments that meet search filter criteria. Returns a maximum of 100 instruments and their annotations per page. If you need individual pdf files exported for each instrument, try using the Export Instruments api
Parameters
Header
Authorization*
Where you put your api key. Exporting a project requires a key with "Read" permissions. {"Authorization": "Api-Key XXXXXXX-XXXXXXX-XXXXXXX"}
Body
projectOwner*
String
Group Name that owns the project (viewable in "All Projects" page)
projectName*
String
Name of the Project where you want to search
tagFilter
Object
Filter export to just instruments with a specified tags {canonicalTagTypes: ["Airframe Inventory"]}
sourceFilter
String
Filters export to only those instruments that have a source file name equal to sourceFilter
page
Integer
Search result pagination number
Responses
201: Created
Your search result (100 instruments at a time)

Search Result Object

Attribute Name
Type
Description
page
Integer
The page of the search result
hasMorePages
Boolean
Whether the search result has additional pages that can be requested
results
Array of Instrument objects that comprise the search result
{
'page': 1,
'hasMorePages': false,
'results': []
}
Python
import requests
import time
ANNO_LAB_API_KEY = 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'
searchBody = {
'projectOwner': 'Group Name owning project',
'projectName': 'Example Project Name',
'tagFilter': {'canonicalTagTypes': ["Airframe Inventory"]},
'sourceFilter': "Test_PDF.pdf"
}
headers = {
'Authorization': 'Api-Key '+ANNO_LAB_API_KEY,
}
url = 'https://api.annolab.ai/v1/instrument/search'
response = requests.post(url, headers=headers, json=searchBody, stream=True).json()
search_result = response['results']
#Do something with search result here
#Continue paging your search until there are no more pages
#(only 100 instruments returned per page)
while response['hasMorePages']:
searchBody['page'] = response['page'] + 1
response = requests.get(url, headers=headers, json=searchBody, stream=True).json()
search_result = response['results']
#Do something with search result here