# TrackApi

All URIs are relative to *http://localhost:8080/api/v1*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**tracksBatchDeletePost**](#tracksbatchdeletepost) | **POST** /tracks/batch/delete | Batch Delete Tracks|
|[**tracksChunkPost**](#trackschunkpost) | **POST** /tracks/chunk | Upload Chunk|
|[**tracksCompletePost**](#trackscompletepost) | **POST** /tracks/complete | Complete Chunked Upload|
|[**tracksGet**](#tracksget) | **GET** /tracks | List Tracks|
|[**tracksIdDelete**](#tracksiddelete) | **DELETE** /tracks/{id} | Delete Track|
|[**tracksIdGet**](#tracksidget) | **GET** /tracks/{id} | Get Track by ID|
|[**tracksIdPut**](#tracksidput) | **PUT** /tracks/{id} | Update Track|
|[**tracksIdStatusGet**](#tracksidstatusget) | **GET** /tracks/{id}/status | Get Upload Status|
|[**tracksInitiatePost**](#tracksinitiatepost) | **POST** /tracks/initiate | Initiate Chunked Upload|
|[**tracksPost**](#trackspost) | **POST** /tracks | Upload Track|
|[**tracksQuotaIdGet**](#tracksquotaidget) | **GET** /tracks/quota/{id} | Get Upload Quota|
|[**tracksResumeUploadIdGet**](#tracksresumeuploadidget) | **GET** /tracks/resume/{uploadId} | Resume Upload|

# **tracksBatchDeletePost**
> TracksBatchDeletePost200Response tracksBatchDeletePost(request)

Delete multiple tracks at once

### Example

```typescript
import {
    TrackApi,
    Configuration,
    InternalCoreTrackBatchDeleteRequest
} from './api';

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

let request: InternalCoreTrackBatchDeleteRequest; //List of Track IDs

const { status, data } = await apiInstance.tracksBatchDeletePost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **InternalCoreTrackBatchDeleteRequest**| List of Track IDs | |


### Return type

**TracksBatchDeletePost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Validation Error |  -  |
|**500** | Internal Error |  -  |

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

# **tracksChunkPost**
> TracksChunkPost200Response tracksChunkPost()

Upload a single chunk of a file

### Example

```typescript
import {
    TrackApi,
    Configuration
} from './api';

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

let chunk: File; //Chunk Data (default to undefined)
let uploadId: string; //Upload ID (default to undefined)
let chunkNumber: number; //Chunk Number (default to undefined)
let totalChunks: number; //Total Chunks (default to undefined)
let totalSize: number; //Total Size (default to undefined)
let filename: string; //Filename (default to undefined)

const { status, data } = await apiInstance.tracksChunkPost(
    chunk,
    uploadId,
    chunkNumber,
    totalChunks,
    totalSize,
    filename
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **chunk** | [**File**] | Chunk Data | defaults to undefined|
| **uploadId** | [**string**] | Upload ID | defaults to undefined|
| **chunkNumber** | [**number**] | Chunk Number | defaults to undefined|
| **totalChunks** | [**number**] | Total Chunks | defaults to undefined|
| **totalSize** | [**number**] | Total Size | defaults to undefined|
| **filename** | [**string**] | Filename | defaults to undefined|


### Return type

**TracksChunkPost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Validation Error |  -  |
|**401** | Unauthorized |  -  |

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

# **tracksCompletePost**
> TracksCompletePost201Response tracksCompletePost(request)

Finish upload session and assemble file

### Example

```typescript
import {
    TrackApi,
    Configuration,
    InternalCoreTrackCompleteChunkedUploadRequest
} from './api';

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

let request: InternalCoreTrackCompleteChunkedUploadRequest; //Upload ID

const { status, data } = await apiInstance.tracksCompletePost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **InternalCoreTrackCompleteChunkedUploadRequest**| Upload ID | |


### Return type

**TracksCompletePost201Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Created |  -  |
|**400** | Validation or Assemblage Error |  -  |
|**401** | Unauthorized |  -  |

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

# **tracksGet**
> TracksGet200Response tracksGet()

Get a paginated list of tracks with filters

### Example

```typescript
import {
    TrackApi,
    Configuration
} from './api';

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

let page: number; //Page number (optional) (default to 1)
let limit: number; //Items per page (optional) (default to 20)
let userId: string; //Filter by User ID (optional) (default to undefined)
let genre: string; //Filter by Genre (optional) (default to undefined)
let format: string; //Filter by Format (optional) (default to undefined)
let sortBy: string; //Sort field (optional) (default to 'created_at')
let sortOrder: string; //Sort order (asc/desc) (optional) (default to 'desc')

const { status, data } = await apiInstance.tracksGet(
    page,
    limit,
    userId,
    genre,
    format,
    sortBy,
    sortOrder
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **limit** | [**number**] | Items per page | (optional) defaults to 20|
| **userId** | [**string**] | Filter by User ID | (optional) defaults to undefined|
| **genre** | [**string**] | Filter by Genre | (optional) defaults to undefined|
| **format** | [**string**] | Filter by Format | (optional) defaults to undefined|
| **sortBy** | [**string**] | Sort field | (optional) defaults to 'created_at'|
| **sortOrder** | [**string**] | Sort order (asc/desc) | (optional) defaults to 'desc'|


### Return type

**TracksGet200Response**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**500** | Internal Error |  -  |

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

# **tracksIdDelete**
> TracksIdDelete200Response tracksIdDelete()

Permanently delete a track

### Example

```typescript
import {
    TrackApi,
    Configuration
} from './api';

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

let id: string; //Track ID (default to undefined)

const { status, data } = await apiInstance.tracksIdDelete(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | Track ID | defaults to undefined|


### Return type

**TracksIdDelete200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Track not found |  -  |

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

# **tracksIdGet**
> TracksPost201Response tracksIdGet()

Get detailed information about a track

### Example

```typescript
import {
    TrackApi,
    Configuration
} from './api';

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

let id: string; //Track ID (default to undefined)

const { status, data } = await apiInstance.tracksIdGet(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | Track ID | defaults to undefined|


### Return type

**TracksPost201Response**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid ID |  -  |
|**404** | Track not found |  -  |

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

# **tracksIdPut**
> TracksPost201Response tracksIdPut(track)

Update track metadata

### Example

```typescript
import {
    TrackApi,
    Configuration,
    InternalCoreTrackUpdateTrackRequest
} from './api';

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

let id: string; //Track ID (default to undefined)
let track: InternalCoreTrackUpdateTrackRequest; //Track Metadata

const { status, data } = await apiInstance.tracksIdPut(
    id,
    track
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **track** | **InternalCoreTrackUpdateTrackRequest**| Track Metadata | |
| **id** | [**string**] | Track ID | defaults to undefined|


### Return type

**TracksPost201Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Validation Error |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Track not found |  -  |

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

# **tracksIdStatusGet**
> TracksIdStatusGet200Response tracksIdStatusGet()

Get the processing status of an uploaded track

### Example

```typescript
import {
    TrackApi,
    Configuration
} from './api';

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

let id: string; //Track ID (default to undefined)

const { status, data } = await apiInstance.tracksIdStatusGet(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | Track ID | defaults to undefined|


### Return type

**TracksIdStatusGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid ID |  -  |
|**401** | Unauthorized |  -  |
|**404** | Track not found |  -  |

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

# **tracksInitiatePost**
> TracksInitiatePost200Response tracksInitiatePost(request)

Start a new chunked upload session

### Example

```typescript
import {
    TrackApi,
    Configuration,
    InternalCoreTrackInitiateChunkedUploadRequest
} from './api';

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

let request: InternalCoreTrackInitiateChunkedUploadRequest; //Upload Metadata

const { status, data } = await apiInstance.tracksInitiatePost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **InternalCoreTrackInitiateChunkedUploadRequest**| Upload Metadata | |


### Return type

**TracksInitiatePost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Validation Error |  -  |
|**401** | Unauthorized |  -  |

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

# **tracksPost**
> TracksPost201Response tracksPost()

Upload a new track (audio file)

### Example

```typescript
import {
    TrackApi,
    Configuration
} from './api';

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

let file: File; //Audio File (MP3, WAV, FLAC, OGG) (default to undefined)

const { status, data } = await apiInstance.tracksPost(
    file
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **file** | [**File**] | Audio File (MP3, WAV, FLAC, OGG) | defaults to undefined|


### Return type

**TracksPost201Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Created |  -  |
|**400** | No file or validation error |  -  |
|**401** | Unauthorized |  -  |
|**403** | Quota exceeded |  -  |
|**500** | Internal Error |  -  |

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

# **tracksQuotaIdGet**
> TracksQuotaIdGet200Response tracksQuotaIdGet()

Get remaining upload quota for the user

### Example

```typescript
import {
    TrackApi,
    Configuration
} from './api';

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

let id: string; //User ID (optional, defaults to current user) (default to undefined)

const { status, data } = await apiInstance.tracksQuotaIdGet(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | User ID (optional, defaults to current user) | defaults to undefined|


### Return type

**TracksQuotaIdGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

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

# **tracksResumeUploadIdGet**
> TracksResumeUploadIdGet200Response tracksResumeUploadIdGet()

Get state of an interrupted upload

### Example

```typescript
import {
    TrackApi,
    Configuration
} from './api';

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

let uploadId: string; //Upload ID (default to undefined)

const { status, data } = await apiInstance.tracksResumeUploadIdGet(
    uploadId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **uploadId** | [**string**] | Upload ID | defaults to undefined|


### Return type

**TracksResumeUploadIdGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**404** | Upload session not found |  -  |

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

