# API Manager

<figure><img src="https://2655769465-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjVABEcCgwItwY4IEAD%2Fuploads%2FR8WFbyanpr9Zq6E2XmQQ%2FAPI%20Manager.png?alt=media&#x26;token=676fc8f4-d219-4a6c-8525-d426c001d8ce" alt=""><figcaption></figcaption></figure>

* [Add/Edit API](#add-edit-api)
* [Create as Private API](#create-as-private-api)
* [Test API](#test-api)

## Add/Edit API

To manage a new API, click on "Add New" on the API manager page. A new window will open and this is where you will define parameters and other details for your API.

{% hint style="success" %}
For a private system, APIs can be added only when it has at least one credential.
{% endhint %}

{% hint style="danger" %}
DCKAP Integrator API Manager is only intended to manage APIs. The API is expected to be available in the respective systems. Adding an API here will not create the API in the respective system.
{% endhint %}

<figure><img src="https://2655769465-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjVABEcCgwItwY4IEAD%2Fuploads%2FdPoPlKjw9kAFPxugjMnw%2FAdd%20New%20API.png?alt=media&#x26;token=5238b639-5d27-4902-8def-93bb653ebec5" alt=""><figcaption></figcaption></figure>

Provide the values for the below fields.

1. **Name**: Provide a suitable name for your API. Example: Magento2 Update Customers, P21 Get Customer Info, etc.
2. **Status**: This is a toggle ON/OFF button that allows you to enable/disable an API
3. Provide request [method](https://docs.dckapintegrator.com/project-manager/systems/api-components#request-methods), [URL](https://docs.dckapintegrator.com/project-manager/systems/api-components#relative-url-endpoint), [headers](https://docs.dckapintegrator.com/project-manager/systems/api-components#headers), [params](https://docs.dckapintegrator.com/project-manager/systems/api-components#params) and [body](https://docs.dckapintegrator.com/project-manager/systems/api-components#request-body) for the API
4. Provide [request and response](#for-mapping-request-and-response) to use in the mapping. [Learn more.](https://docs.dckapintegrator.com/developers/api-and-mapping)
5. Provide [other details](#other-details) section (Optional)
6. API can be tested from here if needed. Navigate to [Test API](https://docs.dckapintegrator.com/project-manager/systems/api-manager/test-api)
7. Click `Save API` button to save this API.&#x20;

{% hint style="success" %}
Use the `Save All API` button to save multiple added/modified APIs at once
{% endhint %}

{% hint style="info" %}
For protocols like FTP and SFTP, APIs cannot be added. Instead, it will be used with the help of flow handlers like [FTP Reader](https://docs.dckapintegrator.com/developers/flows#ftp-reader), [FTP Writer](https://docs.dckapintegrator.com/developers/flows#ftp-writer), [SFTP Reader](https://docs.dckapintegrator.com/developers/flows#sftp-reader) & [SFTP Writer](https://docs.dckapintegrator.com/developers/flows#sftp-writer).&#x20;
{% endhint %}

### For Mapping: Request and Response

The Request and Response sections contain sample JSON data. The keys given in this JSON sample are displayed as fields in the Mapping area Source and Destination sections to enable mapping.

<figure><img src="https://2655769465-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjVABEcCgwItwY4IEAD%2Fuploads%2FwuROcTKlzzpF9nLZNg2v%2FAPI%20For%20Mapping.png?alt=media&#x26;token=abf8906f-d2fc-4ddc-8119-258eba8c9e18" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
The sample request and response fields are optional (but ***recommended***) in the API Manager. If no data is entered here, then the Source and Destination fields will be empty on the Mapping configuration page.
{% endhint %}

### Other Details

#### **Skip Authentication**

Ability to skip the parent system authentication. Applicable only to systems using the following protocols - OAuth1, OAuth2, NTLM, Amazon-LWA.

#### **Override Timeout**

This is a toggle ON/OFF button that lets you choose between custom/default "maximum allowed time" values, before which a Timeout error is thrown. *Users can enter only 4-digit numeric values in the Connect and Read fields.*&#x20;

* **Override Timeout ON**: Once the Override Timeout is set to ON, two fields- Connect and Read- are displayed. You may set a time (in seconds)   in both these fields.
  * "Connect" refers to the maximum allowed time for DCKAP Integrator to establish communication with the system to which the API call is made.&#x20;
  * "Read" refers to the maximum allowed time for the system to respond back to DCKAP Integrator.
* **Override Timeout OFF:** Setting the Override Timeout to OFF, will consider default values for "Connect" and "Read".
* The default value for Read = 240 seconds. The default value for Connect = 30 seconds

#### **Description**

Provide the description/notes for the API

## Create as Private API

This is applicable to Public APIs only. Using this option, any public API can be duplicated and created as a private API to make necessary modifications.

<figure><img src="https://2655769465-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjVABEcCgwItwY4IEAD%2Fuploads%2FOtus4yKIsgt6VW26k1m6%2FAPI%20Manager%20-%20Create%20as%20custom%20API.png?alt=media&#x26;token=3dd15282-fbe0-420c-af65-ba6b6ac85ddc" alt=""><figcaption></figcaption></figure>

## Test API

Navigate below to learn about API testing from Integrator

{% content-ref url="api-manager/test-api" %}
[test-api](https://docs.dckapintegrator.com/project-manager/systems/api-manager/test-api)
{% endcontent-ref %}
