voplica.api.files
The protobuf package voplica.api.files: 1 service, 34 messages and 0 enums, defined in voplica/api/files/files.proto.
Services
Section titled “Services”FilesService
Section titled “FilesService”Each method is called as POST https://api.voplica.com/voplica.api.files.FilesService/<Method> with its request message as JSON and your API key (Authentication); a method marked Anonymous allowed also answers without one. See the JSON API.
| Method | Request | Response | Description |
|---|---|---|---|
| InitFileUpload | InitFileUploadRequest | InitFileUploadResponse | 1. Initialize file upload (intend to upload a file). |
| FinalizeFileUpload | FinalizeFileUploadRequest | FinalizeFileUploadResponse | 3. Finalize file upload. |
| GetFileUpload | GetFileUploadRequest | GetFileUploadResponse | Get file upload information. It is also useful in case the upload was interrupted and it’s unclear what bytes left to be sent. In this case the offset should be equal to uploaded_bytes |
| DeleteFileUpload | DeleteFileUploadRequest | DeleteFileUploadResponse | |
| GetUserFileUploads | GetUserFileUploadsRequest | GetUserFileUploadsResponse | Get File Uploads. |
| ListAssetVariants | ListAssetVariantsRequest | ListAssetVariantsResponse | Anonymous allowed. List asset variants to use best on provided filters |
| ListRegistryAssetVariants | ListRegistryAssetVariantsRequest | ListRegistryAssetVariantsResponse | Anonymous allowed. List static asset variants via registry key to use best on provided filters |
| GetAsset | GetAssetRequest | GetAssetResponse | Anonymous allowed. Get Asset by id. |
| GetSourceFileOfGroup | GetSourceFileOfGroupRequest | GetSourceFileOfGroupResponse | Anonymous allowed. Get Source File by FileVariantGroup id. |
| GetFileInfo | GetFileInfoRequest | GetFileInfoResponse | Anonymous allowed. Get File Info by id. |
| GetFileUploadQuotaPlan | GetFileUploadQuotaPlanRequest | GetFileUploadQuotaPlanResponse | Anonymous allowed. Get available platform’s file upload quota plan info |
| GetUserFileUploadQuotaPlan | GetUserFileUploadQuotaPlanRequest | GetUserFileUploadQuotaPlanResponse | Get used file upload quota info for the user |
| GetMultiFileInfo | GetMultiFileInfoRequest | GetMultiFileInfoResponse | Anonymous allowed. Get File Info for multiple ids. |
| GetMultiAsset | GetMultiAssetRequest | GetMultiAssetResponse | Anonymous allowed. Get Asset for multiple ids. |
| GetMultiFileVariantGroup | GetMultiFileVariantGroupRequest | GetMultiFileVariantGroupResponse | Anonymous allowed. |
| GetCreatorAllowanceConfig | GetCreatorAllowanceConfigRequest | GetCreatorAllowanceConfigResponse | Anonymous allowed. |
| SetAssetMpaRating | SetAssetMpaRatingRequest | SetAssetMpaRatingResponse |
Messages
Section titled “Messages”DeleteFileUploadRequest
Section titled “DeleteFileUploadRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_id | 1 | string |
DeleteFileUploadResponse
Section titled “DeleteFileUploadResponse”No fields.
FinalizeFileUploadRequest
Section titled “FinalizeFileUploadRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_id | 1 | string |
||
| convert_flow_type | 2 | voplica.types.file.convert.ConvertFlowType | ||
| convert_params | 3 | voplica.types.file.convert.ConvertParam | repeated |
FinalizeFileUploadResponse
Section titled “FinalizeFileUploadResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| asset | 1 | voplica.types.file.Asset |
GetAssetRequest
Section titled “GetAssetRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| asset_id | 1 | string |
GetAssetResponse
Section titled “GetAssetResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| asset | 1 | voplica.types.file.Asset | ||
| readiness_message | 2 | string |
optional |
GetCreatorAllowanceConfigRequest
Section titled “GetCreatorAllowanceConfigRequest”No fields.
GetCreatorAllowanceConfigResponse
Section titled “GetCreatorAllowanceConfigResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| default_allowance_bytes | 1 | uint64 |
GetFileInfoRequest
Section titled “GetFileInfoRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_id | 1 | string |
GetFileInfoResponse
Section titled “GetFileInfoResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file | 1 | voplica.types.file.FileInfo |
GetFileUploadQuotaPlanRequest
Section titled “GetFileUploadQuotaPlanRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| quota_plans | 1 | voplica.types.file.upload.quota.FileUploadQuotaPlan | repeated | If not provided - all plans will be returned If provided - only selected plans will be returned |
GetFileUploadQuotaPlanResponse
Section titled “GetFileUploadQuotaPlanResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| quota_plans_info | 1 | voplica.types.file.upload.quota.FileUploadQuotaPlanInfo | repeated |
GetFileUploadRequest
Section titled “GetFileUploadRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_id | 1 | string |
GetFileUploadResponse
Section titled “GetFileUploadResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_upload_info | 1 | voplica.types.file.upload.FileUploadInfo |
GetMultiAssetRequest
Section titled “GetMultiAssetRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| asset_ids | 1 | string |
repeated |
GetMultiAssetResponse
Section titled “GetMultiAssetResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| resources | 1 | voplica.types.file.Asset | repeated |
GetMultiFileInfoRequest
Section titled “GetMultiFileInfoRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_ids | 1 | string |
repeated |
GetMultiFileInfoResponse
Section titled “GetMultiFileInfoResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| files | 1 | voplica.types.file.FileInfo | repeated |
GetMultiFileVariantGroupRequest
Section titled “GetMultiFileVariantGroupRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_variant_group_ids | 1 | string |
repeated |
GetMultiFileVariantGroupResponse
Section titled “GetMultiFileVariantGroupResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| groups | 1 | voplica.types.file.FileVariantGroup | repeated |
GetSourceFileOfGroupRequest
Section titled “GetSourceFileOfGroupRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_variant_group_id | 1 | string |
GetSourceFileOfGroupResponse
Section titled “GetSourceFileOfGroupResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| source_file | 1 | voplica.types.file.FileInfo | optional | source_file may be null if it was removed |
GetUserFileUploadQuotaPlanRequest
Section titled “GetUserFileUploadQuotaPlanRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| user_id | 1 | string |
optional | If not provided the ID is taken from the authentication token |
GetUserFileUploadQuotaPlanResponse
Section titled “GetUserFileUploadQuotaPlanResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| quota_info | 1 | voplica.types.file.upload.quota.FileUploadQuotaInfo | ||
| admin_plan | 2 | voplica.types.file.upload.quota.FileUploadQuotaPlan | ||
| tier_plan | 3 | voplica.types.file.upload.quota.FileUploadQuotaPlan | The plan the user’s subscription tier grants (files’ tier -> plan map). | |
| subscription_type | 4 | voplica.types.subscription.StudioSubscriptionType | The subscription tier tier_plan was derived from (FREE when unknown). |
GetUserFileUploadsRequest
Section titled “GetUserFileUploadsRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| owner_id | 1 | string |
optional | If not provided, owner_id will be taken from the request |
| limit | 2 | int64 |
||
| asc_sort | 3 | bool |
false - newest files first. true - oldest files first. | |
| file_type | 4 | voplica.types.base.FileType | optional | If no provided - all file types are used |
| statuses | 5 | voplica.types.file.upload.FileUploadStatus | optional | if not provided - all upload statuses are used |
| purpose | 6 | voplica.types.file.upload.FileUploadPurpose | optional | |
| cursor | 10 | string |
optional | to continue pagination use next_token with before_cursor = false to fetch the next page or prev_token with before_cursor = true to fetch the previous page. |
| before | 11 | bool |
Used only with cursor. If false it means fetch data after cursor. If true it means fetch data before cursor. |
|
| check_more_available | 12 | bool |
Check limit + 1 to know if there is more data available By default is is false. Meaning that more_available flag won’t be returned. In this case, the only way to verify that there is any data available is to fetch the next page. Generally this should not be used for infinite scrolls, but can be used if we have buttons like next, previous. |
GetUserFileUploadsResponse
Section titled “GetUserFileUploadsResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_uploads | 1 | voplica.types.file.upload.FileUploadInfo | repeated | |
| next_token | 2 | string |
optional | Token to pass in the next query’s Pagination directive to go to the next page It will be missing if this request didn’t return any data (i.e. no more data available) If it’s missing the last used cursor is essentially the next_token |
| prev_token | 3 | string |
optional | Token to pass in the next query’s Pagination directive to go to the previous page It will be missing if this request didn’t return any data (i.e. no more data available) If it’s missing the last used cursor is essentially the prev_token |
| more_available | 4 | bool |
optional | Returns if there is more data available (i.e. checks limit + 1). Returned only if check_more_available is set to true |
InitFileUploadRequest
Section titled “InitFileUploadRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_size | 1 | int64 |
Total file size in bytes | |
| mime_type | 2 | voplica.types.base.MimeType | Mime type of the file | |
| file_name | 3 | string |
optional | Optional file name (example: hello.png) |
| asset_id | 4 | string |
optional | Asset ID to which we should attach the uploaded file. Only Assets with user_modifications_lock = UNLOCKED can be used. If not provided - a new asset will be inferred from the file type. The automatically created asset will be automatically locked for user modifications. |
| file_type | 5 | voplica.types.base.FileType | optional | File type. If not provided then the file type is inferred from the provided mime_type implicitly |
| purpose | 6 | voplica.types.file.upload.FileUploadPurpose | optional | Why the file is being uploaded. Controls whether it appears in the user’s “My Files” listing and whether it is treated as a transient/cleanable file. If not provided, defaults to PRIMARY (normal, visible, permanent). For hidden/transient inputs (e.g. inpainting masks) set SUPPORTING_METADATA and finalize the upload with convert_flow_type = OBJECT_DEFAULT to skip conversion. |
InitFileUploadResponse
Section titled “InitFileUploadResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| file_upload_info | 1 | voplica.types.file.upload.FileUploadStartedInfo |
ListAssetVariantsRequest
Section titled “ListAssetVariantsRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| asset_id | 1 | string |
||
| file_variant_filter | 10 | voplica.types.file.FileVariantFilter | repeated |
ListAssetVariantsResponse
Section titled “ListAssetVariantsResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| readiness_status | 1 | voplica.types.base.ReadinessStatus | ||
| file_variant_groups | 2 | voplica.types.file.FileVariantGroup | repeated | |
| asset_type | 3 | voplica.types.base.AssetType | ||
| mpa_rating | 4 | voplica.types.base.MPARating | optional | |
| moderation_status | 5 | voplica.types.base.ContentModerationStatus | ||
| readiness_message | 6 | string |
optional | |
| hidden_from_non_owners | 7 | bool |
||
| mpa_publication_pending | 8 | bool |
||
| visible_from_public_cap | 9 | voplica.types.base.MPARating | optional |
ListRegistryAssetVariantsRequest
Section titled “ListRegistryAssetVariantsRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| registry_key | 1 | string |
key of the pre-defined assets in the static registry | |
| file_variant_filter | 10 | voplica.types.file.FileVariantFilter | repeated |
ListRegistryAssetVariantsResponse
Section titled “ListRegistryAssetVariantsResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| asset_files | 1 | voplica.types.file.AssetFileVariantGroups |
SetAssetMpaRatingRequest
Section titled “SetAssetMpaRatingRequest”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| asset_id | 1 | string |
||
| mpa_rating | 2 | voplica.types.base.MPARating |
SetAssetMpaRatingResponse
Section titled “SetAssetMpaRatingResponse”| Field | Number | Type | Label | Description |
|---|---|---|---|---|
| asset | 1 | voplica.types.file.Asset |