Query
This rest resource executes a MEQL (Magentrix Entity Query Language) command.
When an MEQL query is executed, up to 10,000 records can be returned simultaneously at a synchronous request to optimize the system's resources within a multi-tenant server environment.
The response contains the total number of records that match your conditions to allow you to paginate and get all the data records, especially when you use the LIMIT clause.
To get more information about MEQL click here.
curl POST 'https://{domain}/api/3.0/query'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
-d 'SELECT Id,Name,Email,Account.Name
FROM Contact
WHERE BillingCountry = "US"
ORDER BY Name
LIMIT 100'
Request Body
query string Required
The request body contains the MEQL query string to be executed.
Successful Response
HTTP 200 OK
{
"Count": 3,
"Records": [
{
"Id": "001E000000HUJOaIAP",
"Name": "Sam Smith",
"Email": "sam.s@uoas.net",
"Account": {
"Name": "United Oil & Gas"
}
},
{
"Id": "001E000000HUJOUIA5",
"Name": "Jane Due",
"Email": "jane.due@burlingtont.com",
"Account": {
"Name": "Burlington Textiles Group"
}
},
{
"Id": "001E000000HUJObIAP",
"Name": "Dave Semally",
"Email": "d.semally@xtera.com",
"Account": {
"Name": "Xtera Corporation"
}
}
]
}
Failed Response
HTTP 400 - Bad Request
{
"message": "The entity: 'XZY' does not exist.",
"success": false
}
What Is Next?