import 'package:vrchat_dart_generated/api.dart';
All URIs are relative to https://api.vrchat.cloud/api/1
Method | HTTP request | Description |
---|---|---|
createFile | POST /file | Create File |
createFileVersion | POST /file/{fileId} | Create File Version |
deleteFile | DELETE /file/{fileId} | Delete File |
deleteFileVersion | DELETE /file/{fileId}/{versionId} | Delete File Version |
downloadFileVersion | GET /file/{fileId}/{versionId} | Download File Version |
finishFileDataUpload | PUT /file/{fileId}/{versionId}/{fileType}/finish | Finish FileData Upload |
getFile | GET /file/{fileId} | Show File |
getFileDataUploadStatus | GET /file/{fileId}/{versionId}/{fileType}/status | Check FileData Upload Status |
getFiles | GET /files | List Files |
startFileDataUpload | PUT /file/{fileId}/{versionId}/{fileType}/start | Start FileData Upload |
File createFile(createFileRequest)
Create File
Creates a new File object
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final CreateFileRequest createFileRequest = ; // CreateFileRequest |
try {
final response = api.createFile(createFileRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->createFile: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
createFileRequest | CreateFileRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File createFileVersion(fileId, createFileVersionRequest)
Create File Version
Creates a new FileVersion. Once a Version has been created, proceed to the /file/{fileId}/{versionId}/file/start
endpoint to start a file upload.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String fileId = file_00000000-0000-0000-0000-000000000000; // String | Must be a valid file ID.
final CreateFileVersionRequest createFileVersionRequest = ; // CreateFileVersionRequest |
try {
final response = api.createFileVersion(fileId, createFileVersionRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->createFileVersion: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | String | Must be a valid file ID. | |
createFileVersionRequest | CreateFileVersionRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File deleteFile(fileId)
Delete File
Deletes a File object.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String fileId = file_00000000-0000-0000-0000-000000000000; // String | Must be a valid file ID.
try {
final response = api.deleteFile(fileId);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->deleteFile: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | String | Must be a valid file ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File deleteFileVersion(fileId, versionId)
Delete File Version
Delete a specific version of a file. You can only delete the latest version.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String fileId = file_00000000-0000-0000-0000-000000000000; // String | Must be a valid file ID.
final int versionId = 1; // int | Version ID of the asset.
try {
final response = api.deleteFileVersion(fileId, versionId);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->deleteFileVersion: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | String | Must be a valid file ID. | |
versionId | int | Version ID of the asset. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
downloadFileVersion(fileId, versionId)
Download File Version
Downloads the file with the provided version number. Version Note: Version 0 is always when the file was created. The real data is usually always located in version 1 and up. Extension Note: Files are not guaranteed to have a file extensions. UnityPackage files tends to have it, images through this endpoint do not. You are responsible for appending file extension from the extension
field when neccesary.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String fileId = file_00000000-0000-0000-0000-000000000000; // String | Must be a valid file ID.
final int versionId = 1; // int | Version ID of the asset.
try {
api.downloadFileVersion(fileId, versionId);
} catch on DioException (e) {
print('Exception when calling FilesApi->downloadFileVersion: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | String | Must be a valid file ID. | |
versionId | int | Version ID of the asset. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File finishFileDataUpload(fileId, versionId, fileType, finishFileDataUploadRequest)
Finish FileData Upload
Finish an upload of a FileData. This will mark it as "complete". After uploading the file
for Avatars and Worlds you then have to upload a signature
file.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String fileId = file_00000000-0000-0000-0000-000000000000; // String | Must be a valid file ID.
final int versionId = 1; // int | Version ID of the asset.
final String fileType = file; // String | Type of file.
final FinishFileDataUploadRequest finishFileDataUploadRequest = {"etags":["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"],"nextPartNumber":"0","maxParts":"0"}; // FinishFileDataUploadRequest | Please see documentation on ETag's: [https://teppen.io/2018/06/23/aws_s3_etags/](https://teppen.io/2018/06/23/aws_s3_etags/) ETag's should NOT be present when uploading a `signature`.
try {
final response = api.finishFileDataUpload(fileId, versionId, fileType, finishFileDataUploadRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->finishFileDataUpload: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | String | Must be a valid file ID. | |
versionId | int | Version ID of the asset. | |
fileType | String | Type of file. | |
finishFileDataUploadRequest | FinishFileDataUploadRequest | Please see documentation on ETag's: https://teppen.io/2018/06/23/aws_s3_etags/ ETag's should NOT be present when uploading a signature . |
[optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File getFile(fileId)
Show File
Shows general information about the "File" object. Each File can have several "Version"'s, and each Version can have multiple real files or "Data" blobs.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String fileId = file_00000000-0000-0000-0000-000000000000; // String | Must be a valid file ID.
try {
final response = api.getFile(fileId);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->getFile: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | String | Must be a valid file ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FileVersionUploadStatus getFileDataUploadStatus(fileId, versionId, fileType)
Check FileData Upload Status
Retrieves the upload status for file upload. Can currently only be accessed when status
is waiting
. Trying to access it on a file version already uploaded currently times out.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String fileId = file_00000000-0000-0000-0000-000000000000; // String | Must be a valid file ID.
final int versionId = 1; // int | Version ID of the asset.
final String fileType = file; // String | Type of file.
try {
final response = api.getFileDataUploadStatus(fileId, versionId, fileType);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->getFileDataUploadStatus: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | String | Must be a valid file ID. | |
versionId | int | Version ID of the asset. | |
fileType | String | Type of file. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List getFiles(tag, userId, n, offset)
List Files
Returns a list of files
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String tag = tag_example; // String | Tag, for example \"icon\" or \"gallery\", not included by default.
final String userId = userId_example; // String | UserID, will always generate a 500 permission error.
final int n = 56; // int | The number of objects to return.
final int offset = 56; // int | A zero-based offset from the default object sorting from where search results start.
try {
final response = api.getFiles(tag, userId, n, offset);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->getFiles: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
tag | String | Tag, for example "icon" or "gallery", not included by default. | [optional] |
userId | String | UserID, will always generate a 500 permission error. | [optional] |
n | int | The number of objects to return. | [optional] [default to 60] |
offset | int | A zero-based offset from the default object sorting from where search results start. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FileUploadURL startFileDataUpload(fileId, versionId, fileType, partNumber)
Start FileData Upload
Starts an upload of a specific FilePart. This endpoint will return an AWS URL which you can PUT data to. You need to call this and receive a new AWS API URL for each partNumber
. Please see AWS's REST documentation on "PUT Object to S3" on how to upload. Once all parts has been uploaded, proceed to /finish
endpoint. Note: nextPartNumber
seems like it is always ignored. Despite it returning 0, first partNumber is always 1.
import 'package:vrchat_dart_generated/api.dart';
// TODO Configure API key authorization: authCookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('authCookie').apiKeyPrefix = 'Bearer';
final api = VrchatDartGenerated().getFilesApi();
final String fileId = file_00000000-0000-0000-0000-000000000000; // String | Must be a valid file ID.
final int versionId = 1; // int | Version ID of the asset.
final String fileType = file; // String | Type of file.
final int partNumber = 1; // int | The part number to start uploading. If not provided, the first part will be started.
try {
final response = api.startFileDataUpload(fileId, versionId, fileType, partNumber);
print(response);
} catch on DioException (e) {
print('Exception when calling FilesApi->startFileDataUpload: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | String | Must be a valid file ID. | |
versionId | int | Version ID of the asset. | |
fileType | String | Type of file. | |
partNumber | int | The part number to start uploading. If not provided, the first part will be started. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]