API Reference

Media.setModerationStatus

Sets the moderation status for a file.

Visit the article about moderation for more information.


Syntax

bool media.setModerationStatus ( mixed id, int status )

Arguments

NameTypeRequiredDefault valueDescription
idmixedRequirednonemedia id: can be an integer or an array of media id's
statusintRequirednonenew moderation status

Fields

List of fields needed to update the moderation status of a media item.

NameTypeDescriptionPossible Values
idINTThe ID of the media item you wish to update its moderation status. Multiple files can be moderated at once by specifying an array for the id, instead of an integer.INT MID
statusINTThe new moderation status of the media item you are updating. More information available on moderationStatus in our glossary.

Media Moderation Notifications:
Media moderation notification emails can be sent when media is approved or denied. To send these emails, set the `Approved Moderation Email` and `Denied Moderation Email` templates in the channeldetail page of the channel that the media are in.
0,1,2,3,4,5,6,7,8,9,10,11,121,13,14

Response

The response result on successful completion of the updating the status of a media item.

NameDescriptionSuccessError
resultThe response from the request.1<error><message>We could not find the file with id: MID</message><type>FileMobile_Storage_FileNotFoundException</type><code>0</code></error>

Sample Response

Sample REST Response
http://api.filemobile.com/services/rest/media/setModerationStatus?id=[MEDIA_ID]&status=[MOEDERATION_STATUS]&APIKEY=[APIKEY]
http://api.filemobile.com/services/rest/media/setModerationStatus?id[]=[MEDIA_ID]&id[]=[MEDIA_ID]&status=[MODERATION_STATUS]&APIKEY=[APIKEY]
<?xml version="1.0" encoding="UTF-8"?>
<result>1</result>
Sample JSON Response
{
    "status": true,
    "result": 1
}

Code examples

0 comments

Be the first to comment on setModerationStatus.

Add a Comment

  • captcha