# API Server Setup

### How to Configure API Server <a href="#sapj2eesystem-howtoconfigureremotemonitoringofsapj2ee" id="sapj2eesystem-howtoconfigureremotemonitoringofsapj2ee"></a>

**API Server** enables on-premises local access to the IT-Conductor API interface. The Gateway(s) must be configured to act as an API Server.

1\. In the IT-Conductor main menu, navigate to **Dashboards > Administrator.**

![Figure 1: IT-Conductor Dashboard Menu](/files/zZ3m1OVNUgXN0yuGTjcs)

2.) Click the **Gateway** you would like to configure to show the metric object menu. Then, click **Modify.**

![Figure 2: Sample Gateway to Modify](/files/MUQAKl2xtE4INayFoBhM)

![Figure 3: Modify Option](/files/XWXCGq1UkkkGn2ZXK0pD)

3.) Check the **API Server** checkbox and specify the API Server Port value. Then, click the **"Save"** icon.

{% hint style="info" %}
**Note:** Ensure the port is available for listening and is not blocked by the local firewall.
{% endhint %}

![Figure 4: API Server and API Server Port Modification](/files/odAf9nUpkO1qX3PqXi8Y)

Within several minutes the Gateway will start the API server.

### Usage <a href="#apiserversetup-usage" id="apiserversetup-usage"></a>

The IT-Conductor Gateway on Windows includes a client program that can interact with the API server.

The "ITCAPIClient.exe" program can be found in the Gateway installation folder "C:\Program Files\IT-Conductor\Agent\bin" and can be copied to another folder or another Windows computer. There are no external dependencies except Windows .Net Framework 4.5.

The program usages are as the following:

```
C:\Program Files\IT-Conductor\Agent\bin>ITCAPIClient.exe
Usage: -server <host>:<port> -class <Class> <options>
        Options:
        When -class Notify specified:
                [-ACTIVITY_QueueId <Person ID>|<Group ID>|<Role ID>]
                [-NOTIFY_TargetClass Person|Group|Role|Customer] : ignored if ACTIVITY_QueueId is specified
                [-NOTIFY_TargetAttrName PERSON_LoginName|OBJECT_Name] : ignored if ACTIVITY_QueueId is specified
                [-NOTIFY_TargetAttrValue <Person Login>|<Group Name>|<Role Name>] : ignored if ACTIVITY_QueueId is specified
                -NOTIFY_Subject <subject>
                -NOTIFY_MessageLong <message>
        When -class <other> specified:
                Not documented
```

The sample below will create an IT-Conductor Notification for the IT-Conductor user identified by e-mail "<admin@itconductor.com>". The Notification will send e-mail(s) based on the person's notification schedule.

```
ITCAPIClient ozraid01:8881 -class Notify -NOTIFY_TargetClass Person -NOTIFY_TargetAttrName PERSON_LoginName -NOTIFY_TargetAttrValue admin@itconductor.com -NOTIFY_Subject "Test Message" -NOTIFY_MessageLong "This is a test message sent via API Server"
```

The sample below will create IT-Conductor Notification for the IT-Conductor group BasisAdmins. The Notification will send e-mail(s) to all group members based on their notification schedules.

```
ITCAPIClient ozraid01:8881 -class Notify -NOTIFY_TargetClass Group -NOTIFY_TargetAttrName OBJECT_Name -NOTIFY_TargetAttrValue BasisAdmins -NOTIFY_Subject "Test Message" -NOTIFY_MessageLong "This is a test message sent via API Server"
```

The IT-Conductor Gateway on Linux does not include a client program however it is possible to use wget in a similar manner:

```
wget http://<host>:<port>/<Class>?<options>
Options:
        When Class Notify specified:
                [ACTIVITY_QueueId=<Person ID>|<Group ID>|<Role ID>&]
                [NOTIFY_TargetClass=Person|Group|Role|Customer&] : ignored if ACTIVITY_QueueId is specified
                [NOTIFY_TargetAttrName=PERSON_LoginName|OBJECT_Name&] : ignored if ACTIVITY_QueueId is specified
                [NOTIFY_TargetAttrValue=<Person Login>|<Group Name>|<Role Name>&] : ignored if ACTIVITY_QueueId is specified
                NOTIFY_Subject=<subject>&
                NOTIFY_MessageLong=<message>&
        When other classes specified:
                Not documented
```

For example:

```
wget http://ozraid01:8881/Notify?NOTIFY_TargetClass=Person&NOTIFY_TargetAttrName=PERSON_LoginName&NOTIFY_TargetAttrValue=admin@itconductor.com&NOTIFY_Subject=Test Message&NOTIFY_MessageLong=This is a test message sent via API Server
```

This notation can also be used from any web browser for testing purposes.


---

# 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.itconductor.com/~/changes/j1RdUn49WBcajmJEmXUf/start-here/api-server-setup.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.
