> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Make API Call

- Component: `appmixer.csas.accounts.MakeApiCall`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.csas 1.1.0](https://connectors.appmixer.com/connector/appmixer.csas/1.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.csas/1.1.0/component/appmixer.csas.accounts.MakeApiCall>

Perform an arbitrary authorized call to the Česká spořitelna Accounts API, for example the account balance or statements. The access token and the WEB-API-key header are added automatically.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| API Endpoint Path (`url`) | text | A path relative to the Accounts API base URL (`https://www.csas.cz/webapi/api/v3/accounts` by default), for example `/my/accounts/{id}/balance`. A full URL is accepted only on the same host; any other host is rejected so your credentials are never sent elsewhere. |
| HTTP Method (`method`) | select | The HTTP method for the API call. |
| Query Parameters (`parameters`) | key-value | Optional query parameters, for example `page` and `size`. |
| Request Body (`body`) | textarea | Optional JSON request body. |
| Request Headers (`headers`) | key-value | Optional additional headers. The Authorization and WEB-API-key headers are set automatically. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Status Code (`statusCode`) | integer | - |
| Response Headers (`headers`) | object | - |
| Response Body (`body`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.csas.accounts.MakeApiCall",
  "author": "Appmixer <info@appmixer.com>",
  "label": "Make API Call",
  "description": "Perform an arbitrary authorized call to the Česká spořitelna Accounts API, for example the account balance or statements. The access token and the WEB-API-key header are added automatically.",
  "private": false,
  "auth": {
    "service": "appmixer:csas",
    "scope": [
      "siblings.accounts"
    ]
  },
  "quota": {},
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE"
            ]
          },
          "parameters": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "headers": {
            "type": "string"
          }
        },
        "required": [
          "url",
          "method"
        ]
      },
      "inspector": {
        "inputs": {
          "url": {
            "type": "text",
            "index": 1,
            "label": "API Endpoint Path",
            "tooltip": "A path relative to the Accounts API base URL (<code>https://www.csas.cz/webapi/api/v3/accounts</code> by default), for example <code>/my/accounts/{id}/balance</code>. A full URL is accepted only on the same host; any other host is rejected so your credentials are never sent elsewhere."
          },
          "method": {
            "type": "select",
            "index": 2,
            "label": "HTTP Method",
            "defaultValue": "GET",
            "tooltip": "The HTTP method for the API call.",
            "options": [
              {
                "label": "GET",
                "value": "GET"
              },
              {
                "label": "POST",
                "value": "POST"
              },
              {
                "label": "PUT",
                "value": "PUT"
              },
              {
                "label": "PATCH",
                "value": "PATCH"
              },
              {
                "label": "DELETE",
                "value": "DELETE"
              }
            ]
          },
          "parameters": {
            "type": "key-value",
            "keyLabel": "Key",
            "valueLabel": "Value",
            "addLabel": "Add item",
            "removeLabel": "Remove item",
            "index": 3,
            "label": "Query Parameters",
            "tooltip": "Optional query parameters, for example <code>page</code> and <code>size</code>."
          },
          "body": {
            "type": "textarea",
            "index": 4,
            "label": "Request Body",
            "tooltip": "Optional JSON request body."
          },
          "headers": {
            "type": "key-value",
            "keyLabel": "Key",
            "valueLabel": "Value",
            "addLabel": "Add item",
            "removeLabel": "Remove item",
            "index": 5,
            "label": "Request Headers",
            "tooltip": "Optional additional headers. The Authorization and WEB-API-key headers are set automatically."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer",
            "title": "Status Code",
            "example": 200
          },
          "headers": {
            "type": "object",
            "title": "Response Headers",
            "properties": {}
          },
          "body": {
            "type": "object",
            "title": "Response Body",
            "properties": {}
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
