Python calling DreamFactory-mounted APIs

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsPython calling DreamFactory-mounted APIs
(Created page with "api = platform['api'] url = 'mysql/api/v2/employees?limit=5' result = api.get(url) print result.status")
 
Line 1: Line 1:
api = platform['api']
+
To seamlessly call DreamFactory-mounted APIs from your Python scripts. You can use the platform's custom data structures to call DreamFactory-hosted APIs like this:
 +
 
 +
<code>api = platform['api']
  
 
url = 'mysql/api/v2/employees?limit=5'
 
url = 'mysql/api/v2/employees?limit=5'
  
result = api.get(url)
+
result = api.get(url)</code>
  
 
print result.status
 
print result.status

Revision as of 19:13, 12 March 2019

To seamlessly call DreamFactory-mounted APIs from your Python scripts. You can use the platform's custom data structures to call DreamFactory-hosted APIs like this:

api = platform['api']

url = 'mysql/api/v2/employees?limit=5'

result = api.get(url)

print result.status