Access Using API Key

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsAccess Using API Key
m (Updated the example / details order to show the example first)
Line 20: Line 20:
 
=== Example - Using URL parameter ===
 
=== Example - Using URL parameter ===
  
 +
<pre>GET https://foo.com/api/v2/system/user?api_key=abc123efg</pre>
 
* Service: system
 
* Service: system
 
* Resource: user
 
* Resource: user
Line 25: Line 26:
 
* Method: GET
 
* Method: GET
 
* Request URL:
 
* Request URL:
<pre>GET https://foo.com/api/v2/system/user?api_key=abc123efg</pre>
+
 
  
 
=== Example - Using request header ===
 
=== Example - Using request header ===
  
* Service: system
 
* Resource: user
 
* API Key: abc123efg
 
* Method: GET
 
* Request Header:
 
 
<pre>
 
<pre>
 
...
 
...
Line 39: Line 35:
 
...
 
...
 
</pre>
 
</pre>
* Request URL:
+
 
 +
Request URL:
 
<pre>GET https://foo.com/api/v2/system/user</pre>
 
<pre>GET https://foo.com/api/v2/system/user</pre>
 +
 +
* Service: system
 +
* Resource: user
 +
* API Key: abc123efg
 +
* Method: GET
 +
* Request Header:

Revision as of 21:36, 5 May 2016

Tutorial

DreamFactory 2.0 APIs can be consumed with just an API Key. The access is limited by the default role assigned to the application of the API key that is being used.

API Endpoints

{Method} https://{url}/api/v2/{service}/{resource}?api_key={api-key}

-- OR --

{Method} https://{url}/api/v2/{service}/{resource}

Request header

...
X-DreamFactory-Api-Key: {api_key}
...

Example - Using URL parameter

GET https://foo.com/api/v2/system/user?api_key=abc123efg
  • Service: system
  • Resource: user
  • API Key: abc123efg
  • Method: GET
  • Request URL:


Example - Using request header

...
X-DreamFactory-Api-Key: abc123efg
...

Request URL:

GET https://foo.com/api/v2/system/user
  • Service: system
  • Resource: user
  • API Key: abc123efg
  • Method: GET
  • Request Header: