{"id":3952,"date":"2020-04-20T12:39:43","date_gmt":"2020-04-20T11:39:43","guid":{"rendered":"https:\/\/help.cirrus-shield.com\/docs\/developer-guide\/rest-api\/query\/"},"modified":"2026-09-24T09:44:22","modified_gmt":"2026-09-24T08:44:22","slug":"query","status":"publish","type":"docs","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/rest-api\/query\/","title":{"rendered":"4. Query"},"content":{"rendered":"\n<ul class=\"wp-block-list\"><li><strong><u><span class=\"has-inline-color has-luminous-vivid-orange-color\">URL:<\/span><\/u><\/strong> <\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\u00ab \/RestApi\/Query?selectQuery=&lt;selectQuery> \u00bb<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><u><span class=\"has-inline-color has-luminous-vivid-orange-color\">Method:<\/span><\/u> <\/strong>GET<\/li><li><strong><u><span class=\"has-inline-color has-luminous-vivid-orange-color\">Authentication:<\/span><\/u><\/strong> Include an OAuth 2.0 access token in the <code>Authorization: Bearer &lt;access_token&gt;<\/code> header of every call. See <a href=\"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/rest-api\/authtoken\/\">1. AuthToken \u2014 OAuth 2.0 Authentication<\/a> for how to obtain one.<\/li><li><strong><u><span class=\"has-inline-color has-luminous-vivid-orange-color\">URL Params:<\/span><\/u><\/strong><ul><li>selectQuery [string] [Required]=the select query. Example: \u201c<em>SELECT Name FROM Account WHERE Id=1329023730348722379<\/em>\u201d.<\/li><\/ul><\/li><li><strong><u><span class=\"has-inline-color has-luminous-vivid-orange-color\">Success Response:<\/span><\/u><\/strong><ul><li>Status Code=200 (OK)<\/li><li>Returned Data [in XML or JSON]=a list of the selected records<\/li><\/ul><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example of returned data (in xml format):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n &lt;Data>\n\n\n&lt;Account>\n\n\n&lt;Name>\n\nAccount Test 1\n\n&lt;\/Name>\n\n&lt;Address>\n\nAddress Test 1\n\n&lt;\/Address>\n\n\n&lt;\/Account>\n\n&lt;Account>\n\n\n&lt;Name>\n\nAccount Test 2\n\n&lt;\/Name>\n\n&lt;Address>\n\nAddress Test 2\n\n&lt;\/Address>\n\n\n&lt;\/Account>\n\n\n &lt;\/Data>\n\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><u><span class=\"has-inline-color has-luminous-vivid-orange-color\">Error Response:<\/span><\/u><\/strong><ul><li>Status Code=401 (Unauthorized) (in case of a wrong authentication token)<\/li><li>Or<\/li><li>Status Code=400 (BadRequest) (in case the \u201cquerying data\u201d operation was unsuccessful)<br><\/li><\/ul><\/li><li><strong><span style=\"text-decoration: underline;\"><span class=\"has-inline-color has-luminous-vivid-orange-color\">Keywords :<\/span><\/span><\/strong><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><span class=\"has-inline-color has-luminous-vivid-orange-color\"><span style=\"text-decoration: underline;\"><\/span><\/span><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"has-subtle-light-gray-background-color has-fixed-layout has-background\"><thead><tr><th>Supported Keywords<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td>LIMIT<\/td><td>Returns only first <em>n<\/em> rows (n &lt; 2000), <em>n<\/em> being the value specified after the keyword &#8220;LIMIT&#8221; (First 10 rows in this example).<\/td><td>\u201cSELECT Id, Name FROM Lead LIMIT 10\u201d<\/td><\/tr><tr><td>OFFSET<\/td><td>Returns a max of 2000 records starting the <em>nth<\/em> row (10th row in this example).<\/td><td>&#8220;SELECT Id, Name From Contact WHERE OwnerId=UserId OFFSET 10&#8221;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"author":12,"featured_media":0,"parent":944,"menu_order":3,"comment_status":"open","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_is_vendor_doc":"0","footnotes":""},"doc_tag":[],"class_list":["post-3952","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/3952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/comments?post=3952"}],"version-history":[{"count":13,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/3952\/revisions"}],"predecessor-version":[{"id":12262,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/3952\/revisions\/12262"}],"up":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/944"}],"next":[{"title":"5. Data Action","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/rest-api\/data-action\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/3954"}],"prev":[{"title":"3. Describe All","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/rest-api\/describe-all\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/3950"}],"wp:attachment":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/media?parent=3952"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/doc_tag?post=3952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}