API endpoint that allows Questions to be viewed or edited.

POST

{
"question": "Title Here",
"tags": [{"tag":{"id":20}}, {"tag":{"id":25}}],
"choices": [{"text":"Choice1"}, {"text":"Choice2"}, {"text":"Choice3"}],
"collections": [{"parent":{"id":X}}],
"description": "More Info Here",
"ogImage": null,
"group": 39,
"geo": 12,
"links": [{"link":"http://google.com", "title":"google"}] #title is optional
}

Searching and filtering

to find questions asked by molly, answered by chozabu, sorted by date of chozabs answer

http://localhost:8000/api/questions/?ordering=-votes__created_at&votes__user__username=chozabu&user__username=molly_bishop1

to find questions with keyword represent, in order of vote count

http://localhost:8000/api/questions/?ordering=-direct_vote_count&search=represent

A shortcut to find answers by a user, and avoid dupe results is answered_by - which takes a user id

http://localhost:8000/api/questions/?answered_by=1

to find questions with any word in question text:

http://localhost:8000/api/questions/?exact_question=word

Extra info on filtering questions in relation to groups:

group=6 # will get active questions in group 6 (represent)
in_group_all=6 # will get all questions in group 6, active or not
in_group_disabled=6 # will only get disabled questions in group 6

count

checkout count to get just the number of questions matching a query

nearby

check out nearby to get questions from district | region | country

Personal History

check out my_history to get questions in the order you answered them, this should be equivalent to /api/questions/?ordering=-votes__created_at&votes__user__username=YOUR_ID

in detail view:

check out friends_answers to get friends answers

GET /api/questions/1651/
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1651,
    "url": "https://api.represent.me/api/questions/1651/",
    "question": "What type of Multiple Choice Question do you want to see on Represent?",
    "slug": "what-type-of-multiple-choice-question-do-you-want-to-see-on-represent",
    "my_vote": [],
    "user": {
        "id": 1,
        "username": "chozabu",
        "first_name": "Alex",
        "last_name": "P-B",
        "url": "https://api.represent.me/api/users/1/",
        "photo": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/profile_pic_1.jpg",
        "age": 32,
        "latest_compare": [],
        "follow": [],
        "locations": [
            "https://api.represent.me/api/user_geos/736115/",
            "https://api.represent.me/api/user_geos/736114/",
            "https://api.represent.me/api/user_geos/736113/",
            "https://api.represent.me/api/user_geos/736112/"
        ],
        "bio": "",
        "created_at": "2016-03-20T04:26:17Z",
        "modified_at": "2019-11-20T07:07:11.069701Z",
        "is_deleted": false,
        "country": 59,
        "country_info": {
            "id": 59,
            "ID": "GBR",
            "name": "United Kingdom",
            "m_type": "country",
            "location": {
                "type": "Point",
                "coordinates": [
                    -2.8869514831036756,
                    54.14704818919766
                ]
            },
            "members_count": 9107,
            "question_count": 923,
            "created_at": "2016-03-20T04:26:45.483907Z",
            "type_description": null,
            "parent": null,
            "parent_url": null,
            "politicians": [],
            "modified_at": "2019-11-18T18:21:03.551797Z"
        },
        "region": 45690,
        "region_info": {
            "id": 45690,
            "ID": "GBR_REGION_ENG",
            "name": "England",
            "m_type": "region",
            "location": {
                "type": "Point",
                "coordinates": [
                    -1.4587100703941027,
                    52.59501517841384
                ]
            },
            "members_count": 7889,
            "question_count": 13,
            "created_at": "2017-03-17T16:31:15.805339Z",
            "type_description": "Constituent Country",
            "parent": 59,
            "parent_url": "https://api.represent.me/api/simple_geos/59/",
            "politicians": [],
            "modified_at": "2019-11-18T18:21:03.530614Z"
        },
        "last_answer_time": "2017-05-03T11:32:50.227573Z",
        "politician": null,
        "politician_info": null,
        "is_email_verified": true,
        "is_admin_verified": true,
        "is_facebook_verified": true,
        "is_google_verified": true,
        "is_twitter_verified": true,
        "is_linkedin_verified": true,
        "is_stripe_verified": false,
        "verification_count": 6,
        "verification_score": 100,
        "count_questions": 14,
        "count_votes": 1098,
        "count_question_votes": 1019,
        "count_friends": 33,
        "count_comment_votes": 37,
        "count_choice_votes": 79,
        "count_group_memberships": 13,
        "count_following_tags": 21,
        "count_comments": 33,
        "count_following_users": 10,
        "count_followers": 29,
        "karma": 66
    },
    "tags": [
        {
            "id": 2993,
            "tag": {
                "id": 28,
                "text": "represent",
                "followers_count": 58,
                "questions_count": 63,
                "votes_count": 7881
            },
            "created_at": "2016-03-20T04:30:02.333018Z",
            "modified_at": "2016-03-29T15:55:28.604541Z",
            "direct_vote_count": 0,
            "direct_value": 0.0,
            "direct_sum": 0.0,
            "direct_heat": 0.0,
            "direct_consensus": 0.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0
        },
        {
            "id": 2994,
            "tag": {
                "id": 65,
                "text": "democracy",
                "followers_count": 625,
                "questions_count": 140,
                "votes_count": 90579
            },
            "created_at": "2016-03-20T04:30:02.338279Z",
            "modified_at": "2016-03-29T15:55:28.613678Z",
            "direct_vote_count": 0,
            "direct_value": 0.0,
            "direct_sum": 0.0,
            "direct_heat": 0.0,
            "direct_consensus": 0.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0
        },
        {
            "id": 2995,
            "tag": {
                "id": 362,
                "text": "development",
                "followers_count": 2,
                "questions_count": 13,
                "votes_count": 8428
            },
            "created_at": "2016-03-20T04:30:02.343772Z",
            "modified_at": "2016-03-29T15:55:28.622128Z",
            "direct_vote_count": 0,
            "direct_value": 0.0,
            "direct_sum": 0.0,
            "direct_heat": 0.0,
            "direct_consensus": 0.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0
        }
    ],
    "choices": [
        {
            "id": 33,
            "url": "https://api.represent.me/api/question_choices/33/",
            "text": "Pick Several of 6",
            "mongo_number": 1,
            "direct_vote_count": 0,
            "direct_value": 0.0,
            "direct_sum": 0.0,
            "direct_heat": 0.0,
            "direct_consensus": 0.5,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0,
            "created_at": "2016-03-20T04:30:02.351034Z",
            "modified_at": "2017-03-06T20:37:19.011799Z",
            "liquid_vote_count": 0,
            "liquid_value": 0.0,
            "liquid_sum": 0.0,
            "liquid_heat": 0.0,
            "liquid_consensus": 0.5,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 0,
            "polarisation": 0.0
        },
        {
            "id": 35,
            "url": "https://api.represent.me/api/question_choices/35/",
            "text": "Pick 1 of Many (Anyone can add more options!)",
            "mongo_number": 3,
            "direct_vote_count": 1,
            "direct_value": 5.0,
            "direct_sum": 2.0,
            "direct_heat": 0.138504155124654,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 1,
            "created_at": "2016-03-20T04:30:02.356887Z",
            "modified_at": "2017-03-06T20:37:19.049832Z",
            "liquid_vote_count": 1,
            "liquid_value": 5.0,
            "liquid_sum": 2.0,
            "liquid_heat": 0.138504155124654,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 1,
            "polarisation": 0.447213595499958
        },
        {
            "id": 34,
            "url": "https://api.represent.me/api/question_choices/34/",
            "text": "Rate Several of 6",
            "mongo_number": 2,
            "direct_vote_count": 0,
            "direct_value": 0.0,
            "direct_sum": 0.0,
            "direct_heat": 0.0,
            "direct_consensus": 0.5,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0,
            "created_at": "2016-03-20T04:30:02.354079Z",
            "modified_at": "2017-03-06T20:37:19.069757Z",
            "liquid_vote_count": 0,
            "liquid_value": 0.0,
            "liquid_sum": 0.0,
            "liquid_heat": 0.0,
            "liquid_consensus": 0.5,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 0,
            "polarisation": 0.0
        },
        {
            "id": 32,
            "url": "https://api.represent.me/api/question_choices/32/",
            "text": "Pick 1 of 6 (maximum)",
            "mongo_number": 0,
            "direct_vote_count": 0,
            "direct_value": 0.0,
            "direct_sum": 0.0,
            "direct_heat": 0.0,
            "direct_consensus": 0.5,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0,
            "created_at": "2016-03-20T04:30:02.348193Z",
            "modified_at": "2017-03-06T20:37:19.108794Z",
            "liquid_vote_count": 0,
            "liquid_value": 0.0,
            "liquid_sum": 0.0,
            "liquid_heat": 0.0,
            "liquid_consensus": 0.5,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 0,
            "polarisation": 0.0
        },
        {
            "id": 36,
            "url": "https://api.represent.me/api/question_choices/36/",
            "text": "Pick Several of Many (Anyone can add more options!)",
            "mongo_number": 4,
            "direct_vote_count": 0,
            "direct_value": 0.0,
            "direct_sum": 0.0,
            "direct_heat": 0.0,
            "direct_consensus": 0.5,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0,
            "created_at": "2016-03-20T04:30:02.359887Z",
            "modified_at": "2017-03-06T20:37:19.030916Z",
            "liquid_vote_count": 0,
            "liquid_value": 0.0,
            "liquid_sum": 0.0,
            "liquid_heat": 0.0,
            "liquid_consensus": 0.5,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 0,
            "polarisation": 0.0
        },
        {
            "id": 37,
            "url": "https://api.represent.me/api/question_choices/37/",
            "text": "Rate Several of Many (Anyone can add more options!) (you can strongly/weakly agree/disagree with any option)",
            "mongo_number": 5,
            "direct_vote_count": 4,
            "direct_value": 5.0,
            "direct_sum": 8.0,
            "direct_heat": 0.554016620498615,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 4,
            "created_at": "2016-03-20T04:30:02.363010Z",
            "modified_at": "2017-03-06T20:37:19.090104Z",
            "liquid_vote_count": 4,
            "liquid_value": 5.0,
            "liquid_sum": 8.0,
            "liquid_heat": 0.554016620498615,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 4,
            "polarisation": 0.447213595499958
        }
    ],
    "description": "Right now, we have \"Pick 1 of 6 (maximum)\" - What do want represent to do?",
    "perodic_repeat_interval": null,
    "ogImage": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/2589-19w8i6y.jpg",
    "subtype": "mcq",
    "topic": 65,
    "topic_info": {
        "id": 65,
        "text": "democracy",
        "followers_count": 625,
        "questions_count": 140,
        "votes_count": 90579
    },
    "group": null,
    "geo": null,
    "geo_info": null,
    "group_url": null,
    "geo_url": null,
    "links": [],
    "start_at": null,
    "end_at": null,
    "publish": false,
    "count_comments": 2,
    "count_comments_suggestion": 1,
    "count_comments_reason": 1,
    "count_comments_info": 0,
    "group_name": null,
    "their_vote": [],
    "my_importance": [],
    "direct_vote_count": 5,
    "direct_value": 0.0,
    "direct_sum": 10.0,
    "direct_heat": 0.21978021978022,
    "direct_consensus": 0.8,
    "direct_skipped": 0,
    "direct_minimum": 0,
    "direct_low": 0,
    "direct_medium": 0,
    "direct_high": 0,
    "direct_maximum": 0,
    "created_at": "2015-12-16T21:37:35.473000Z",
    "modified_at": "2017-03-06T20:37:19.127210Z",
    "liquid_vote_count": 5,
    "liquid_value": 0.0,
    "liquid_sum": 10.0,
    "liquid_heat": 0.21978021978022,
    "liquid_consensus": 0.8,
    "liquid_skipped": 0,
    "liquid_minimum": 0,
    "liquid_low": 0,
    "liquid_medium": 0,
    "liquid_high": 0,
    "liquid_maximum": 0,
    "polarisation": 0.0
}