ApiFunction_set_description

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

set_description

 



Description

 

This method sets the description for a file or 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 being targetted.  This can be set as 'file' or 'folder'.
target_id long The id of the item for you wish to set a description.  If the target is a folder, this will be the folder_id.  If the target is a file, this will be the file_id.
description string The description to be applied to the item.

 

Output parameters:

 

Name Type Description
status string

If the operation was successful, the status parameter will be 's_set_description'.

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

  • 'not_logged_in' - The user is not logged into your application.  Your authentication_token is not valid.
  • 'application_restricted'- You provided an invalid api_key, or the api_key is restricted from calling this function.
  • 'e_set_description' - For all other errors.  Verify that your target is 'file' or 'folder', that your target_id is a valid item id in the user's account, and that the new description contains valid characters.

 

 

REST

 

Request

 

https://www.box.net/api/1.0/rest?action=set_description&api_key=rrc1d3n4b53tt6b2vh1il6tdtrsxov3v&auth_token=6sx9xnm2z6vgjxx3xpvsea2p9oth8le2&target=file&target_id=224&description=123

 

 

 

Response

 

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

 

 

SOAP

 

Request

 

<?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:set_description>
<api_key xsi:type="xsd:string">rrc1d3n4b53tt6b2vh1il6tdtrsxov3v</api_key>
<sid xsi:type="xsd:string">1u5knz7ztli9z8zigepu8opvv0jna11c</sid>
<target xsi:type="xsd:string">file</target>

<target_id xsi:type="xsd:int">224</target_id>
<description xsi:type="xsd:string">123</description>
</ns4:set_description>
</SOAP-ENV:Body>
</SOAP-ENV: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:set_descriptionResponse>
<status xsi:type="xsd:string">s_set_description</status>
</ns4:set_descriptionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

 

<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>set_description</action>
<api_key>rrc1d3n4b53tt6b2vh1il6tdtrsxov3v</api_key>
<auth_token>79r205ihgupsbucfani0iu483oa1iupn</auth_token>
<target>file</target>
<target_id>224</target_id>
<description>123</description>
</request>

 

Response

 

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

 


 

Need additional assistance? Please feel free to Contact us