Get records by query
Gets data records from the specified data container. Query is provided in the request content as JSON.
You can also retrieve a snapshot of a specific MDM record and navigate through the record history. For more information, see MDM Time Machine.
Request |
The body is a query language in JSON format. The parameter content type is application/json. |
Parameters |
|
Headers |
|
Response | The documents of the records in the specified container. |
Status |
|
Limitation | This REST API does not support getting records by query for the Role entity in the PROVISIONING system data container. |
Sample request
{
"select": {
"from": ["Product"],
"where": {
"gt":[
{"field": "Product/Price"},
{"value": "16"}
]
}
}
}
Sample response in XML format
<results>
<Product>
<Picture>/imageserver/upload/TalendShop/dog.jpg</Picture>
<Id>231035933</Id>
<Name>partialNameUpdate1</Name>
<Description>partialDescriptionUpdate1</Description>
<Features>
<Sizes>
<Size>Small</Size>
<Size>Medium</Size>
<Size>Large</Size>
<Size>X-Large</Size>
</Sizes>
<Colors>
<Color>White</Color>
</Colors>
</Features>
<Availability>true</Availability>
<Price>111.00</Price>
<Family>[14]</Family>
<OnlineStore>Talend Shop@@http://www.cafepress.com/Talend.231035933</OnlineStore>
<Stores/>
</Product>
<Product>
<Picture>/imageserver/upload/TalendShop/tshirt.jpg?width=150&amp;height=90&amp;preserveAspectRatio=true</Picture>
<Id>231035935</Id>
<Name>partialNameUpdate3</Name>
<Description>partialDescriptionUpdate3</Description>
<Features>
<Sizes>
<Size>Medium</Size>
</Sizes>
<Colors>
<Color>White</Color>
</Colors>
</Features>
<Availability>false</Availability>
<Price>333.00</Price>
<Family>[1]</Family>
<OnlineStore>Talend Shop@@http://www.cafepress.com/Talend.231035936</OnlineStore>
<Stores/>
</Product>
</results>
Sample response in JSON format
[
{
"product": {
"picture": "/imageserver/upload/TalendShop/dog.jpg",
"id": "1",
"name": "New Name",
"description": "Doggie t-shirt from American Apparel",
"features": {
"sizes": {
"size": [
"Small",
"Medium",
"Large",
"X-Large"
]
},
"colors": {
"color": [
"White"
]
}
},
"availability": "true",
"price": "16.99",
"family": "[14]",
"onlinestore": "Talend Shop@@http://www.cafepress.com/Talend.231035933",
"stores": {}
}
},
{
"product": {
"picture": "/imageserver/upload/TalendShop/dog.jpg",
"id": "231035933",
"name": "Talend Dog T-Shirt",
"description": "Doggie t-shirt from American Apparel",
"features": {
"sizes": {
"size": [
"Small",
"Medium",
"Large",
"X-Large"
]
},
"colors": {
"color": [
"White"
]
}
},
"availability": "true",
"price": "16.99",
"family": "[14]",
"onlinestore": "Talend Shop@@http://www.cafepress.com/Talend.231035933",
"stores": {}
}
},
{
"product": {
"picture": "/imageserver/upload/TalendShop/spaghetti.jpg",
"id": "231035934",
"name": "Talend Jr. Spaghetti Tank",
"description": "Spaghetti tank from American Apparel",
"features": {
"sizes": {
"size": [
"Small",
"Medium",
"Large",
"X-Large"
]
},
"colors": {
"color": [
"White",
"Light Blue",
"Light Pink",
"Lemon"
]
}
},
"availability": "true",
"price": "16.99",
"family": "[8]",
"onlinestore": "Talend Shop@@http://www.cafepress.com/Talend.231035934",
"stores": {}
}
}
]