# API Client Registration

{% hint style="info" %}
Check out the given illustration to understand the API Client Registration functionality.
{% endhint %}

<figure><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F7oCHzq8fhoLOR9vVRVcO%2FClientRegistration.gif?alt=media&#x26;token=746f1535-fe90-4199-9920-c8a6da0b3851" alt=""><figcaption></figcaption></figure>

The API Client Registration option helps the user to register and save the specific details of API Clients. The API Client Registration form requires a specific data set link published as a service to complete the registration process.

* Navigate to the ***Admin Module.*** &#x20;
* Click the ***Menu*** icon to open the admin menu panel.    &#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FIG9Ba21N9EF2IL29G9L5%2Fimage.png?alt=media\&token=56a1a61a-8d48-473c-bc45-052d2445d489)

* Click the **API Client Registration** option from the displayed menu panel.

&#x20;     ![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Folwevql5aZvJJautfaza%2Fimage.png?alt=media\&token=33778c9e-7839-45cb-a43b-bfe5734d4cd5)

* The ***API Client Registration*** ***page*** opens.
* Click the ***New*** option to create new client registration.          &#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FrY5BzkQqViWLph3j3wEp%2Fimage.png?alt=media\&token=36156963-9793-4afd-a36e-b2c4b428fce1)

* The  two **Authentication** types are available: **Internal** or **External (**&#x54;he user can select any one of them).&#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FiUowq4saNcWfrCzFw1Kp%2Fimage.png?alt=media\&token=2309644b-67a8-4d58-80a6-6b197aac54ac)

### Internal Client Registration

If **Internal** option is selected **Authentication** will happen from the platform side by using client id, client secret & app name.

* Select ***Internal*** as the authentication option.
* Provide the following information:
  * Client Name
  * Client Email
  * App Name
  * Request Per Hour
  * Request Per Day
  * Select API Type: Select either of the options: ***Data as API*** or ***Model as API***

{% hint style="info" %} <mark style="color:green;">Please Note</mark>: Select API Type: The user can select any one of the given choices. Both **Data as API** & **Model as API** support Internal Authentication. So the user needs to select either one of them in **Select API Type**.

{% endhint %}

* After selecting one option from the Select API Type, the Select the Service Entitled field appears (The user can select multiple Data as API or Model as API by using this field).
* Click the ***Save*** option.   &#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Frx8MCC0v5K7qyvHQiIei%2Fimage.png?alt=media\&token=b853ab20-82f7-4411-b48f-74b8ae7879a5)

* A success message appears.
* The created API Client gets listed at the top of the displayed list.

![The Internal API Client gets registered](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FihBAPnbXu8F7CYZKz9l5%2Fimage.png?alt=media\&token=76c7e423-c455-4bf5-a2cc-5694c12f369f)

{% hint style="info" %} <mark style="color:green;">Please Note:</mark>

* The **client id** and **client secret** will be automatically generated by the platform while saving the **API Client Registration**.
* Both **Data as API** & **Model as API** support Internal Authentication. So the user needs to select either one of them in **Select API Type**.&#x20;
  {% endhint %}

### External Client Registration&#x20;

The **External** option does not support **Authentication** by using client id, client secret, and app name. The user needs to authenticate by providing the secret Key and  Values/Mapping key. The authentication will consider only if the selected ***Validation Type*** is ***Validated.***

* Select the ***External*** option. &#x20;
* Provide the following details:
  * Client Name
  * Client Email&#x20;
  * Select the entitled services from the drop-down menu.
* Provide Key, Validation Type and Value/Mapping Key.
* Click the ***Save*** option.&#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F5R0jXpuIlIYASYCBIgqJ%2Fimage.png?alt=media\&token=a01b5779-2251-475a-8183-bac8d34d02fc)

{% hint style="info" %} <mark style="color:green;">Please Note:</mark> The **Select the Services Entitled** will display the data sets published as service from the **Data Center** module of the platform.
{% endhint %}

* A notification message appears.
* The ***API Client*** details get saved under the ***Client List.***  &#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FfCrM0bnM1H7v25Momxfi%2Fimage.png?alt=media\&token=2010fd95-d45e-448c-9dd9-f15fd9c81a67)

### **How to call the API from POSTMAN**

#### **Internal Authentication API**

* Click the ***Edit*** option for the saved API Client Registration.&#x20;
* The API Client Registration form reopens.
* The user can get the ***Client Id***, ***Client Secret***, and ***App Name***.  &#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fa9H5pAr4910xbqKcYHaw%2Fimage.png?alt=media\&token=3ca8c5f2-4068-45eb-99b8-df426c7cc2ba)

* Pass the ***Client id, Client Secret Key,*** and ***App Name*** in the ***Postman GET/ POST*** call to get the response.    &#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FwVfyX1EMRcT26B3IqmBx%2Fimage.png?alt=media\&token=25e972ec-8be2-44db-916c-a4a5765dde62)

#### External Authentication API

* Click on the ***Edit*** option for the saved API Client Registration.
* The API Client Registration form reopens.
* Select the entitled Service.
* The user can get the following information about the API Service:
  * Key
  * Validation Type
  * Value/ Mapping Key

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FBuDXJwNUDeHLEbfXVjw6%2Fimage.png?alt=media\&token=d2d952f4-ee4c-4442-8306-f91d620d3db6)

* Pass these information in the ***Postman GET/POST*** call to get the response.

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fu2GSn7ubAGlshaPqyRAr%2Fimage.png?alt=media\&token=60acf769-3f67-4428-a500-f39e73d96ed8)
