Skip to content

admin get_collection_posts.json

Timothy Duffy edited this page Mar 8, 2015 · 1 revision

###admin/get_collection_posts.json###

All admin api's require a token to be passed in. See get_access_token.json for more information.

admin/get_collection_posts.json?token=238236fa-0e1a-499c-8051-c46e2f416387&collection_id=<collection_id>

This is a HTTP GET end point, and includes the following fields:

collection_id
    This is the ID of the collection that all returned posts belong to.

Note: that the media_objects array will hold all of the media objects associated with the post.

A valid response looks like this:

    {
    "post_count": 1,
    "collection_id": 1,
    "posts": [
        {
            "deleted": false,
            "verified_user": true,
            "post_id": 1,
            "client_id": "ef32b30b-6e86-4210-ae2a-15b9de670c13",
            "language_code": "en",
            "lat": 43.1,
            "lng": -77.5,
            "post_datetime": "2015-01-07 15:19:26.665846",
            "media_objects": [
                {
                    "media_id": "668ad40c-1c39-41b1-baf5-5cb9e3c5f64f",
                    "file_name": "4c1c23ab-d989-49fc-af1a-594a38cc1339.jpg",
                    "preview_file_name": "4c1c23ab-d989-49fc-af1a-594a38cc1339p.jpg",
                    "media_text": "Hopefully staying awake long enough to see the ball drop ... :/",
                    "caption": "",
                    "media_type_description": "Text.",
                    "media_type_name": "text"
                }
            ],
            "user_id": 2,
            "title": "",
            "assignment_id": 1,
            "language_name": "English"
        }
    ],
    "success": true,
    "collection_name": "Assignment #1"
}

The file_name and preview_file_name fields are used in this manor:

http://<root_domain>/media/<file_name>

- and -

http://<root_domain>/media/<preview_file_name>
Clone this wiki locally