ApiFunction_move

Page history last edited by jeremy@... 1 wk ago

move

 


 

Description

 

This method moves a file or folder into another folder.

 

Input parameters:

 

Name Type Description
api_key string The API key obtained when registering a project with OpenBox.
auth_token string The authentication token obtained when a user authenticates your application with Box.
target string The type of item to be moved.  Can be 'file' or 'folder'.
target_id long The id of the item you wish to move.  If the target is a folder, this will be the folder_id.  If the target is a file, this will be the file_id.
destination_id long The folder_id of the folder to which you will move the item.

 

 

Output parameters:

 

Name Type Description
status string

If the operation was successful, the status will be 's_move_node'

If the operation was not successful, the status field can be:

  • 'e_move_node'
  • 'not_logged_in'
  • 'application_restricted'

 

 

REST

 

Request

 

https://www.box.net/api/1.0/rest?action=move&api_key=rrc1d3ntb53tt6b2vhail6rdtrsxov3v&auth_token=19x43ykyo3bnefz75yyuepxgm6o4rf7a&target=folder&target_id=739&destination_id=738

  

Response

 

<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>s_move_node</status>
</response>

 

SOAP

 

Request

 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:boxnet" xmlns:types="urn:boxnet/encodedTypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:move>
<api_key xsi:type="xsd:string">rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<sid xsi:type="xsd:string">baa8b089c5a635adc0baa68aa1c61bbe</sid>
<target xsi:type="xsd:string">file</target>
<target_id xsi:type="xsd:long">3777</target_id>
<destination_id xsi:type="xsd:long">440</destination_id>
</tns:move>
</soap:Body>
</soap:Envelope>

 

Response

 

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="urn:boxnet"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
<SOAP-ENV:Body>
<ns4:moveResponse>
<status xsi:type="xsd:string">s_move_node</status>
</ns4:moveResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

 

<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>move</action>
<api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<auth_token>19x43ykyo3bnefz75yyuepxgm6o4rf7a</auth_token>
<target>folder</target>
<target_id>739</target_id>
<destination_id>738</destination_id>
</request>

 

Response

 

<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>s_move_node</status>
</response>

 


 

Need additional assistance? Please feel free to Contact us