Skip to content

admin get_post.json

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

###admin/get_post.json###

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

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

There is a single field:

post_id
    This is the ID of the desired post.

Example response:

{
    "post" :
        {
            "deleted": false,
            "verified_user": false,
            "post_id": 1,
            "client_id": "c844debc-7671-4226-aada-b8b4bf58040b",
            "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
}

There are two different errors that can come back:

{
    "error_text": "Invalid auth token.",
    "success": false
}

{
    "error_text": "Missing post_id",
    "success": false
}

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