ApiFunction_get_file_info

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

get_file_info

 



Description

 

This method retrieves the details for a specified file.

 

 

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.
file_id long The id of the file for with you want to obtain more information. 

 

Output parameters:

 

Name Type Description
status string

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

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_access_denied' - The file_id is either invalid, or not accessible by that user.
info base64Binary, SOAPFileInfo An XML or SOAP structure providing additional information on the specified file (info object).

 

 

 

REST

 

Request

 

https://www.box.net/api/1.0/rest?action=get_file_info&api_key=rrc1d3n4b53tt6b2vh1il6tdtrsxov3v&auth_token=8sdevidfoatqdn39qu6ke7f10nlp4njv&file_id=224

 

 

Response

 

<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>s_get_file_info</status>
<info>
<file_id>224</file_id>
<file_name>Box Press Release.doc</file_name>
<folder_id>0</folder_id>
<shared>0</shared>
<shared_name></shared_name>
<size>22528</size>
<description></description>
<sha1>9a0bc49038c167151c544ac0b5fc9042335a41a3</sha1>
<created>1182159570</created>
<updated>1182159571</updated>
</info>
</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:get_file_info>
<api_key xsi:type="xsd:string">rrc1d3n4b53tt6b2vh1il6tdtrsxov3v</api_key>
<sid xsi:type="xsd:string">fibe48ppm8otd1bepli9cyjma6mrfoea</sid>
<file_id xsi:type="xsd:int">224</file_id></ns4:get_file_info>

</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:get_file_infoResponse>
<status xsi:type="xsd:string">s_get_file_info</status>
<file xsi:type="ns4:SOAPFileInfo">
<file_id xsi:type="xsd:long">224</file_id>

<file_name xsi:type="xsd:string">Box Press Release.doc</file_name>
<folder_id xsi:type="xsd:long">0</folder_id>
<shared xsi:type="xsd:int">0</shared>
<public_name xsi:type="xsd:string"></public_name>

<size xsi:type="xsd:long">22528</size>
<description xsi:type="xsd:string"></description>
<sha1 xsi:type="xsd:string">9a0bc49038c167151c544ac0b5fc9042335a41a3</sha1>
<created xsi:type="xsd:long">1182159570</created>

<updated xsi:type="xsd:long">1182159571</updated>
</file>
</ns4:get_file_infoResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

 

<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>get_file_info</action>
<api_key>rrc1d3n4b53tt6b2vh1il6tdtrsxov3v</api_key>
<auth_token>d1bpbz3r1nc5z5jk00tkkldsrhxy6u8q</auth_token>
<file_id>224</file_id>
</request>

 

Response

 

<?xml version='1.0' encoding='UTF-8' ?>
<response>
<status>s_get_file_info</status>
<info>
<file_id>224</file_id>
<file_name>Box Press Release.doc</file_name>
<folder_id>0</folder_id>
<shared>0</shared>
<shared_name></shared_name>
<size>22528</size>
<description></description>
<sha1>9a0bc49038c167151c544ac0b5fc9042335a41a3</sha1>
<created>1182159570</created>
<updated>1182159571</updated>
</info>
</response>

 


 

Need additional assistance? Please feel free to Contact us