DeviceUnversioned

Get Changes


Description : Returns the list of all files and folders with revisions greater than the passed parameter revision and less than or equal to the next 500-multiplier. For example, if revision=1211, then all files and folders with revision greater than 1211 and less than or equal 1500 are returned.

Required Parameters

  • session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
  • revision : The device revision after which the changes to be returned occur.

Optional Parameters
  • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
  • device_id : The ID of the device. If not passed, it would return files and folders from the cloud.
  • response_format : 'xml' or 'json' (default 'xml')


GET http://www.mediafire.com/api/unversioned/device/get_changes.php
POST http://www.mediafire.com/api/unversioned/device/get_changes.php

Example:

Request
http://www.mediafire.com/api/unversioned/device/get_changes.php?session_token=de8f7c427c7a1e84134175880ca5f7f959a6d2894a47fcc7457ecb65fd930785f72801bc6b2b54be2284baf05a17b4098b47074eff4685259f3a205929e6832ce5e6e9c9affdb3d3&revision=53
Response
<response>
    <action>device/get_changes</action>
    <updated>
        <files>
            <file>
                <quickkey>fl4fo8nfc4np3cv</quickkey>
                <revision>61</revision>
                <created>2013-04-23 12:01:21</created>
                <parent_folderkey/>
            </file>
            <file>
                <quickkey>2xd01t7y56z5vml</quickkey>
                <revision>64</revision>
                <created>2013-04-21 22:42:16</created>
                <parent_folderkey>pdwq948fyr7r7</parent_folderkey>
            </file>
            <file>
                <quickkey>94bc9vocqwu3dh</quickkey>
                <revision>62</revision>
            </file>
        </files>
        <folders>
            <folder>
                <folderkey>vnp2fvf2mionv</folderkey>
                <revision>72</revision>
            </folder>
            <folder>
                <folderkey>apfsoiaspoisd</folderkey>
                <revision>71</revision>
            </folder>
        </folders>
    </updated>
    <deleted>
        <files>
            <file>
                <quickkey>qnbvekwvndddfg5</quickkey>
                <revision>77</revision>
                <created>2013-04-16 02:10:33</created>
                <parent_folderkey/>
            </file>
        </files>
        <folders>
            <folder>
                <folderkey>gvbweicun3b9y</folderkey>
                <revision>73</revision>
            </folder>
        </folders>
    </deleted>
    <device_revision>105</device_revision>
    <result>Success</result>
    <current_api_version>2.14</current_api_version>
</response>

Example 2 (A Response Showing No Changes):

Request
http://www.mediafire.com/api/unversioned/device/get_changes.php?session_token=de8f7c427c7a1e84134175880ca5f7f959a6d2894a47fcc7457ecb65fd930785f72801bc6b2b54be2284baf05a17b4098b47074eff4685259f3a205929e6832ce5e6e9c9affdb3d3&revision=530
Response
{
  "response":
  {
    "action":"device\/get_changes",
    "updated":"",
    "deleted":"",
    "device_revision":"42282",
    "changes_list_block":"530",
    "result":"Success",
    "current_api_version":"2.14"
  }
}

Get Foreign Resources


Description : Gets information about resources shared with the current user.

Required Parameters


Optional Parameters
  • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
  • chunk : Which segment of the data to return (0 = all).
  • sort_by : Key of the column by which to sort (currently supports 'name', 'size', 'sync', 'date_created', 'date_shared').
  • reverse : If '1', sort descending; otherwise, ascending.
  • type : Filter foreign resources by resource type ('files' or 'folders').
  • sync : Filter foreign resources by resource 'sync to desktop' status (0 = no, 1 = yes).
  • contact : Filter foreign resources by user's contact key.
  • filetype : Filter foreign resources by file type ('application', 'archive', 'audio', 'development', 'document', 'image', 'presentation', 'spreadsheet', or 'video')
    No need to filter by 'type' if you specify this as only files will be returned.
  • response_format : 'xml' or 'json' (default 'xml')


GET http://www.mediafire.com/api/unversioned/device/get_foreign_resources.php
POST http://www.mediafire.com/api/unversioned/device/get_foreign_resources.php

Example:

Request
http://www.mediafire.com/api/unversioned/device/get_foreign_resources.php?session_token=TOKEN&signature=SIGNATURE&chunk=1&filter={"type":"files"}
Response
<response>
    <action>device/get_foreign_resources</action>
    <result>Success</result>
    <files>
        <file>
            <TYPICAL_FILE_INFO>...</TYPICAL_FILE_INFO>
            <share_link_enabled>1</share_link_enabled>
            <sharer>CONTACT_KEY_OF_SHARER</sharer>
            <date_shared>2013-02-01 01:02:03</date_shared>
            <attributes>2</attributes>
            <permissions>1</permissions>
            <options>0</options>
        </file>
    </files>
    <folders></folders>
    <current_api_version>2.14</current_api_version>
</response>

Get Patch


Description : Returns the direct download link of a patch file.

Required Parameters

  • session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
  • quick_key : The quickkey that identifies the patch file. Patches have the same quickkeys as the full file they apply to.
  • source_revision : The source revision of the patch.
  • target_revision : The target revision of the patch.

Optional Parameters
  • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
  • response_format : 'xml' or 'json' (default 'xml')


GET http://www.mediafire.com/api/unversioned/device/get_patch.php
POST http://www.mediafire.com/api/unversioned/device/get_patch.php

Example:

Request
http://www.mediafire.com/api/unversioned/device/get_patch.php?session_token=f96070e121f994291afa8f9e829b517b6936e58ec9d61293d9b65c4979d0159e031e852037bf4a827a25b9d60d0e16238bdb8abd5ee36cf258446fd4dcdfa8a79c171bc444a3684b&quick_key=2oc3180v9w8vohv&source_revision=11398&target_revision=11399
Response
<response>
    <action>device/get_patch</action>
    <patch_link>http://205.196.123.34/uc3jppfi4cmg/2od3180v9w8vohv/desktop.ini.patch.50398.50399</patch_link>
    <patch_hash>3e216115bf425e7851cb3310656279109884e672aca190db13601ca2a5e4af57</patch_hash>
    <result>Success</result>
    <current_api_version>2.14</current_api_version>
</response>

Get Resource Shares


Description : Returns a list of contacts, along with their permissions, of a shared file or folder.

Required Parameters


Optional Parameters
  • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
  • response_format : 'xml' or 'json' (default 'xml')

Response:
  • contact_key : Key representing a user relationship.
  • display_name : Name or e-mail of the contact.
  • avatar : URI for the contact's avatar image.
  • permissions : Bit @offset 0 = read; @offset 1 = read + write; @offset 2 = manage.

  • GET http://www.mediafire.com/api/unversioned/device/get_resource_shares.php
    POST http://www.mediafire.com/api/unversioned/device/get_resource_shares.php

    Example:

    Request
    http://www.mediafire.com/api/unversioned/device/get_resource_shares.php?session_token=TOKEN&resource=QUICKKEY_OR_FOLDER_KEY
    
    Response:
    <response>
        <action>device/get_resource_shares</action>
        <shares>
            <share>
                <contact_key>1234567</contact_key>
                <display_name>Johnny MediaFire</display_name>
                <avatar>URI_FOR_AVATAR_IMAGE</avatar>
                <permissions>2</permissions>
            </share>
        </shares>
        <result>Success</result>
        <current_api_version>2.14</current_api_version>
    </response>
    

    Get Status


    Description: Returns the status of a device specified by device_id. Some of the information returned is:

    • async_jobs_in_progress : Whether or not there are any currently-in-progress jobs.
    • device_revision : The revision number of the device.

    Required Parameters:
    Optional Parameters:
    • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
    • device_id : The ID of the device. If not passed, it would return the status of the cloud device.
    • simple_report : 'yes' or 'no' (default 'no'). Determines if the async_jobs_in_progress field is returned.
    • response_format : 'xml' or 'json' (default 'xml')


    GET http://www.mediafire.com/api/unversioned/device/get_status.php
    POST http://www.mediafire.com/api/unversioned/device/get_status.php

    Example:

    Request
    http://www.mediafire.com/api/unversioned/device/get_status.php?session_token=de8f7c427c7a1e84134175880ca5f7f959a6d2894a47fcc7457ecb65fd930785f72801bc6b2b54bd2284baf05a17b4098b47074eff4685259f3a205929e6832ce5e6e9c9affdb3d3
    
    Response
    <response>
        <action>device/get_status</action>
        <async_jobs_in_progress>yes</async_jobs_in_progress>
        <result>Success</result>
        <current_api_version>2.14</current_api_version>
    </response>
    

    Get Trash


    Description : Returns the trash can folder data and the list of immediate files and folders in the trash can. Contents of subfolders in the trash can will not be returned.

    Required Parameters

    • session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
    • device_id : The ID of the device. If not passed, it would return files and folders from the cloud's trash can.
    • data_only : Return trash can folder data only, 'yes' or 'no' (default 'no').

    Optional Parameters
    • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
    • response_format : 'xml' or 'json' (default 'xml')

    GET http://www.mediafire.com/api/unversioned/device/get_trash.php
    POST http://www.mediafire.com/api/unversioned/device/get_trash.php

    Example:

    Request
    http://www.mediafire.com/api/unversioned/device/get_trash.php?session_token=de8f7c427c7a1e84134175880ca5f7f959a6d2894a47fcc7457ecb65fd930785f72801bc6b2b54be2284baf05a17b4098b47074eff4685259f3a205929e6832ce5e6e9c9affdb3d3
    
    Response
    <response>
        <action>device/get_trash</action>
        <folder_count>0</folder_count>
        <folders/>
        <file_count>3</file_count>
        <files>
            <file>
                <quickkey>zwofgsdyae4kadu</quickkey>
                <filename>presentation(3).rtf</filename>
                <description/>
                <size>1564</size>
                <privacy>public</privacy>
                <created>2013-02-18 13:41:30</created>
                <password_protected>no</password_protected>
                <filetype>document</filetype>
                <mimetype>text/rtf</mimetype>
                <flag>22</flag>
                <hash>2288fbc2f2ad7573b5a718c40de5a2052cbc370bd61dc8a875c7990994521191</hash>
                <downloads>0</downloads>
                <views>0</views>
            </file>
            <file>
                <quickkey>bumi3qrvdedun6l</quickkey>
                <filename>test_2013.rtf</filename>
                <description/>
                <size>1559</size>
                <privacy>public</privacy>
                <created>2013-02-18 11:16:50</created>
                <password_protected>no</password_protected>
                <filetype>document</filetype>
                <mimetype>text/rtf</mimetype>
                <flag>22</flag>
                <hash>2fcae6e06f5392a01422b38f916504c13feb2419f64091a696ccc9e2f193267f</hash>
                <downloads>0</downloads>
                <views>0</views>
            </file>
            <file>
                <quickkey>pbj6wh2zbua09uh</quickkey>
                <filename>abc.rtf</filename>
                <description/>
                <size>1564</size>
                <privacy>public</privacy>
                <created>2013-02-18 13:48:18</created>
                <password_protected>no</password_protected>
                <filetype>other</filetype>
                <mimetype>text/rtf</mimetype>
                <flag>2</flag>
                <downloads>0</downloads>
                <views>0</views>
            </file>
        </files>
        <result>Success</result>
        <current_api_version>2.14</current_api_version>
    </response>
    

    Get Updates


    Description : Returns the list of patches for a file that belongs to the session user for a certain revision range. It will also return the current revision of the file.

    Required Parameters


    Optional Parameters
    • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
    • target_revision : This is the end revision. If not passed, the current file revision would be the target revision.
    • response_format : 'xml' or 'json' (default 'xml')


    GET http://www.mediafire.com/api/unversioned/device/get_updates.php
    POST http://www.mediafire.com/api/unversioned/device/get_updates.php

    Example:

    Request
    http://www.mediafire.com/api/unversioned/device/get_updates.php?session_token=6945fe8378790a36dbc7463646b89521c954a0108ae2085d82ce8d220714c86710931c195fb32584ca59abc07dbc7a70c1844e303ec6e83257b8332950153d3ca8ea23bdb8f99942&quick_key=plga785dlu6bxaq&revision=8
    
    Response
    <response>
        <action>device/get_updates</action>
        <current_revision>91</current_revision>
        <updates>
            <update>
                <source_revision>85</source_revision>
                <source_hash>8b757fba0754c3ae6631742fb51add94443d4cc4b3745898c70b33e32b308017</source_hash>
                <target_revision>88</target_revision>
                <target_hash>973ef04268f32a0cff1b4d069b125c78694b3dd357c601d6c6310d73ac75c385</target_hash>
                <timestamp>2013-06-15 22:53:11</timestamp>
            </update>
            <update>
                <source_revision>88</source_revision>
                <source_hash>973ef04268f32a0cff1b4d069b125c78694b3dd357c601d6c6310d73ac75c385</source_hash>
                <target_revision>91</target_revision>
                <target_hash>00df938ff86618903e66857bda65c7ee5b73b3ee3dcf71cc06a195715a737cd9</target_hash>
                <timestamp>2013-06-16 09:15:51</timestamp>
            </update>
        </updates>
        <result>Success</result>
        <current_api_version>2.14</current_api_version>
    </response>
    

    Get User Shares


    Description : Returns a list of files and folders that you have shared with others.

    Required Parameters


    Optional Parameters
    • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
    • contacts : Comma-separated list of contact keys by which to filter results (defaults to all contacts).
    • limit : Number of most recent shares to return (defaults to 100).
    • response_format : 'xml' or 'json' (default 'xml')

    Response:
    • contact_key : Key representing a user relationship.
    • display_name : Name or e-mail of the contact.
    • avatar : URI for the contact's avatar image.
    • resource : Quick key or folder key of the shared resource.
    • attributes : Bit 0 = folder; 1 = file.
    • permissions : Bit 0 = read; 1 = read + write; 2 = manage.

    • GET http://www.mediafire.com/api/unversioned/device/get_user_shares.php
      POST http://www.mediafire.com/api/unversioned/device/get_user_shares.php

      Example:

      Request
      http://www.mediafire.com/api/unversioned/device/get_user_shares.php?session_token=TOKENcontacts=1234567,7654321&limit=1
      
      Response
      <response>
          <action>device/get_user_shares</action>
          <shares>
              <share>
                  <contact_key>1234567</contact_key>
                  <display_name>Joe Blow</display_name>
                  <avatar>URI_FOR_AVATAR_IMAGE</avatar>
                  <resource_key>a123b456c7890</resource_key>
                  <attributes>2</attributes>
                  <permissions>2</permissions>
              </share>
          </shares>
          <result>Success</result>
          <current_api_version>2.14</current_api_version>
      </response>
      

      Share Resources


      Description : Share files and/or folders with specified contacts.

      Required Parameters

      • session_token : A type 1 or type 2 session token. (Type 2 will require a call signature).
      • resources : Comma separated list of file or folder keys you wish to share.
      • contacts : Comma separated list of contact keys for whom you wish to share your resources.

      Optional Parameters
      • signature :This is the call signature that is required to authenticate a type 2 session token transaction.
      • permissions : 1 (default) = read; 2 = read + write; 4 = manage.
      • message : Personal message to display in the share invitation.
      • fb_access_token : The Facebook Access Token of the Facebook user to send the message to (this must be obtained from Facebook).
      • tw_oauth_token : The Twitter OAuth Token of the Twitter user to send the message to (this must be obtained from Twitter).
      • tw_oauth_token_secret : The Twitter OAuth Token Secret Key (this must be obtained from twitter).
      • response_format : 'xml' or 'json' (default 'xml')


      GET http://www.mediafire.com/api/unversioned/device/share_resources.php
      POST http://www.mediafire.com/api/unversioned/device/share_resources.php

      Example:

      Request
      http://www.mediafire.com/api/unversioned/device/share_resources.php?session_token=TOKEN&signature=SIGNATURE&resources=QUICKKEY,FOLDERKEY&contacts=1234567,7654321&permissions=2
      
      Response:
      <response>
          <action>device/share_resources</action>
          <result>Success</result>
          <current_api_version>2.14</current_api_version>
      </response>
      

      Unshare Resource


      Description : Unshares the specified resource with all contacts or one specified contact.

      Required Parameters


      Optional Parameters
      • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
      • contact : Comma separated list of contact keys you wish to revoke sharing of a specified resource (default=all).
      • response_format : 'xml' or 'json' (default 'xml')


      GET http://www.mediafire.com/api/unversioned/device/unshare_resource.php
      POST http://www.mediafire.com/api/unversioned/device/unshare_resource.php

      Example:

      Request
      http://www.mediafire.com/api/unversioned/device/unshare_resource.php?resource=QUICKKEY_OR_FOLDERKEY&session_token=TOKEN&signature=SIGNATURE
      
      Response
      <response>
          <action>device/unshare_resource</action>
          <result>Success</result>
          <current_api_version>2.14</current_api_version>
      </response>
      

      Unshare Resources


      Description : Unshares the specified resources with all contacts or one specified contact.

      Required Parameters


      Optional Parameters
      • signature : This is the call signature that is required to authenticate a type 2 session token transaction.
      • contact : Comma separated list of contact keys you wish to revoke sharing of a specified resource (default=all).
      • response_format : 'xml' or 'json' (default 'xml')


      GET http://www.mediafire.com/api/unversioned/device/unshare_resources.php
      POST http://www.mediafire.com/api/unversioned/device/unshare_resources.php

      Example:

      Request
      http://www.mediafire.com/api/unversioned/device/unshare_resources.php?resource=QUICKKEY_OR_FOLDERKEY&session_token=TOKEN&signature=SIGNATURE
      
      Response
      <response>
          <action>device/unshare_resources</action>
          <result>Success</result>
          <current_api_version>2.14</current_api_version>
      </response>