Get an array of ROQL results

get

/services/rest/connect/v1.4/queryResults

Request

There are no request parameters for this operation.

Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : collection of queryResults
Type: object
Title: collection of queryResults
collection of queryResults
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Results from ROQL query
Type: object
Title: Results from ROQL query
Results from ROQL query
Show Source
Nested Schema : columnNames
Type: array
Array of Column Names
Show Source
Nested Schema : rows
Type: array
Array of array of each row values
Show Source
Nested Schema : items
Type: array
Show Source
Back to Top

Examples

Use GET with the following syntax to perform a ROQL tabular query:

https://your_site_interface/services/rest/connect/version/
queryResults/?query=semicolon-separated ROQL queries

Request URI example

https://mysite.example.com/services/rest/connect/v1.4/queryResults/
?query=select id,subject from incidents where id<=10;

Response body example

{
  "items": [
    {
      "tableName": "incidents",
      "count": 10,
      "columnNames": [
        "id",
        "subject"
      ],
      "rows": [
        [
          "1",
          "How do I access my voicemail outside of my home calling area?"
        ],
        [
          "2",
          "Power surge recovery"
        ],
        [
          "3",
          "The wrong phones were shipped to my office"
        ],
        [
          "4",
          "Health hazards of cell phone"
        ],
        [
          "5",
          "Caller ID problems"
        ],
        [
          "6",
          "Billing issues"
        ],
        [
          "7",
          "I need information about the Mundo recall"
        ],
        [
          "8",
          "I'm looking for a plan with unlimited minutes"
        ],
        [
          "9",
          "Switching to the pre-pay plan"
        ],
        [
          "10",
          "Available ring tones?"
        ]
      ]
    }
  ],
  "links": [
    {
      "rel": "self",
      "href": "https://mysite.example.com/services/rest/connect/v1.4/queryResults?
       query=select%20id,%20subject%20from%20incidents%20where%20id%3C=10;"
    },
    {
      "rel": "canonical",
      "href": "https://mysite.example.com/services/rest/connect/v1.4/queryResults"
    },
    {
      "rel": "describedby",
      "href": "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/queryResults",
      "mediaType": "application/schema+json"
    }
  ]
}
Back to Top