Solution GET Resources

Solution by ID

GET /solutions/:id

The following query parameters may be used.

Parameter Type Default Required Description
with_solution_tags boolean false If set to true, the response includes tags of the solutions.

Returns a solution by its ID.

{
    "id": 55,
    "language": "en",
    "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.

If no solution draft exist, we respond with 204. If the question resource does not exist, we respond with 404.

{
    "id": 55,
    "language": "en",
    "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",
    "attachments": "/solutions/55/attachments",
    "validity_period": null,
    "expires": null,
    "upvote_count": 20
}