ApiFunction_export_tags

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

export_tags

 



Description

 

This method returns all the tags in a user's account.  Note that, if you want to find the tags associated with a particular file or folder, get_account_tree can be used.

 

 

Input parameters:

 

Name Type Description
api_key string The API key obtained when registering a project with OpenBox.
auth_token string The ticket obtained from get_ticket, used to authenticate a user between Box and your application.

 

Output parameters:

 

Name Type Description
status string

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

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

  • 'not_logged_in'
  • 'application_restricted'
tag_xml base64Binary An XML structure representing the tags that the user has.

 

On a successful result, you will receive 'export_tags_ok' and tag_xml of base64 encoded tags.

After decoding tag_xml you will get xml like this:

 

 

<?xml version="1.0"?>
<tags>
<tag id="37">music</tag>
<tag id="38">mp3</tag>
</tags>

 

 

REST

 

Request

 

https://www.box.net/api/1.0/rest?action=export_tags&api_key=rrc1d3ntb53tt6b2vhail6rdtrsxov3v&auth_token=z35bqm6o87ry4k02eug3r3yhrfsc5del

  

 

Response

 

<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>export_tags_ok</status>
<tags>
<tag id="37">tag1</tag>
<tag id="38">tag2</tag>
</tags>
</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:export_tags>
<api_key xsi:type="xsd:string">rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<sid xsi:type="xsd:string">f3704d9358146e51f5819ea4d755b1c5</sid>
</tns:export_tags>
</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:export_tagsResponse>
<status xsi:type="xsd:string">export_tags_ok</status>
<tag_xml xsi:type="xsd:base64Binary">
PD94bWwgdmVyc2lvbj0iMS4wIj8+PHRhZ3M+PHRhZyBpZD0iMzciPnRhZzE8L3RhZz48dGFnIGlk
PSIzOCI+dGFnMjwvdGFnPjwvdGFncz4=
</tag_xml>
</ns4:export_tagsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

XML

 

Request

 

<?xml version='1.0' encoding='UTF-8' ?>
<request>
<action>export_tags</action>
<api_key>rrc1d3ntb53tt6b2vhail6rdtrsxov3v</api_key>
<auth_token>z35bqm6o87ry4k02eug3r3yhrfsc5del</auth_token>
</request>

 

 

Response

 

<?xml version='1.0' encoding='UTF-8'?>
<response>
<status>export_tags_ok</status>
<tags>
<tag id="37">tag1</tag>
<tag id="38">tag2</tag>
</tags>
</response>

 


 

Need additional assistance? Please feel free to Contact us