File Descriptor Object

Attributes
idstringRead-onlymaxLength 200
File ID. Generated when a file is uploaded to the Media Manager.

displayNamestringmaxLength 200
File name as it appears in the Media Manager.

urlstringRead-onlyformat WEB_URL
Static URL of the file.

parentFolderIdstringmaxLength 100
ID of the file's parent folder.

hashstringRead-onlymaxLength 100
File hash.

sizeInBytesstringRead-onlyformat DECIMAL_VALUE
Size of the uploaded file in bytes.

privatebooleanRead-only
Whether the link to the uploaded file is public or private. Private links require a token.

mediaTypestringRead-only
8 supported values:
UNKNOWNIMAGEVIDEOAUDIODOCUMENTVECTORARCHIVEMODEL3D
Media file type.

mediaobject
Media file content.

operationStatusstringRead-only
3 supported values:
FAILEDREADYPENDING
Status of the file that was uploaded.
  • FAILED: The file failed to upload, for example, during media post processing.
  • READY: The file uploaded, finished all processing, and is ready for use.
  • PENDING: The file is processing and the URLs are not yet available. This response is returned when importing a file.

sourceUrlstringRead-onlyformat WEB_URL
URL where the file was uploaded from.

thumbnailUrlstringRead-onlyformat WEB_URL
URL of the file's thumbnail.

labelsArray <string>maxItems 100maxLength 200
Labels assigned to media files that describe and categorize them. Provided by the user, or generated by Google Vision API for images.

createdDatestringRead-onlyformat date-time
Date and time the file was created.

updatedDatestringRead-onlyformat date-time
Date and time the file was updated.

siteIdstringRead-onlymaxLength 100
The Wix site ID where the media file is stored.

statestringRead-only
2 supported values:
OKDELETED
State of the file.
Was this helpful?
Yes
No

PostGenerate Files Download Url

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Generates a URL for downloading a compressed file containing specific files in the Media Manager.

The compressed file can contain up to 1000 files.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/files/generate-download-url

Was this helpful?
Yes
No

PostGenerate File Download Url

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Generates one or more temporary URLs for downloading a specific file in the Media Manager.

To download different assets of the file, use the assetKeys parameter which generates a download URL for each asset. If no assetKey is specified, it defaults to src, which generates one download URL in the original file's format and quality.

Use this endpoint to grant external clients access to a private media file. Use the expirationInMinutes parameter to set the URL expiration time, and the expirationRedirectUrl parameter to add a redirect url when the URL expires.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/files/{fileId}/generate-download-url

Was this helpful?
Yes
No

GetGet File Descriptor

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Gets information about a specific file in the Media Manager.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

GET
https://www.wixapis.com/site-media/v1/files/{fileId}

Was this helpful?
Yes
No

PatchUpdate File

Deprecated - This method has been replaced with
UpdateFileDescriptor, and will be removed on March 31, 2023.

Updates a file.

Deprecation Notice:

This endpoint has been replaced with Update File Descriptor and will be removed on March 31, 2023.

You can use the parentFolderId parameter to move a file from its current folder to a different folder.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

PATCH
https://www.wixapis.com/site-media/v1/files/{fileId}

Was this helpful?
Yes
No

PostGet File Descriptors

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Gets information about specific files in the Media Manager.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/files/get-files

Was this helpful?
Yes
No

PatchUpdate File Descriptor

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates a file.

You can use the parentFolderId parameter to move a file from its current folder to a different folder.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

PATCH
https://www.wixapis.com/site-media/v1/files/{file.id}/update

Was this helpful?
Yes
No

PostGenerate File Upload Url

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Generates an upload URL to allow external clients to upload a file to the Media Manager.

To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see the Upload API article.

Note: Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use the Generate File Resumable Upload Url instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/files/generate-upload-url

Was this helpful?
Yes
No

PostGenerate File Resumable Upload Url

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager.

With the resumable upload URL, any interruptions in the upload process pauses the file upload, and resumes the file upload process after the interruption. The resumable upload URL is also helpful when network connection is poor. To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see the Resumable Upload API article.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/files/generate-resumable-upload-url

Was this helpful?
Yes
No

PostImport File

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Imports a file to the Media Manager using an external url.

Returns information about the imported file. Use the parentFolderId parameter to specify which folder you want the file to be imported to. If no folder is specified, the file is imported to the media-root folder.

To import a file, you need to provide one of the following:

  1. Pass the file's MIME type in the mimeType parameter of the request. For example, 'image/png'.
  2. Pass the file's name and extension. For example, 'my-image.png'.
  3. If you don't know the file's extension or MIME type, pass its media type in the mediaType parameter of the request. For example, 'IMAGE'. Note that this option only works if the server hosting the media allows a 'HEAD' request.

Note: The media property isn't returned in the files response object.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/files/import

Was this helpful?
Yes
No

PostBulk Import Files

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Imports a bulk of files to the Media Manager using external urls.

Returns information about the imported files. Use the parentFolderId parameter to specify in which folder you want each file to be imported to. If no folder is specified, the file is imported to the media-root folder.

To import files, you need to provide one of the following:

  1. Pass each file's MIME type in the mimeType parameter of the request. For example, 'image/png'.
  2. Pass each file's name and extension. For example, 'my-image.png'.
  3. If you don't know a file's extension or MIME type, pass its media type in the mediaType parameter of the request. For example, 'IMAGE'. Note that this option only works if the server hosting the media allows a 'HEAD' request.

Note: The media property isn't returned in the files response object.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/bulk/files/import

Was this helpful?
Yes
No

GetList Files

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of files in the Media Manager.

To retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the parentFolderId parameter. If no folder is specified, the endpoint retrieves the list of files in the root folder of the Media Manager.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

GET
https://www.wixapis.com/site-media/v1/files

Was this helpful?
Yes
No

PostSearch Files

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Searches all folders in the Media Manager and returns a list of files that match the terms specified in the parameters.

If no parameters are specified, the endpoint returns all files in the MEDIA_ROOT folder.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/files/search

Was this helpful?
Yes
No

PostGenerate Video Streaming Url

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Generates a URL for streaming a specific video file in the Media Manager.

To stream different assets of the file, use the assetKeys parameter which generates a video streaming URL for each asset. If no assetKey is specified, it defaults to src, which generates one video streaming URL in the original file's format and quality.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/files/video/{fileId}/generate-stream-url

Was this helpful?
Yes
No

PostBulk Delete Files

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Deletes the specified files from the Media Manager.

The deleted files are moved to the Media Manager's trash bin (TRASH-ROOT folder) unless permanently deleted. To permanently delete files, pass the permanent parameter with the value true. Permanently deleting files isn't reversible, so make sure that these files aren't being used in a site or in any other way as the files will no longer be accessible.

Note the following:

  • The specified files can be from different folders.
  • Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
  • Attempting to delete files that are already in the trash bin doesn't result in an error.
  • If your site contains deleted media files, the deleted media files still appear on your site as the files are still in the Media Manager (in the trash bin).
  • You can use the Bulk Restore Files From Trash Bin endpoint to restore files from the Media Manager's trash bin.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/bulk/files/delete

Was this helpful?
Yes
No

PostBulk Restore Files From Trash Bin

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

POST
https://www.wixapis.com/site-media/v1/bulk/trash-bin/files/restore

Was this helpful?
Yes
No

GetList Deleted Files

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of files in the Media Manager's trash bin.

Note: The Media Manager's trash bin (TRASH-ROOT folder) only contains temporarily deleted files, not permanently deleted files.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Media Manager
Learn more about permission scopes.Authorization header required - pass the OAuth Access Token

Syntax

GET
https://www.wixapis.com/site-media/v1/trash-bin/files

Was this helpful?
Yes
No

File Descriptor Updated

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a file is updated, including when a file is moved to a different folder.

Event Body

Event Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.media.site_media.v1.file_descriptor.

slugstring
Event name. Expected updated.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

updatedEventobject
Event information.
Was this helpful?
Yes
No

File Descriptor Deleted

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a file is deleted.

If the movedToTrash property in the event object true, the file was moved to the Media Manager's trash bin. If the movedToTrash property in the event object is false, the file was permanently deleted.

Event Body

Event Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.media.site_media.v1.file_descriptor.

slugstring
Event name. Expected deleted.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

deletedEventstruct
Event information.
Was this helpful?
Yes
No

Descriptor File Ready

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a file is ready to be used, after any post-upload processing.

This event is also triggred when a file is restored from the Media Manager's trash bin.

Event Body

Event Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.media.site_media.v1.file_descriptor.

slugstring
Event name. Expected file_ready.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

actionEventobject
Event information.
Was this helpful?
Yes
No

Descriptor File Failed

Developer Preview - This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a file fails during essential post-upload processing.

Event Body

Event Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.media.site_media.v1.file_descriptor.

slugstring
Event name. Expected file_failed.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

actionEventobject
Event information.
Was this helpful?
Yes
No