How To Connect to Data Using API Key for Authorization in the RESTful Engine
This article explains the process of changing your Access Provider to Request Header in the RESTful Engine. This new feature allows better security of your API key since you no longer need to specify the key a URL (which can be cached and shared). This applies to json
, xml
, odata
and salesforce
datasource types.
To add a new data source with Request Header Authorization, copy and paste the following code into your v2/document/POST method . Be sure to set the proper data source name / type and to insert your API token, key, and URL where instructed.
<Datasources>
<Datasource>
<Type>type</Type>
<Name>name</Name>
<ConnectionString>AccessProvider=RequestHeader;HKey=**Insert API Token Here**;Password=**Insert API Key Here**;Url=**Insert API URL Here**</ConnectionString>
</Datasource>
</Datasources>