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 |
GetFileAnalysis | GET /analysis/{fileId}/{versionId} | Get File Version Analysis |
GetFileAnalysisSecurity | GET /analysis/{fileId}/{versionId}/security | Get File Version Analysis Security |
GetFileAnalysisStandard | GET /analysis/{fileId}/{versionId}/standard | Get File Version Analysis Standard |
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 createFileRequest = null)
Create File
Creates a new File object
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class CreateFileExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var createFileRequest = new CreateFileRequest(); // CreateFileRequest | (optional)
try
{
// Create File
File result = apiInstance.CreateFile(createFileRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.CreateFile: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create File
ApiResponse<File> response = apiInstance.CreateFileWithHttpInfo(createFileRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.CreateFileWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
createFileRequest | CreateFileRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns a single File object. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File CreateFileVersion (string fileId, CreateFileVersionRequest createFileVersionRequest = null)
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.
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class CreateFileVersionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var createFileVersionRequest = new CreateFileVersionRequest(); // CreateFileVersionRequest | (optional)
try
{
// Create File Version
File result = apiInstance.CreateFileVersion(fileId, createFileVersionRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.CreateFileVersion: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Create File Version
ApiResponse<File> response = apiInstance.CreateFileVersionWithHttpInfo(fileId, createFileVersionRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.CreateFileVersionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | string | Must be a valid file ID. | |
createFileVersionRequest | CreateFileVersionRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns a single File object. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File DeleteFile (string fileId)
Delete File
Deletes a File object.
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class DeleteFileExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
try
{
// Delete File
File result = apiInstance.DeleteFile(fileId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.DeleteFile: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete File
ApiResponse<File> response = apiInstance.DeleteFileWithHttpInfo(fileId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.DeleteFileWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | string | Must be a valid file ID. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns a single File object. | - |
404 | Error response when trying to delete a non-existent file. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File DeleteFileVersion (string fileId, int versionId)
Delete File Version
Delete a specific version of a file. You can only delete the latest version.
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class DeleteFileVersionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var versionId = 1; // int | Version ID of the asset.
try
{
// Delete File Version
File result = apiInstance.DeleteFileVersion(fileId, versionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.DeleteFileVersion: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete File Version
ApiResponse<File> response = apiInstance.DeleteFileVersionWithHttpInfo(fileId, versionId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.DeleteFileVersionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | Returns a single File object. | - |
400 | Error response when trying to delete the initial version of a file. Delete the main File object instead. | - |
500 | Error response when trying to delete any version of a file that is not the last one. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DownloadFileVersion (string fileId, int 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.
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class DownloadFileVersionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var versionId = 1; // int | Version ID of the asset.
try
{
// Download File Version
apiInstance.DownloadFileVersion(fileId, versionId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.DownloadFileVersion: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Download File Version
apiInstance.DownloadFileVersionWithHttpInfo(fileId, versionId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.DownloadFileVersionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | Raw file | - |
404 | Error response when trying to show information about a non-existent file. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File FinishFileDataUpload (string fileId, int versionId, string fileType, FinishFileDataUploadRequest finishFileDataUploadRequest = null)
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.
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class FinishFileDataUploadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var versionId = 1; // int | Version ID of the asset.
var fileType = file; // string | Type of file.
var finishFileDataUploadRequest = new FinishFileDataUploadRequest(); // 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`. (optional)
try
{
// Finish FileData Upload
File result = apiInstance.FinishFileDataUpload(fileId, versionId, fileType, finishFileDataUploadRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.FinishFileDataUpload: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Finish FileData Upload
ApiResponse<File> response = apiInstance.FinishFileDataUploadWithHttpInfo(fileId, versionId, fileType, finishFileDataUploadRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.FinishFileDataUploadWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | Returns a single File object. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
File GetFile (string 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.
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class GetFileExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
try
{
// Show File
File result = apiInstance.GetFile(fileId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFile: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Show File
ApiResponse<File> response = apiInstance.GetFileWithHttpInfo(fileId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
fileId | string | Must be a valid file ID. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns a single File object. | - |
404 | Error response when trying to show information about a non-existent file. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FileAnalysis GetFileAnalysis (string fileId, int versionId)
Get File Version Analysis
Get the performance analysis for the uploaded assets of an avatar
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class GetFileAnalysisExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var versionId = 1; // int | Version ID of the asset.
try
{
// Get File Version Analysis
FileAnalysis result = apiInstance.GetFileAnalysis(fileId, versionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileAnalysis: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get File Version Analysis
ApiResponse<FileAnalysis> response = apiInstance.GetFileAnalysisWithHttpInfo(fileId, versionId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileAnalysisWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | Returns a single FileAnalysis object. | - |
404 | Error response when trying to show information about a non-existent file. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FileAnalysis GetFileAnalysisSecurity (string fileId, int versionId)
Get File Version Analysis Security
Get the security performance analysis for the uploaded assets of an avatar
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class GetFileAnalysisSecurityExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var versionId = 1; // int | Version ID of the asset.
try
{
// Get File Version Analysis Security
FileAnalysis result = apiInstance.GetFileAnalysisSecurity(fileId, versionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileAnalysisSecurity: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get File Version Analysis Security
ApiResponse<FileAnalysis> response = apiInstance.GetFileAnalysisSecurityWithHttpInfo(fileId, versionId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileAnalysisSecurityWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | Returns a single FileAnalysis object. | - |
404 | Error response when trying to show information about a non-existent file. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FileAnalysis GetFileAnalysisStandard (string fileId, int versionId)
Get File Version Analysis Standard
Get the standard performance analysis for the uploaded assets of an avatar
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class GetFileAnalysisStandardExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var versionId = 1; // int | Version ID of the asset.
try
{
// Get File Version Analysis Standard
FileAnalysis result = apiInstance.GetFileAnalysisStandard(fileId, versionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileAnalysisStandard: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get File Version Analysis Standard
ApiResponse<FileAnalysis> response = apiInstance.GetFileAnalysisStandardWithHttpInfo(fileId, versionId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileAnalysisStandardWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | Returns a single FileAnalysis object. | - |
404 | Error response when trying to show information about a non-existent file. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FileVersionUploadStatus GetFileDataUploadStatus (string fileId, int versionId, string 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.
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class GetFileDataUploadStatusExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var versionId = 1; // int | Version ID of the asset.
var fileType = file; // string | Type of file.
try
{
// Check FileData Upload Status
FileVersionUploadStatus result = apiInstance.GetFileDataUploadStatus(fileId, versionId, fileType);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileDataUploadStatus: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Check FileData Upload Status
ApiResponse<FileVersionUploadStatus> response = apiInstance.GetFileDataUploadStatusWithHttpInfo(fileId, versionId, fileType);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFileDataUploadStatusWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | Current FileVersion upload status. Contains the uploadId needed for uploading, as well as the already uploaded parts. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<File> GetFiles (string tag = null, string userId = null, int? n = null, int? offset = null)
List Files
Returns a list of files
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class GetFilesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var tag = "tag_example"; // string | Tag, for example \"icon\" or \"gallery\", not included by default. (optional)
var userId = "userId_example"; // string | UserID, will always generate a 500 permission error. (optional)
var n = 60; // int? | The number of objects to return. (optional) (default to 60)
var offset = 56; // int? | A zero-based offset from the default object sorting from where search results start. (optional)
try
{
// List Files
List<File> result = apiInstance.GetFiles(tag, userId, n, offset);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFiles: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List Files
ApiResponse<List<File>> response = apiInstance.GetFilesWithHttpInfo(tag, userId, n, offset);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.GetFilesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | Returns a list of File objects. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FileUploadURL StartFileDataUpload (string fileId, int versionId, string fileType, int? partNumber = null)
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.
using System.Collections.Generic;
using System.Diagnostics;
using VRChat.API.Api;
using VRChat.API.Client;
using VRChat.API.Model;
namespace Example
{
public class StartFileDataUploadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vrchat.cloud/api/1";
// Configure API key authorization: authCookie
config.AddApiKey("auth", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("auth", "Bearer");
var apiInstance = new FilesApi(config);
var fileId = file_00000000-0000-0000-0000-000000000000; // string | Must be a valid file ID.
var versionId = 1; // int | Version ID of the asset.
var fileType = file; // string | Type of file.
var partNumber = 1; // int? | The part number to start uploading. If not provided, the first part will be started. (optional)
try
{
// Start FileData Upload
FileUploadURL result = apiInstance.StartFileDataUpload(fileId, versionId, fileType, partNumber);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.StartFileDataUpload: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Start FileData Upload
ApiResponse<FileUploadURL> response = apiInstance.StartFileDataUploadWithHttpInfo(fileId, versionId, fileType, partNumber);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FilesApi.StartFileDataUploadWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
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
Status code | Description | Response headers |
---|---|---|
200 | See [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html](AWS REST docs - PUT Object) | - |
400 | Error response when trying to start an upload against a FileVersion that is already marked as `complete`. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]