Restricted API Keys are designed to allow you to distribute and share data within your organization in a secure and controllable way. External consultants, consulting agencies, partners, trainees, are all people who need to access a part of your analytical data at a particular time without having access to the whole data. Restricted API Keys allow you to create a key that will give access to a single set of data and will be denied access to all the rest. You can also choose a date range over which it will be active, for example the duration of a service with a partner.
NoteThe functionality can be activated by making a request to the support center.
Create a restricted API Key
The first step will be to configure the dataset to meet your needs. If you don't know how to use Data Query, you can find all the information in this article.
Once you have created your dataset with your properties, metrics and potential filters or segments, you need to click on the Generate a restricted Key API button as you can see.
A window will open, allowing you to configure some information:
Thus, we find from top to bottom:
- The period on which the restricted API Key will be valid, outside this period it will not work anymore.
- The label, it will allow you to find your API Keys in the near future in order to make a fine management.
- The Endpoint and the Body which are necessary to make the API call, but we will come back to this in the dedicated part.
NoteA restricted API Key cannot be modified. If you want to change the properties, metrics or validity period, it is necessary to recreate a restricted API Key. Also, once expired it will be necessary to recreate it and a different API Key will be generated.
Once the configuration is done, you can click on the Generate API Key button.
WarningAt this point, a new field is added, it contains the API Key to use, it is very important to copy it and store it on your side. Indeed, for security reasons, we can not restore the entire key after its creation.
Use a restricted API Key
The use of the restricted API Key screw is very similar to the use of our API, we recommend you to find how to use it in this documentation.
However, it is still necessary to add some information on the body:
- It must not contain the columns and rows of the call. This information is directly contained in the restricted Key API
- You can change the date as you want, all the information about this parameter is available in this article.
NoteThe date can only be overloaded with the date type that was present when the restricted API Key was generated. If for example there was only p1 then putting p2 in addition will return an error
How to delete a restricted API Key?
For the moment, it is necessary to contact the support center with the API Key that you want to delete and we will proceed to its deactivation.