API Reference


Media methods allow you display, create, remove and manipulate media content in New Spark Media Platform.
Media.addToFavorites

This method adds a media item to the list of a user's favorites and may be called either with an API key having the media.addToFavorites permission or without an API key.

Using an API key with the media.addToFavorites permission a user ID may be provided as the owner of the favorite. Without an API key, the owner of the favorite will be the logged in read more »

Media.deleteFile

Use this method to delete file(s) from the system.

This method removes any cached data for media.getFileInfo ONLY if media.getFileInfo is called with no user ID and returnComments set to false. If media.getFileInfo is called with a user ID or returnComments set to true then stale data may be returned until the cache is refreshed. This will occur automatically after a read more »

Media.getComments

Returns all the comments for a given media file.

read more »
Media.getFileInfo

Returns a list with information about the specified file.

If the userid parameter is supplied the uservote item is also returned, which contains the vote/rating the user made on the file (if any).

If you are not authenticated using the API key, you will only be able to retrieve information on moderated media.

There is no requirement for any permission to be read more »

Media.getFiles

Returns a list of media based on provided parameters.

The actual return value is a struct with the totalCount and data properties. totalCount contains the number of items that would have been returned if there was no offset or limit specified.

pageSize has a maximum value of 500 - ie. no more than 500 media items will ever be returned from a single call read more »

Media.getUploadURL

This method provides you with a signed URL that you can then use to upload directly to the Filemobile Amazon bucket where original files are stored, once the upload is complete you must use the media.uploadCompleted method to trigger the system to begin conversion of this file.

The fileData array, must contain type, and filename fields, an example of a valid type would be video/mp4, or read more »

Media.getUserRatingforFile

Returns if a user has rated or voted for a specific file.

If the user has rated, this function will return the rating; If the user hasn't already it will return false.

We will also return the appropriate error message if the MID or the UID are incorrect or not found in our system.

read more »
Media.logHit

Use this method to log a hit (aka view) on a media item.

read more »
Media.makeHidden

Use this method to make media hidden - ie. only the owner can see it.

This method requires a media ID or an array of IDs.

You must have permission to call this service on media owned by another user (including the public user '1'). Otherwise, you may only make your own media public; you must be logged in to do so. If you do not have permission to make any of the media specified read more »

Media.makeShown

Use this method to make media public - ie. anyone can see it, subject to moderation and trash status.

This method requires a media ID or an array of IDs.

You must have permission to call this service on media owned by another user (including the public user '1'). Otherwise, you may only make your own media public; you must be logged in to do so. If you do not have permission to read more »

Media.rateFile

Use this method to rate a media item on a scale.

When this method is accessed without the use of a API key, user ID is ignored and the current session is being used to determine the user id. A user can only rate once for every file. If the user attempts to vote again, the previous rating will be replaced.

If returnData = 1 then the data from getFileInfo will be returned. This is read more »

Media.setModerationStatus

Sets the moderation status for a file.

Visit the article about moderation for more information.

read more »
Media.transcribeVideo

Use to transcribe Video or Audio Media into text ( subtitles )

read more »
Media.trashFile

Use this method to trash file(s) from the system.

You must have the media.trashFile permission to call this service on media owned by another user (including the public user). Otherwise you may only trash your own media; you must be logged in to do so. If you do not have permission to trash any of the media specified this function will immediately abort and some media that you specified read more »

Media.untrashFile

Use this method to untrash file(s) from the system.

This method removes any cached data for media.getFileInfo ONLY if media.getFileInfo is called with no user ID and returnComments set to false. If media.getFileInfo is called with a user ID or returnComments set to true then stale data may be returned until the cache is refreshed. This will occur automatically after a read more »

Media.updateFile

Changes the properties of a media item.

read more »
Media.uploadCompleted

This is used in conjunction with media.getUploadURL, once the upload has been completed to Amazon, this method must be called to trigger the converters to handle the file.

read more »