Difference between revisions of "REST API:execSQL Resource"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 25: Line 25:
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
<platform>
<platform>
     <execSQL>
     <record>
         <id>...</id>
         <field1>field1 data</field1>
         <field>data</field>
         <field2>field2 data</field2>
         ...
         ...
     </execSQL>
     </execSQL>
Line 39: Line 39:
</syntaxhighlight>
</syntaxhighlight>
where:
where:
:* The column names are the columns from the queried rows, or their aliases.
:* The tag names (field1, field2, etc.) are the column names specified in the query, or their aliases.


:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]

Revision as of 01:44, 16 November 2011

Use the SQL query language to access Object tables, using the REST API.

Learn more: REST API Conventions and Considerations.

__TBD:

  1. Add an entry to the REST API CheatSheet
  2. Add an entry to the REST API (categorized) page
  3. Add an entry to the REST Resources page

__

Permissions

__TBD: Are the permission(s) right?__

Lock-tiny.gif

Users that have the Manage Develop Features permission can use this resource. 

Execute a SQL Query

Method
GET
URI
https://{domain}/networking/rest/execSQL?sql={query}
Query Parameters
For more information, see: Specifying Query Parameters in REST APIs
Response
<platform>
    <record>
        <field1>field1 data</field1>
        <field2>field2 data</field2>
         ...
    </execSQL>

    <message>
        <code>0</code>
        <description>Success</description>
    </message>
    <recordCount>N</recordCount>      <!-- Number of records returned by the query -->
</platform>

where:

  • The tag names (field1, field2, etc.) are the column names specified in the query, or their aliases.
See also: REST API:Error Codes