Access Using API Key
From DreamFactory
(Created page with "Our 1-click app set up makes it easy to develop your site with the app you enjoy. Need a CMS? Joomla and Drupal are yours for a click. Sell porcelain figurines on your website...") |
(Created page with "### 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 u...") |
||
Line 1: | Line 1: | ||
− | + | ### 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 | ||
+ | |||
+ | <pre>{Method} https://{url}/api/v2/{service}/{resource}?api_key={api-key}</pre> | ||
+ | |||
+ | -- OR -- | ||
+ | |||
+ | <pre>{Method} https://{url}/api/v2/{service}/{resource}</pre> | ||
+ | Request header | ||
+ | <pre> | ||
+ | ... | ||
+ | X-DreamFactory-Api-Key: {api_key} | ||
+ | ... | ||
+ | </pre> | ||
+ | |||
+ | ### Example - Using URL parameter | ||
+ | |||
+ | * Service: system | ||
+ | * Resource: user | ||
+ | * API Key: abc123efg | ||
+ | * Method: GET | ||
+ | * Request URL: | ||
+ | <pre>GET https://foo.com/api/v2/system/user?api_key=abc123efg</pre> | ||
+ | |||
+ | ### Example - Using Request header | ||
+ | |||
+ | * Service: system | ||
+ | * Resource: user | ||
+ | * API Key: abc123efg | ||
+ | * Method: GET | ||
+ | * Request Header: | ||
+ | <pre> | ||
+ | ... | ||
+ | X-DreamFactory-Api-Key: abc123efg | ||
+ | ... | ||
+ | </pre> | ||
+ | * Request URL: | ||
+ | <pre>GET https://foo.com/api/v2/system/user</pre> |
Revision as of 21:34, 14 October 2015
- 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
- Service: system
- Resource: user
- API Key: abc123efg
- Method: GET
- Request URL:
GET https://foo.com/api/v2/system/user?api_key=abc123efg
- Example - Using Request header
- Service: system
- Resource: user
- API Key: abc123efg
- Method: GET
- Request Header:
... X-DreamFactory-Api-Key: abc123efg ...
- Request URL:
GET https://foo.com/api/v2/system/user