Listing and querying collections

The command-line tools support queries to list collections, get metadata, and list collection content. All results are returned as a JSON dictionary so that scripts can easily parse the information.

Listing collections

A query can return a list of all your collections, including their IDs and titles.

Linux & OS X Windows
./seedme.py -query
seedme.cmd -query

This prints a JSON dictionary, such as this for two collections:

{   
    "1": {
        "collection_id": "1234",
        "title": "My collection"
    },
    "2": {
        "collection_id": "5678",
        "title": "My other collection"
    },
    "status":"success"
}

Finding matching collections

You can query for a list of collections that have specific key/value pairs.

Linux & OS X Windows
./seedme.py -query \
  -keyvalue "pressure:1 Mpa"
seedme.cmd -query `
  -keyvalue "pressure:1 Mpa"

The same type of JSON dictionary is returned.

Listing a collection's contents

You can query a specific collection's content by using its collection ID.

Linux & OS X Windows
./seedme.py -query 1234
seedme.cmd -query 1234

Above, '1234' is the ID of the collection you wish to query.

A JSON dictionary for the collection is returned, such as this:

{
    "collection_id": "1234",
    "keyvalue": {
        "pressure": "1 Mpa"
    },
    "file": [
        {
            "url": "https://www.seedme.org/files/12345678",
            "filename": "cool_image.png",
            "title": "Cool image from early results.png"
        }
    ],
    "modified": "01/23/2015 - 13:34",
    "posted": "09/25/2014 - 18:51",
    "privacy": "public",
    "size": "45586"
    "status": "success",
    "title": "My collection",
}

Listing portions of a collection

You can list only specific features of a collection. Below, '1234' is the ID of the collection you wish to query.

To list only key/value pairs:

Linux & OS X Windows
./seedme.py -query 1234 \
  -list keyvalue
seedme.cmd -query 1234 `
  -list keyvalue

To list only tickers:

Linux & OS X Windows
./seedme.py -query 1234 \
  -list ticker
seedme.cmd -query 1234 `
  -list ticker

To list only the last 5 tickers:

Linux & OS X Windows
./seedme.py -query 1234 \
  -list ticker -tail 5
seedme.cmd -query 1234 `
 -list ticker -tail 5

To list only URLs to files in the collection:

Linux & OS X Windows
./seedme.py -query 1234 -list url
seedme.cmd -query 1234 -list url

URLs can be directly accessed for public collections only.