Calling SQL functions

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsCalling SQL functions
Line 1: Line 1:
### Tutorial
+
=== Tutorial ===
  
 
GET data form a SQL function. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.
 
GET data form a SQL function. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.
  
### API Endpoint
+
=== API Endpoint ===
  
 
<pre>GET https://{url}/api/v2/{api_name}/_func/{function_name}</pre>
 
<pre>GET https://{url}/api/v2/{api_name}/_func/{function_name}</pre>
  
### API Docs Screenshot
+
=== API Docs Screenshot ===
  
 
[[File:Swagger-function.png|1000px]]
 
[[File:Swagger-function.png|1000px]]
  
### Example - GET data from a SQL function
+
=== Example - GET data from a SQL function ===
  
 
* Function name: my_function
 
* Function name: my_function
 
* Function_name parameter in API call:<pre>my_function</pre>
 
* Function_name parameter in API call:<pre>my_function</pre>
 
* Request URL: <pre>https://foo.com/api/v2/db/_func/my_function</pre>
 
* Request URL: <pre>https://foo.com/api/v2/db/_func/my_function</pre>

Revision as of 17:56, 3 February 2016

Tutorial

GET data form a SQL function. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.

API Endpoint

GET https://{url}/api/v2/{api_name}/_func/{function_name}

API Docs Screenshot

Swagger-function.png

Example - GET data from a SQL function

  • Function name: my_function
  • Function_name parameter in API call:
    my_function
  • Request URL:
    https://foo.com/api/v2/db/_func/my_function