# StreamsOutputsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createStreamInputOutput**](#createstreaminputoutput) | **POST** /streams/{streamId}/outputs | Add a restream output to a stream input|
|[**deleteStreamInputOutput**](#deletestreaminputoutput) | **DELETE** /streams/{streamId}/outputs/{outputId} | Delete a stream input\&#39;s restream output|
|[**getStreamInputOutput**](#getstreaminputoutput) | **GET** /streams/{streamId}/outputs/{output} | Get a stream\&#39;s output destination|
|[**getStreamInputOutputs**](#getstreaminputoutputs) | **GET** /streams/{streamId}/outputs | List a stream\&#39;s output destinations|
|[**updateStreamInputOutput**](#updatestreaminputoutput) | **PUT** /streams/{streamId}/outputs/{outputId} | Enable or disable a stream output|

# **createStreamInputOutput**
> CreateStreamInputOutput200Response createStreamInputOutput(streamInputOutputCreateInputs)

Creates a new output (e.g. an RTMP restream destination) on the Cloudflare live input for the given streamId, forwarding the live feed to an external URL and stream key; requires the read and create permissions on streams.

### Example

```typescript
import {
    StreamsOutputsApi,
    Configuration,
    StreamInputOutputCreateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StreamsOutputsApi(configuration);

let streamId: string; //The stream identifier (default to undefined)
let streamInputOutputCreateInputs: StreamInputOutputCreateInputs; //

const { status, data } = await apiInstance.createStreamInputOutput(
    streamId,
    streamInputOutputCreateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **streamInputOutputCreateInputs** | **StreamInputOutputCreateInputs**|  | |
| **streamId** | [**string**] | The stream identifier | defaults to undefined|


### Return type

**CreateStreamInputOutput200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **deleteStreamInputOutput**
> CreateAccountInvitations200Response deleteStreamInputOutput()

Permanently removes the specified output (outputId) from the Cloudflare live input of the given stream (streamId), stopping that restream destination; requires the read and update permissions on streams.

### Example

```typescript
import {
    StreamsOutputsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StreamsOutputsApi(configuration);

let streamId: string; //The stream identifier (default to undefined)
let outputId: string; //The output identifier (default to undefined)

const { status, data } = await apiInstance.deleteStreamInputOutput(
    streamId,
    outputId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **streamId** | [**string**] | The stream identifier | defaults to undefined|
| **outputId** | [**string**] | The output identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getStreamInputOutput**
> CreateStreamInputOutput200Response getStreamInputOutput()

Returns details for a single restream output (e.g. a third-party RTMP destination) configured on the given stream input; requires read permission on streams.

### Example

```typescript
import {
    StreamsOutputsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StreamsOutputsApi(configuration);

let streamId: string; //The stream identifier (default to undefined)
let output: string; //The output identifier (default to undefined)

const { status, data } = await apiInstance.getStreamInputOutput(
    streamId,
    output
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **streamId** | [**string**] | The stream identifier | defaults to undefined|
| **output** | [**string**] | The output identifier | defaults to undefined|


### Return type

**CreateStreamInputOutput200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getStreamInputOutputs**
> GetStreamInputOutputs200Response getStreamInputOutputs()

Returns the list of restream output destinations (e.g. third-party RTMP targets) configured for the given stream input; requires read permission on streams.

### Example

```typescript
import {
    StreamsOutputsApi,
    Configuration
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StreamsOutputsApi(configuration);

let streamId: string; //The stream identifier (default to undefined)
let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getStreamInputOutputs(
    streamId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **streamId** | [**string**] | The stream identifier | defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetStreamInputOutputs200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **updateStreamInputOutput**
> CreateStreamInputOutput200Response updateStreamInputOutput(streamInputOutputUpdateInputs)

Toggles the enabled state of the specified restream output (outputId) on a stream input\'s Cloudflare live input, starting or stopping that restream destination; requires the read and update permissions on streams.

### Example

```typescript
import {
    StreamsOutputsApi,
    Configuration,
    StreamInputOutputUpdateInputs
} from '@connectedxm/admin-sdk';

const configuration = new Configuration();
const apiInstance = new StreamsOutputsApi(configuration);

let streamId: string; //The stream identifier (default to undefined)
let outputId: string; //The output identifier (default to undefined)
let streamInputOutputUpdateInputs: StreamInputOutputUpdateInputs; //

const { status, data } = await apiInstance.updateStreamInputOutput(
    streamId,
    outputId,
    streamInputOutputUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **streamInputOutputUpdateInputs** | **StreamInputOutputUpdateInputs**|  | |
| **streamId** | [**string**] | The stream identifier | defaults to undefined|
| **outputId** | [**string**] | The output identifier | defaults to undefined|


### Return type

**CreateStreamInputOutput200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

