> For the complete documentation index, see [llms.txt](https://docs.medialooks.com/direct-take-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.medialooks.com/direct-take-docs/rest-api-methods/add-a-new-destination.md).

# Destinations

## Add a new Destination

<mark style="color:green;">`POST`</mark> `http://recording_server:9000/api/destinations`

Add a new output configuration for local file encoding or network streaming

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | API Token   |

#### Request Body

| Name                      | Type    | Description                                                                                                                                                              |
| ------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name                      | string  | Sets a name of a Destination                                                                                                                                             |
| Location                  | string  | Sets a folder to store the recording files                                                                                                                               |
| Type                      | string  | Either "*Local File Recording*" or "*Network Streaming*"                                                                                                                 |
| URL                       | string  | Target URL for streaming                                                                                                                                                 |
| StreamKey                 | string  | Stream Key for streaming                                                                                                                                                 |
| NamingTemplate            | string  | A template to name the resulting files                                                                                                                                   |
| OverwriteExistingFiles    | boolean | Indicates whether the resulting files should be overwritten                                                                                                              |
| SplitIntervalString       | string  | Specifies a time for splitting the recorded files into equal chunks                                                                                                      |
| PresetName                | string  | A name of encoding preset                                                                                                                                                |
| PostCapturingAction       | string  | <p>Sets an action for the recorded files. <br>Possible values are "<em>Do Nothing</em>", "<em>Move after recording to</em>", and "<em>Copy after recording to</em>" </p> |
| PostCapturingActionTarget | string  | Sets a folder to copy or move the recorded files if the PostCapturingAction is set.                                                                                      |

{% tabs %}
{% tab title="200 Successfully added" %}

```
```

{% endtab %}
{% endtabs %}

## Update a Destination

<mark style="color:orange;">`PUT`</mark> `http://recording_server:9000/api/destinations/{index}`

Changes parameters of an existing Destination by its index

#### Query Parameters

| Name    | Type   | Description                                   |
| ------- | ------ | --------------------------------------------- |
| {index} | string | Specifies an index of a Destination to update |

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | API Token   |

#### Request Body

| Name                      | Type    | Description                                                                                                                                                              |
| ------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name                      | string  | Sets a name of a Destination                                                                                                                                             |
| Location                  | string  | Sets a folder to store the recording files                                                                                                                               |
| Type                      | string  | Either "*Local File Recording*" or "*Network Streaming*"                                                                                                                 |
| URL                       | string  | Target URL for streaming                                                                                                                                                 |
| StreamKey                 | string  | Stream Key for streaming                                                                                                                                                 |
| NamingTemplate            | string  | A template to name the resulting files                                                                                                                                   |
| OverwriteExistingFiles    | boolean | Indicates whether the resulting files should be overwritten                                                                                                              |
| SplitIntervalString       | string  | Specifies a time for splitting the recorded files into equal chunks                                                                                                      |
| PresetName                | string  | A name of encoding preset                                                                                                                                                |
| PostCapturingAction       | string  | <p>Sets an action for the recorded files. <br>Possible values are "<em>Do Nothing</em>", "Move <em>after recording to</em>", and "<em>Copy after recording to</em>" </p> |
| PostCapturingActionTarget | string  | Sets a folder to copy or move the recorded files if the PostCapturingAction is set.                                                                                      |

{% tabs %}
{% tab title="200 Successfully updated" %}

```
```

{% endtab %}
{% endtabs %}

## Get a Destination

<mark style="color:blue;">`GET`</mark> `http://recording_server:9000/api/destinations/{index}`

Returns a Destination by its index

#### Query Parameters

| Name    | Type    | Description                                   |
| ------- | ------- | --------------------------------------------- |
| {index} | integer | Specifies an index of a Destination to return |

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | API Token   |

{% tabs %}
{% tab title="200 Successfully returned" %}

```
{
  "Name": "Destination 1",
  "Location": "C:\\Files",
  "Type": "Local File Recording",
  "URL": "",
  "StreamKey": "",
  "NamingTemplate": "{source_name}_{hour}-{minute}-{second}",
  "OverwriteExistingFiles": false,
  "SplitIntervalString": "00:00:00",
  "PresetName": "Encoding preset #4",
  "PostCapturingAction": "Do nothing",
  "PostCapturingActionTarget": ""
}
```

{% endtab %}
{% endtabs %}

## Get all the Destinations

<mark style="color:blue;">`GET`</mark> `http://recording_server:9000/api/destinations`

Returns all the available Destinations

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | API Token   |

{% tabs %}
{% tab title="200 Successfully returned" %}

```
[
  {
    "Index": 0,
    "Name": "Destination 1",
    "Type": "Local File Recording"
  }
]
```

{% endtab %}
{% endtabs %}

## Remove a Destination

<mark style="color:red;">`DELETE`</mark> `http://recording_server:9000/api/destinations/{index}`

Removes a Destination by its index

#### Query Parameters

| Name    | Type    | Description                                   |
| ------- | ------- | --------------------------------------------- |
| {index} | integer | Specifies an index of a Destination to remove |

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | API Token   |

{% tabs %}
{% tab title="200 Successfully removed" %}

```
```

{% endtab %}
{% endtabs %}
