# StorageVideosApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteManyVideos**](#deletemanyvideos) | **POST** /videos/delete | Delete multiple videos|
|[**deleteVideo**](#deletevideo) | **DELETE** /videos/{videoId} | Delete a video|
|[**getVideo**](#getvideo) | **GET** /videos/{videoId} | Get a video|
|[**getVideoDownloadStatus**](#getvideodownloadstatus) | **GET** /videos/{videoId}/downloads | Get a video\&#39;s MP4 download status|
|[**getVideos**](#getvideos) | **GET** /videos | List an organization\&#39;s videos|
|[**initiateVideoDownload**](#initiatevideodownload) | **POST** /videos/{videoId}/downloads | Start MP4 download preparation for a video|
|[**updateVideo**](#updatevideo) | **PUT** /videos/{videoId} | Update a video\&#39;s metadata|

# **deleteManyVideos**
> CreateAccountInvitations200Response deleteManyVideos(deleteManyVideosInput)

Deletes up to 10 videos at once, removing each from Cloudflare Stream and the database; requires the delete and read permissions on the storage module.

### Example

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

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

let deleteManyVideosInput: DeleteManyVideosInput; //

const { status, data } = await apiInstance.deleteManyVideos(
    deleteManyVideosInput
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **deleteManyVideosInput** | **DeleteManyVideosInput**|  | |


### Return type

**CreateAccountInvitations200Response**

### 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)

# **deleteVideo**
> CreateAccountInvitations200Response deleteVideo()

Deletes a single video, removing it from Cloudflare Stream and the database; requires the delete and read permissions on the storage module.

### Example

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

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

let videoId: string; //The video identifier (default to undefined)

const { status, data } = await apiInstance.deleteVideo(
    videoId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoId** | [**string**] | The video 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)

# **getVideo**
> GetVideo200Response getVideo()

Returns the details of a single stored video by ID; requires \"read\" permission on \"storage\".

### Example

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

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

let videoId: string; //The video identifier (default to undefined)

const { status, data } = await apiInstance.getVideo(
    videoId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoId** | [**string**] | The video identifier | defaults to undefined|


### Return type

**GetVideo200Response**

### 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)

# **getVideoDownloadStatus**
> SyncAccounts200Response getVideoDownloadStatus()

Returns the current status of a Cloudflare Stream MP4 download preparation for the given video, including percent complete and, once ready, the download URL; requires read permission on storage.

### Example

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

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

let videoId: string; //The video identifier (default to undefined)

const { status, data } = await apiInstance.getVideoDownloadStatus(
    videoId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoId** | [**string**] | The video identifier | defaults to undefined|


### Return type

**SyncAccounts200Response**

### 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)

# **getVideos**
> GetStreamVideos200Response getVideos()

Returns a paginated list of the organization\'s uploaded and recorded videos, filterable by source (e.g. upload origin) and free-text search, and orderable via the orderBy param; requires read permission on storage.

### Example

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

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

let source: string; //Filter by source (optional) (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.getVideos(
    source,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **source** | [**string**] | Filter by source | (optional) 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

**GetStreamVideos200Response**

### 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)

# **initiateVideoDownload**
> SyncAccounts200Response initiateVideoDownload()

Requests Cloudflare Stream to begin generating a downloadable MP4 rendition of the video and stores the resulting download URL once ready; requires the update and read permissions on the storage module.

### Example

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

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

let videoId: string; //The video identifier (default to undefined)

const { status, data } = await apiInstance.initiateVideoDownload(
    videoId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoId** | [**string**] | The video identifier | defaults to undefined|


### Return type

**SyncAccounts200Response**

### 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)

# **updateVideo**
> GetVideo200Response updateVideo(videoUpdateInputs)

Updates the name and/or thumbnail timestamp percentage of a video (identified by videoId) and syncs the change to the underlying Cloudflare Stream asset; requires the update permission on storage.

### Example

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

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

let videoId: string; //The video identifier (default to undefined)
let videoUpdateInputs: VideoUpdateInputs; //

const { status, data } = await apiInstance.updateVideo(
    videoId,
    videoUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **videoUpdateInputs** | **VideoUpdateInputs**|  | |
| **videoId** | [**string**] | The video identifier | defaults to undefined|


### Return type

**GetVideo200Response**

### 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)

