# Private Systems

If you cannot find the system that you are looking for, you can create a private system and use it. These systems are private and only accessible to the project members.

* [Add a Private System](#add-private-system)
* [Edit a Private System](#edit-a-private-system)

## Add Private System

#### Step 1: Choose from Systems

<figure><img src="/files/Nl65GoDO2McPikTYzAx0" alt=""><figcaption></figcaption></figure>

#### Step 2: Provide system details

<figure><img src="/files/iPaiuqiUuvRIjNvNQ0Hd" alt=""><figcaption></figcaption></figure>

Provide the following information and then provide the necessary credentials to make the connection.

* **System Name:** Name of the system
* **System Logo:** Image file of the system logo
* **Get Hostname from User (Yes/No):**&#x20;
  * If yes, the hostname will be prompted from the Credentials. This will be helpful when you have multiple environments like staging and production.
  * If no, the user has to provide the URL with the hostname in the API Manager
* **Status enabled/disabled:** To enable or disable the system to use in other modules
* **Authentication Type:** The Authentication to be used by the system. The following authentication methods are available in the dropdown list:
  * No Auth
  * Cookies Authentication
  * OAuth1
  * [OAuth2](/project-manager/systems/authentication-types/oauth-2.0.md)
  * NTLM
  * Basic Authentication
  * MySQL Authentication
* **Description:** Description of the system
* **Token Failure Status Code:** The status code that the system will return for an invalid token. Example: 401, 403
* **Timeout:** This is the "maximum allowed time" value, before which a Timeout error is thrown. You can set a time (in seconds) for both the "Connect" and "Read" fields.
  * "Connect" refers to the maximum allowed time for DCKAP Integrator to establish communication with the system to which the API call is made.
  * "Read" refers to the maximum allowed time for the system to respond back to DCKAP Integrator.

{% hint style="info" %}
Users can enter only 4-digit numeric values in the Connect and Read fields.

* The default value for Connect = 30 seconds
* The default value for Read = 240 seconds
  {% endhint %}

### Test Connection

#### URL

The Test connection API is used to check if DCKAP Integrator is successfully connected to your system.&#x20;

{% hint style="info" %}
If the user has chosen `Get Hostname from User` as `NO`, then the hostname should be provided in the URL here.
{% endhint %}

Some example URLs are:

```
/SapB1/controller/testConnection
https://www.example.com/api/Ping/PingToken
```

#### Params, Header, and Body

Three fields are set for each parameter/header/body:

<table data-header-hidden><thead><tr><th width="134.66666666666669">Field</th><th width="301">Description</th><th>Example</th></tr></thead><tbody><tr><td>Field</td><td>Description</td><td>Example</td></tr><tr><td>Label</td><td>A suitable display name for headers/params/body data</td><td>Content-Type</td></tr><tr><td>Key</td><td>Variable name at which the value is populated</td><td>Content-Type</td></tr><tr><td>Value</td><td>The actual value stored in the Key</td><td><p>Support Content Types</p><ul><li>application/json</li><li>application/xml</li></ul></td></tr></tbody></table>

If the `Authorization` Header key has a value: "DYNAMIC\_TOKEN", and then the Dynamic Token section gets populated on the screen. [Learn more.](#1.-dynamic_token)

{% hint style="info" %}
DCKAP Integrator has the ability to provide a static value directly here. But if the dynamic token is to be generated from a different URL, this keyword can be used.
{% endhint %}

#### Error Handler

By default, DCKAP Integrator treats all status codes other than 200 as errors. But some systems provide error responses in the 200 OK status code itself. This section is used to identify those scenarios and treat them as errors. Users can configure the error messages that need to be displayed during the "Test Connection" process.

Provide the following details:

* **Status Code**: The code for which the error is thrown. *Example*: 200
* **Validator**: The logic that validates the error message. *Example*: isValid= Yes/No
* **Message**: Enter the content that needs to be displayed in the error message. The "key" of the message to be displayed is given here.&#x20;

  *Example*: <br>

  `200 Error Response`

  `{"isValid": "No", message: "Some Error Occured"}`<br>

  `200 Success Response`

  `{"isValid": "Yes", data: {...}}`<br>

#### Available Keywords

#### 1. DYNAMIC\_TOKEN

Example Dynamic Token URL: `/connect/token`

The Dynamic token body contains information on how the token is generated. It can either be a username/ password combination or a client id/ client secret combination got from the user. The token generated using this information is utilized while triggering any API Call to the system.

{% hint style="info" %}
DYNAMIC\_TOKEN is also supported in the raw body of the request. While using in the body, the user can provide a content type to pass in the respective format. By default, DYNAMIC\_TOKEN will be passed as a string. To pass as JSON, add `content-type: application/json`.
{% endhint %}

**Authorization**: This is the Header that is used in most API calls and is used to validate the API request using the authorization token. This token is stored in the system and will be inherited whenever the API is called.

Define the TokenURL in the System page as /get/token or /connect/token, etc.. depending on the system.

![](/files/-MMV5gVKPHDadb5EffeR)

**Sample Use Cases:** Now, let's say your system requires a Username and Password to return a token. After providing the Username and Password on the System page, DCKAP Integrator will use that information to get the token by triggering the TokenUrl.

The following are four use cases explaining how to provide Authorization details in the API Manager page to retrieve token details from the TokenURL API response.

<table data-header-hidden><thead><tr><th width="227">Sample Response from the TokenURL API</th><th width="231.66666666666669">Format in which the system API Accepts token</th><th>Structure to enter in your API managerLabel: As you wishKey: Usually "Authorization". This might differ according to your system</th></tr></thead><tbody><tr><td>Sample Response from the TokenURL API</td><td>Format in which the system API Accepts token</td><td>Structure to enter in your API manager</td></tr><tr><td><strong>Value</strong>:</td><td><strong>Label</strong>: As you wish</td><td><strong>Key</strong>: Usually "Authorization". This might differ according to your system</td></tr><tr><td><p>response =</p><p> {</p><p>"token":"TOKEN_VALUE_FROM_THE_SYSTEM"</p><p>}</p></td><td>Bearer TOKEN_VALUE_FROM_THE_SYSTEM</td><td>Bearer DYNAMIC_TOKEN[token]</td></tr><tr><td>response = "TOKEN_VALUE_FROM_THE_SYSTEM"</td><td>Bearer TOKEN_VALUE_FROM_THE_SYSTEM</td><td>Bearer DYNAMIC_TOKEN</td></tr><tr><td><p>response =</p><p> {</p><p>"authentication":{</p><p>"access_token":"TOKEN_VALUE_FROM_THE_SYSTEM"</p><p>}</p><p>}</p></td><td>Bearer TOKEN_VALUE_FROM_THE_SYSTEM</td><td>Bearer DYNAMIC_TOKEN[authentication][access_token]</td></tr><tr><td><p>response = {</p><p>"authentication":{</p><p>"access_token":"TOKEN_VALUE_FROM_THE_SYSTEM"</p><p>}</p><p>}</p></td><td>Basic TOKEN_VALUE_FROM_THE_SYSTEM</td><td>Basic DYNAMIC_TOKEN[authentication][access_token]</td></tr></tbody></table>

#### 2. GET\_FROM\_CREDENTIALS

The data field for which `GET_FROM_CREDENTIALS` is entered here will be obtained from the user while configuring the System Credentials.

In the following example, the "username" value will be populated in the Credentials section for the user to enter.

<figure><img src="/files/UuzSfBnp5dZnDRJMfFIf" alt=""><figcaption></figcaption></figure>

Below is the prompt in the credentials section

!["username" field populates in Credentials page](/files/-MMV5gVMM61Es0sdHLuV)

## Edit a Private System

Click "Edit System" on the System details page to manage the system fields.

<figure><img src="/files/gsReV46qQXkceTTETB7Q" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dckapintegrator.com/project-manager/systems/private-systems.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
