Solution GET Resources

Solution by ID

GET /solutions/:id

Returns a solution by its ID.

{
    "id": 55,
    "is_published": true,
    "published": "2015-02-02T11:36:05.000Z",
    "rating": 4.5,
    "rating_count": 4,
    "description": "<p>There are some reports about him traveling through Europe.</p>",
    "user": "/users/97",
    "is_deleted": false,
    "created": "2013-12-13T16:40:21.000Z",
    "updated": "2013-12-13T16:42:22.000Z",
    "content_updated": "2013-12-13T16:42:22.000Z",
    "question": "/questions/47",
    "tag_relations": [
        {
            "tag": "Europe",
            "is_auto": true
        }
    ],
    "attachments": "/solutions/55/attachments",
    "validity_period": null,
    "expires": null,
    "upvote_count": 21,
    "accepted_by_question_poser": "2014-04-02T15:42:41.000Z"
}

Solution Draft for Question

GET /questions/:id/solutions/draft

Returns a draft for the current user if one exists.

{
    "id": 55,
    "is_published": false,
    "published": null,
    "rating": null,
    "rating_count": 0,
    "description": "<p>There are some reports about him traveling through Europe.</p>",
    "user": "/users/97",
    "is_deleted": false,
    "created": "2013-12-13T16:40:21.000Z",
    "updated": "2013-12-13T16:42:22.000Z",
    "content_updated": "2013-12-13T16:42:22.000Z",
    "question": "/questions/47",
    "tag_relations": [
        {
            "tag": "Europe",
            "is_auto": true
        }
    ],
    "attachments": "/solutions/55/attachments",
    "validity_period": null,
    "expires": null,
    "upvote_count": 20
}