Skip to content

voplica.api.files

The protobuf package voplica.api.files: 1 service, 34 messages and 0 enums, defined in voplica/api/files/files.proto.

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
Field Number Type Label Description
file_id 1 string

No fields.

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
Field Number Type Label Description
asset 1 voplica.types.file.Asset
Field Number Type Label Description
asset_id 1 string
Field Number Type Label Description
asset 1 voplica.types.file.Asset
readiness_message 2 string optional

No fields.

Field Number Type Label Description
default_allowance_bytes 1 uint64
Field Number Type Label Description
file_id 1 string
Field Number Type Label Description
file 1 voplica.types.file.FileInfo
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
Field Number Type Label Description
quota_plans_info 1 voplica.types.file.upload.quota.FileUploadQuotaPlanInfo repeated
Field Number Type Label Description
file_id 1 string
Field Number Type Label Description
file_upload_info 1 voplica.types.file.upload.FileUploadInfo
Field Number Type Label Description
asset_ids 1 string repeated
Field Number Type Label Description
resources 1 voplica.types.file.Asset repeated
Field Number Type Label Description
file_ids 1 string repeated
Field Number Type Label Description
files 1 voplica.types.file.FileInfo repeated
Field Number Type Label Description
file_variant_group_ids 1 string repeated
Field Number Type Label Description
groups 1 voplica.types.file.FileVariantGroup repeated
Field Number Type Label Description
file_variant_group_id 1 string
Field Number Type Label Description
source_file 1 voplica.types.file.FileInfo optional source_file may be null if it was removed
Field Number Type Label Description
user_id 1 string optional If not provided the ID is taken from the authentication token
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).
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.
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
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.
Field Number Type Label Description
file_upload_info 1 voplica.types.file.upload.FileUploadStartedInfo
Field Number Type Label Description
asset_id 1 string
file_variant_filter 10 voplica.types.file.FileVariantFilter repeated
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
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
Field Number Type Label Description
asset_files 1 voplica.types.file.AssetFileVariantGroups
Field Number Type Label Description
asset_id 1 string
mpa_rating 2 voplica.types.base.MPARating
Field Number Type Label Description
asset 1 voplica.types.file.Asset