How-to: Query API for Multiple Samples
Issue:
How do users query the API for multiple samples?
Solution
Querying the api for sample information is done using the
GET
method of theapi/samples
endpointSeveral html query strategies can be used, and the user should experiment with the best one for their needs by testing queries using programs such curl, Postman, or the built in utility within L7|ESP
The latter is done in the browser by appending
/main/static/util.html
to the end of the L7|ESP instance home page (that is, given an example urlhttps://customer.l7esp.com/
, the utility is athttps://customer.l7esp.com/main/static/util.html
)Queries are put in the API Endpoint field and Click
Execute
to runIf a query seems be stuck, click
Kill
to stop the process
A few examples are outlined to help users get started:
Return information on a single sample by name :
/api/samples?name="ESP000001"
Return information on a set of samples from a list of names:
/api/samples?names=["ESP000001","ESP000002"]
Return information on all samples of given entity type: /api/samples?sample_type="Generic sample"
Return information on a set of samples from a list of uuids: /api/samples?uuids=["uuid1","uuid2","uuid3"]
Note: wildcard searches with
.like
are also available, but use caution as this may return an excessively large list if further filters are not also put in place as part of the implementation scales
Return information on a set of samples that all contain the portion of the name:
ESP00
/api/samples?name.like="ESP00"