Keywords: signals notebook api search materials library
Details:
You can search for a particular Material ID/Name by using the following:
First get a list of the EIDs of your Material Libraries using:
curl -X 'GET' \
'https://tenant.signalsresearch.revvitycloud.com/api/rest/v1.0/materials/libraries' \
-H 'accept: application/vnd.api+json'
Next, using your target library EID do a search using:
curl -X 'POST' \
'https://tenant.signalsresearch.revvitycloud.com/api/rest/v1.0/entities/search?page%5Boffset%5D=0&page%5Blimit%5D=20&source=SN' \
-H 'accept: application/vnd.api+json' \
-H 'Content-Type: application/json' \
-d '{
"query": {
"$and": [
{
"$match": {
"field": "type",
"value": "asset",
"mode": "keyword"
}
},
{
"$match": {
"field": "name",
"value": "YOUR_MATERIAL_NAME",
"mode": "keyword"
}
},
{
"$match": {
"field": "assetTypeEid",
"value": "assetType:YOUR_LIBRARY_EID",
"mode": "keyword"
}
}
]
}
}'
If you would like to query for a Chemical Name, replace the query with:
"query": {
"$and": [
{
"$match": {
"field": "type",
"value": "asset",
"mode": "keyword"
}
},
{
"$match": {
"field": "materials.Chemical Name",
"in": "tags",
"as": "text",
"value": "YOUR_CHEMICAL_NAME",
"mode": "keyword"
}
},
{
"$match": {
"field": "assetTypeEid",
"value": "assetType:YOUR_LIBRARY_EID",
"mode": "keyword"
}
}
]
}
}'