User Tools

Site Tools


get_collections

GET /collections.format

returns the list of collections owned by you.

  • response formats supported: .xml, .json
  • query parameters: none
  • Curl command line:
    curl -u user:apikey https://4thefile.com/api_v1/collections.xml
  • example xml response:
<?xml version="1.0" encoding="UTF-8"?>
<data>
  <collection_count>5</collection_count>
  <collections>
    <collection_name>4theFile demo</collection_name>
    <collectionkey>ESuVkqZF</collectionkey>
    <created>2010-06-02 14:01:45</created>
    <description>Used to demo how a shareable collection looks in 4theFile</description>
    <email>4thefiledemo</email>
    <moderated>9</moderated>
    <modified>2010-06-02 14:23:20</modified>
    <privacy>1</privacy>
    <resource_count>3</resource_count>
    <resources_link>https://4thefile.com/api_v1/collections/ESuVkqZF/resources.xml</resources_link>
  </collections>
  <collections>
    <collection_name>ApplicationZ demo collection</collection_name>
    <collectionkey>nV4wRRrx</collectionkey>
    <created>2010-06-02 15:02:00</created>
    <description>This is a demo of a 4theFile collection as described
in the 4theFile Integration Center http://4theFile.com/pages/integration/</description>
    <email>applicationz</email>
    <moderated>9</moderated>
    <modified>2010-06-02 15:11:22</modified>
    <privacy>1</privacy>
    <resource_count>2</resource_count>
    <resources_link>https://4thefile.com/api_v1/collections/nV4wRRrx/resources.xml</resources_link>
  </collections>
...etc...
</data>
  • example json response (reformatted for easier viewing)
{"collections":
	[{"resources_link":"https:\/\/4thefile.com\/api_v1\/collections\/ESuVkqZF\/resources.json",
	"collectionkey":"ESuVkqZF",
	"description":"Used to demo how a shareable collection looks in 4theFile",
	"collection_name":"4theFile demo",
	"modified":"2010-06-02 14:23:20",
	"resource_count":3,
	"created":"2010-06-02 14:01:45",
	"email":"4thefiledemo",
	"moderated":9,
	"privacy":1},
	{"resources_link":"https:"
	  // ... etc...
	,"privacy":1}],
"collection_count":5}
  • field descriptions:
    • email: the email address for collection submissions (@4thefile.com)
    • moderated: 1=none,3=retro-moderation(collection owner is notified of new submissions),5=moderated(resource hidden until collection owner approves, not currently supported),9=closed(no more submissions)
    • privacy: 1=shareable, 5=private(anyone can submit but only owner can list collection contents)
get_collections.txt · Last modified: 2010/11/08 23:37 by jay