API Reference


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 few minutes.


void media.untrashFile ( mixed id, boolean recursive = false )


NameTypeRequiredDefault valueDescription
idmixedRequirednoneThis can be a single media ID or an array of valid media IDs.
recursivebooleanOptionalfalseThis optional argument allows you to untrash all recursive children of the specified media ID(s). For example this method will only untrash the specified media ID by default. To untrash all recursive children of the media specify this value as 1. Possible values are 0 => false and 1 => true.


The response returned upon success of the request.

NameTypeDescriptionDefault Values
resultINT1 will be returned upon a successful request and response.1

Sample Response

Sample REST Response
<?xml version="1.0" encoding="UTF-8"?>
Sample JSON Response
    "status": true,
    "result": 1

Code examples


Be the first to comment on untrashFile.

Add a Comment

  • captcha