Question GET with solutions and comments

GET /questions/:id/complete

Returns one question with all nested resources (tags, comments, solutions) by ID.

Solutions are ordered by average rating (descending). If the average ratings are equal, then the solution with the highest number of ratings are returned first. If there is no difference in the ratings at all, then the most recently published solutions are returned first. Solutions that have not yet been rated are ranked as if they had an average rating of 3.5 stars.

Parameter Type Default Required Description
show_question_poser boolean false If set to true, the response contains an additional field "user" with the question poser. Requires the role super_admin.
with_solution_tags boolean false If set to true, the response includes tags of the solutions.
deanonymize_deleted_users boolean false If set to true, this parameter will override the network setting anonymize_deleted_users. The complete information is returned for deleted users, if the user has the permission to view deleted users. See Disguise deleted users.
deanonymize_users_email boolean false Allows to override the anonymize_users_email network setting, if the user has the permission to see the email of other users. Requires the role user_admin. See email anonymization.
include_deleted_solutions boolean false If set to true, the response includes deleted solutions to the question. Requires the role content_admin. Deleted solutions will always get listed after all non-deleted ones and are ordered by their rating.
translations string - If defined, the response will include question, solution and comment translations in requested language. Else, the response will include translations in the content translation language of the user. This is only available for networks with automatic translations enabled. Only Starmind supported languages and automatic translation enabled languages for given network are considered. Languages matching the original language of a question as well as unsupported languages are ignored.

Response

{
    "id": 21,
    "is_published": true,
    "published": "2015-02-02T11:36:05.000Z",
    "title": "Is there a Study in Scarlet?",
    "slug": "is-there-a-study-in-scarlet",
    "description": null,
    "solution_count": 1,
    "created": "2013-11-10T10:13:21.000Z",
    "updated": "2013-11-10T12:16:45.000Z",
    "content_updated": "2013-11-10T12:10:45.000Z",
    "last_activity": "2013-11-10T12:20:34.000Z",
    "image": "https://cdn.example.com/avatar/default/2d/1b84215e2f035a22f6fec213d3b1d9.jpg",
    "is_mine": false,
    "is_deleted": false,
    "view_count": 28,
    "translation": {
      "language": "fr",
      "title": "Y a-t-il une étude à Scarlet?",
      "description": null
    },
    "comments": [
        {
            "id": 20,
            "description": "Who is Scarlet?",
            "created": "2014-04-02T15:42:41.000Z",
            "updated": "2014-04-02T15:42:41.000Z",
            "promoted_solution": null,
            "upvote_count": 21,
            "language": "en",
            "current_user_upvoted_comment": false, 
            "translation": {
                "language": "fr",
                "description": "Qui est Scarlet ?" 
            },
            "user": {
                "id": 42,
                "is_deleted": false,
                "is_hidden": false,
                "is_system": false,
                "language": "en",
                "country": "uk",
                "gender": "m",
                "firstname": "Sherlock",
                "lastname": "Holmes",
                "email": "sherlock.holmes@example.com",
                "auth_type": "simple",
                "location": "Baker Street 221B, London",
                "about": "Private Detective",
                "company": "Ward, Lock & Co",
                "department": "Investigations",
                "position": "Master Detective",
                "image": "https://cdn.example.com/user/6/i_2d1b84215e2f035a22f6fec213d3b1d9.jpg",
                "first_seen": "2015-02-02T11:31:05.000Z",
                "customfields": { "occupation": "Detective" },
                "score_level": 4,
                "score_points": 84
            }
        },
        {
            "id": 20,
            "description": "Not to be confused with the red color",
            "created": "2014-04-03T21:11:32.000Z",
            "updated": "2014-04-03T21:11:32.000Z",
            "content_updated": "2014-04-03T21:11:32.000Z",
            "promoted_solution": null,
            "upvote_count": 3, 
            "language": "en",
            "current_user_upvoted_comment": false,
            "current_user_follows_author": null,
            "current_user_follows_author_last_change": null,
            "translation": null,
            "user": null
        }
    ],
    "solutions": [
        {
            "id": 701,
            "language": "en",
            "is_published": true,
            "published": "2015-02-02T11:36:05.000Z",
            "is_deleted": false,
            "description": "There is a study in Scarlet.",
            "rating": null,
            "rating_count": 0,
            "accepted_by_question_poser": null,
            "created": "2014-04-02T15:42:41.000Z",
            "updated": "2014-04-02T17:42:41.000Z",
            "content_updated": "2014-04-02T16:42:41.000Z",
            "user": {
                "id": 42,
                "is_deleted": false,
                "is_hidden": false,
                "is_system": false,
                "language": "en",
                "country": "uk",
                "gender": "m",
                "firstname": "Sherlock",
                "lastname": "Holmes",
                "email": "sherlock.holmes@example.com",
                "auth_type": "simple",
                "location": "Baker Street 221B, London",
                "about": "Private Detective",
                "company": "Ward, Lock & Co", 
                "department": "Investigations",
                "position": "Master Detective",
                "image": "https://cdn.example.com/user/6/i_2d1b84215e2f035a22f6fec213d3b1d9.jpg",
                "first_seen": "2015-02-02T11:31:05.000Z",
                "customfields": { "occupation": "Detective" },
                "score_level": 4,
                "score_points": 84
            },
            "comments": [
                {
                    "id": 50,
                    "description": "Where is it exactly?",
                    "created": "2014-04-02T15:42:41.000Z",
                    "updated": "2014-04-02T15:42:41.000Z",
                    "content_updated": "2014-04-02T15:42:41.000Z",
                    "promoted_solution": null,
                    "upvote_count": 11,
                    "current_user_upvoted_comment": true,
                    "current_user_follows_author": true,
                    "current_user_follows_author_last_change": "2013-06-21T22:01:42.000Z",
                    "translation": {
                        "language": "fr",
                        "description": "Qui est Scarlet ?"
                    },
                    "user": {
                        "id": 42,
                        "is_deleted": false,
                        "is_hidden": false,
                        "is_system": false,
                        "language": "en",
                        "country": "uk",
                        "gender": "m",
                        "firstname": "Sherlock",
                        "lastname": "Holmes",
                        "email": "sherlock.holmes@example.com",
                        "auth_type": "simple",
                        "location": "Baker Street 221B, London",
                        "about": "Private Detective",
                        "company": "Ward, Lock & Co",
                        "department": "Investigations",
                        "position": "Master Detective",
                        "image": "https://cdn.example.com/user/6/i_2d1b84215e2f035a22f6fec213d3b1d9.jpg",
                        "first_seen": "2015-02-02T11:31:05.000Z",
                        "customfields": { "occupation": "Detective" },
                        "score_level": 4,
                        "score_points": 84
                    }
                }
            ],
            "tag_relations": [
                {
                    "tag": "Study in Scarlet",
                    "is_auto": true
                }
            ],
            "attachments": [],
            "validity_period": null,
            "expires": null,
            "upvote_count": 21,
            "current_user_upvoted_solution": false,
            "current_user_follows_author": false,
            "current_user_follows_author_last_change": "2013-11-05T10:22:11.000Z"
        }
    ],
    "tag_relations": [
        {
            "tag": "Study",
            "is_auto": true
        },
        {
            "tag": "Scarlet",
            "is_auto": false
        }
    ],
    "attachments": [
        {
            "name": "attachment.pdf",
            "size": 270806,
            "hash": "a49227838d915097d972357d501b6328bbd3a6c9",
            "id": 560,
            "mime_type": "application/pdf",
            "created": "2013-11-18T14:20:39.000Z"
        }
    ],
    "category": {
        "id": 123,
        "name": "A Category",
        "description": "Very interesting stuff.",
        "color": "#aa00ff",
        "translations": [
            {
                "language": "es",
                "name": "Una categoría",
                "description": "Cosas muy interesantes."
            }
        ]
    },
    "current_user_vote": "upvote"
}

Voting

The possible values for current_user_vote are: * null, if the user didn't vote on the question. * "upvote", if the user upvoted the question. * "downvote", if the user downvoted the question.