selectValue
Purpose
Runs an SQL SELECT query on the server and returns the first element from the results as single value.
HTTP Method
GET
URL
https://app.infiniteblue.com/rest/api/selectValueURL Parameters
sessionId
The session ID obtained from the body of the response when calling login.
output
Optional parameter specifying the output format, one of:
query
A text pattern to search.
- The format of date or date/time fields is governed by the shared properties
UseISODateFormatInRESTJSON&UseISODateFormatInRESTXMLQueryand can be configured from System Console > System > Shared Properties > General > API. For more information, see Shared Properties. - The shared properties mentioned above are applicable only if the output is in JSON format.
Permissions Required
The current user requires View permission on the selected object type to run this API.
Response
Query result as single value
Example
Example of first element returned by query wrapped in XML:
<?xml version="1.0" encoding="UTF-8"?> <resp status="ok"> <value>53</value> </resp>
Output example in JSON:
{ "value": 53.0 }