This shows you the differences between two versions of the page.
get_collection_resources [2010/11/05 15:10] jay created |
get_collection_resources [2010/12/02 22:34] (current) jay |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== GET /.format===== | + | ===== GET /collections/:collectionkey/resources.format===== |
GET /collections/:collectionkey/resources.format returns the list of resources in collection :collectionkey | GET /collections/:collectionkey/resources.format returns the list of resources in collection :collectionkey | ||
Line 7: | Line 7: | ||
* per_page (optional - max resources to return at once, default 30) | * per_page (optional - max resources to return at once, default 30) | ||
* page (optional, default 1) | * page (optional, default 1) | ||
- | * Curl command line: <code>curl -u user:apikey "https://4thefile.com/api_v1/collections/ESuVkqZF/resources.xml?page=1,per_page=10"</code> | + | * tag (optional -- only Resources with matching tag will be included. tag=untagged matches only Resources in Collection which have no tags) |
+ | * cdate (optional - only resources added after cdate will be returned. cdate must be in yyyy-mm-dd or “yyyy-mm-dd hh:mm:ss” format) | ||
+ | * Curl command line: <code>curl -u user:apikey "https://4thefile.com/api_v1/collections/ESuVkqZF/resources.xml?page=1&per_page=10&tag=newtag"</code> | ||
* example xml response: | * example xml response: | ||
<code xml> | <code xml> | ||
Line 13: | Line 15: | ||
<data> | <data> | ||
<next_page_link></next_page_link> | <next_page_link></next_page_link> | ||
- | <resource_count>3</resource_count> | + | <resource_count>2</resource_count> |
<resources> | <resources> | ||
<resourcekey>zdV2nhbL</resourcekey> | <resourcekey>zdV2nhbL</resourcekey> | ||
Line 50: | Line 52: | ||
<size>205</size> | <size>205</size> | ||
<subject>Example 4theFile resource</subject> | <subject>Example 4theFile resource</subject> | ||
- | <tags></tags> | + | <tags>newtag,tag33</tags> |
</resources> | </resources> | ||
- | ...etc... | ||
</data> | </data> | ||
Line 64: | Line 65: | ||
* retention: 1=permanent. Resources are normally removed from the system if not accessed for a period of 6 months. Resources with retention=1 will never be removed unless removed by the resource owner. | * retention: 1=permanent. Resources are normally removed from the system if not accessed for a period of 6 months. Resources with retention=1 will never be removed unless removed by the resource owner. | ||
* size: total size of the resource in bytes. | * size: total size of the resource in bytes. | ||
- | * tags: tags are used to categorize resources within a collection. | + | * tags: tags are used to categorize resources within a collection. A resource can have multiple tags (comma-separated). |