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/?in_collections__parent=148
HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 2,
    "next": null,
    "previous": null,
    "next_id": null,
    "previous_id": null,
    "results": [
        {
            "id": 2453,
            "url": "https://api.represent.me/api/questions/2453/",
            "question": "Would you have voted for Bernie if he had run as a third party candidate?",
            "slug": "would-you-have-voted-for-bernie-if-he-had-run-as-a-third-party-candidate",
            "my_vote": [],
            "user": {
                "id": 7470,
                "username": "joepbreslin",
                "first_name": "Joe",
                "last_name": "Breslin",
                "url": "https://api.represent.me/api/users/7470/",
                "photo": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/prof_initials_9eae8d92d8b8424ebcbf274546bf5686.png",
                "age": 32,
                "latest_compare": [],
                "follow": [],
                "locations": [
                    "https://api.represent.me/api/user_geos/706538/",
                    "https://api.represent.me/api/user_geos/706537/",
                    "https://api.represent.me/api/user_geos/706536/",
                    "https://api.represent.me/api/user_geos/706535/"
                ],
                "bio": "",
                "created_at": "2016-11-10T20:33:36.989604Z",
                "modified_at": "2019-04-15T15:51:46.732295Z",
                "is_deleted": false,
                "country": 170,
                "country_info": {
                    "id": 170,
                    "ID": "USA",
                    "name": "United States of America",
                    "m_type": "country",
                    "location": {
                        "type": "Point",
                        "coordinates": [
                            -112.49572628642001,
                            45.68811349999799
                        ]
                    },
                    "members_count": 274,
                    "question_count": 43,
                    "created_at": "2016-03-20T04:26:45.750462Z",
                    "type_description": null,
                    "parent": null,
                    "parent_url": null,
                    "politicians": [],
                    "modified_at": "2019-09-27T17:11:04.944605Z"
                },
                "region": 21497,
                "region_info": {
                    "id": 21497,
                    "ID": "S53",
                    "name": "Washington",
                    "m_type": "region",
                    "location": {
                        "type": "Point",
                        "coordinates": [
                            -120.59271726612089,
                            47.41160002936914
                        ]
                    },
                    "members_count": 15,
                    "question_count": 0,
                    "created_at": "2017-02-08T12:17:20.877530Z",
                    "type_description": "State",
                    "parent": 170,
                    "parent_url": "https://api.represent.me/api/simple_geos/170/",
                    "politicians": [],
                    "modified_at": "2019-02-21T05:55:43.727838Z"
                },
                "last_answer_time": "2016-11-19T22:29:20.786232Z",
                "politician": null,
                "politician_info": null,
                "is_email_verified": true,
                "is_admin_verified": false,
                "is_facebook_verified": false,
                "is_google_verified": true,
                "is_twitter_verified": false,
                "is_linkedin_verified": false,
                "is_stripe_verified": false,
                "verification_count": 2,
                "verification_score": 77,
                "count_questions": 2,
                "count_votes": 29,
                "count_question_votes": 24,
                "count_friends": 0,
                "count_comment_votes": 0,
                "count_choice_votes": 5,
                "count_group_memberships": 2,
                "count_following_tags": 9,
                "count_comments": 0,
                "count_following_users": 2,
                "count_followers": 2,
                "karma": 0
            },
            "tags": [
                {
                    "id": 5130,
                    "tag": {
                        "id": 2,
                        "text": "politics",
                        "followers_count": 696,
                        "questions_count": 478,
                        "votes_count": 145995
                    },
                    "created_at": "2016-11-10T21:00:48.164225Z",
                    "modified_at": "2016-11-10T21:00:48.164582Z",
                    "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
                }
            ],
            "choices": [
                {
                    "id": 913,
                    "url": "https://api.represent.me/api/question_choices/913/",
                    "text": "Yes",
                    "mongo_number": 0,
                    "direct_vote_count": 14,
                    "direct_value": 5.0,
                    "direct_sum": 28.0,
                    "direct_heat": 1.33587786259542,
                    "direct_consensus": 1.0,
                    "direct_skipped": 0,
                    "direct_minimum": 0,
                    "direct_low": 0,
                    "direct_medium": 0,
                    "direct_high": 0,
                    "direct_maximum": 14,
                    "created_at": "2016-11-10T21:00:48.160252Z",
                    "modified_at": "2018-04-09T07:20:03.106012Z",
                    "liquid_vote_count": 14,
                    "liquid_value": 5.0,
                    "liquid_sum": 28.0,
                    "liquid_heat": 1.33587786259542,
                    "liquid_consensus": 1.0,
                    "liquid_skipped": 0,
                    "liquid_minimum": 0,
                    "liquid_low": 0,
                    "liquid_medium": 0,
                    "liquid_high": 0,
                    "liquid_maximum": 14,
                    "polarisation": 0.447213595499958
                },
                {
                    "id": 914,
                    "url": "https://api.represent.me/api/question_choices/914/",
                    "text": "No",
                    "mongo_number": 1,
                    "direct_vote_count": 6,
                    "direct_value": 5.0,
                    "direct_sum": 12.0,
                    "direct_heat": 0.572519083969466,
                    "direct_consensus": 1.0,
                    "direct_skipped": 0,
                    "direct_minimum": 0,
                    "direct_low": 0,
                    "direct_medium": 0,
                    "direct_high": 0,
                    "direct_maximum": 6,
                    "created_at": "2016-11-10T21:00:48.162537Z",
                    "modified_at": "2018-04-09T07:20:03.119120Z",
                    "liquid_vote_count": 6,
                    "liquid_value": 5.0,
                    "liquid_sum": 12.0,
                    "liquid_heat": 0.572519083969466,
                    "liquid_consensus": 1.0,
                    "liquid_skipped": 0,
                    "liquid_minimum": 0,
                    "liquid_low": 0,
                    "liquid_medium": 0,
                    "liquid_high": 0,
                    "liquid_maximum": 6,
                    "polarisation": 0.447213595499958
                }
            ],
            "description": "",
            "perodic_repeat_interval": null,
            "ogImage": null,
            "subtype": "mcq",
            "topic": null,
            "topic_info": null,
            "group": null,
            "geo": 170,
            "geo_info": {
                "id": 170,
                "ID": "USA",
                "name": "United States of America",
                "m_type": "country",
                "location": {
                    "type": "Point",
                    "coordinates": [
                        -112.49572628642001,
                        45.68811349999799
                    ]
                },
                "members_count": 274,
                "question_count": 43,
                "created_at": "2016-03-20T04:26:45.750462Z",
                "type_description": null,
                "parent": null,
                "parent_url": null,
                "politicians": [],
                "modified_at": "2019-09-27T17:11:04.944605Z"
            },
            "group_url": null,
            "geo_url": "https://api.represent.me/api/geos/170/",
            "links": [],
            "start_at": null,
            "end_at": null,
            "publish": true,
            "count_comments": 0,
            "count_comments_suggestion": 0,
            "count_comments_reason": 0,
            "count_comments_info": 0,
            "group_name": null,
            "their_vote": [],
            "my_importance": [],
            "direct_vote_count": 20,
            "direct_value": 0.0,
            "direct_sum": 40.0,
            "direct_heat": 0.763358778625954,
            "direct_consensus": 0.7,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0,
            "created_at": "2016-11-10T21:00:48.089213Z",
            "modified_at": "2018-04-09T07:20:03.132410Z",
            "liquid_vote_count": 20,
            "liquid_value": 0.0,
            "liquid_sum": 40.0,
            "liquid_heat": 0.763358778625954,
            "liquid_consensus": 0.7,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 0,
            "polarisation": 0.0
        },
        {
            "id": 2452,
            "url": "https://api.represent.me/api/questions/2452/",
            "question": "If you were a Bernie supporter in the 2016 primary, for whom did you vote in the general election?",
            "slug": "if-you-were-a-bernie-supporter-in-the-2016-primary-for-whom-did-you-vote-in-the-general-election",
            "my_vote": [],
            "user": {
                "id": 7470,
                "username": "joepbreslin",
                "first_name": "Joe",
                "last_name": "Breslin",
                "url": "https://api.represent.me/api/users/7470/",
                "photo": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/prof_initials_9eae8d92d8b8424ebcbf274546bf5686.png",
                "age": 32,
                "latest_compare": [],
                "follow": [],
                "locations": [
                    "https://api.represent.me/api/user_geos/706538/",
                    "https://api.represent.me/api/user_geos/706537/",
                    "https://api.represent.me/api/user_geos/706536/",
                    "https://api.represent.me/api/user_geos/706535/"
                ],
                "bio": "",
                "created_at": "2016-11-10T20:33:36.989604Z",
                "modified_at": "2019-04-15T15:51:46.732295Z",
                "is_deleted": false,
                "country": 170,
                "country_info": {
                    "id": 170,
                    "ID": "USA",
                    "name": "United States of America",
                    "m_type": "country",
                    "location": {
                        "type": "Point",
                        "coordinates": [
                            -112.49572628642001,
                            45.68811349999799
                        ]
                    },
                    "members_count": 274,
                    "question_count": 43,
                    "created_at": "2016-03-20T04:26:45.750462Z",
                    "type_description": null,
                    "parent": null,
                    "parent_url": null,
                    "politicians": [],
                    "modified_at": "2019-09-27T17:11:04.944605Z"
                },
                "region": 21497,
                "region_info": {
                    "id": 21497,
                    "ID": "S53",
                    "name": "Washington",
                    "m_type": "region",
                    "location": {
                        "type": "Point",
                        "coordinates": [
                            -120.59271726612089,
                            47.41160002936914
                        ]
                    },
                    "members_count": 15,
                    "question_count": 0,
                    "created_at": "2017-02-08T12:17:20.877530Z",
                    "type_description": "State",
                    "parent": 170,
                    "parent_url": "https://api.represent.me/api/simple_geos/170/",
                    "politicians": [],
                    "modified_at": "2019-02-21T05:55:43.727838Z"
                },
                "last_answer_time": "2016-11-19T22:29:20.786232Z",
                "politician": null,
                "politician_info": null,
                "is_email_verified": true,
                "is_admin_verified": false,
                "is_facebook_verified": false,
                "is_google_verified": true,
                "is_twitter_verified": false,
                "is_linkedin_verified": false,
                "is_stripe_verified": false,
                "verification_count": 2,
                "verification_score": 77,
                "count_questions": 2,
                "count_votes": 29,
                "count_question_votes": 24,
                "count_friends": 0,
                "count_comment_votes": 0,
                "count_choice_votes": 5,
                "count_group_memberships": 2,
                "count_following_tags": 9,
                "count_comments": 0,
                "count_following_users": 2,
                "count_followers": 2,
                "karma": 0
            },
            "tags": [
                {
                    "id": 5129,
                    "tag": {
                        "id": 2,
                        "text": "politics",
                        "followers_count": 696,
                        "questions_count": 478,
                        "votes_count": 145995
                    },
                    "created_at": "2016-11-10T20:58:57.321517Z",
                    "modified_at": "2016-11-10T20:58:57.321858Z",
                    "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
                },
                {
                    "id": 5920,
                    "tag": {
                        "id": 769,
                        "text": "important",
                        "followers_count": 0,
                        "questions_count": 1682,
                        "votes_count": 721266
                    },
                    "created_at": "2016-12-06T21:22:22.375358Z",
                    "modified_at": "2017-05-03T23:55:57.962599Z",
                    "direct_vote_count": 2,
                    "direct_value": 3.0,
                    "direct_sum": 0.0,
                    "direct_heat": 0.379746835443038,
                    "direct_consensus": 0.0,
                    "direct_skipped": 0,
                    "direct_minimum": 1,
                    "direct_low": 0,
                    "direct_medium": 0,
                    "direct_high": 0,
                    "direct_maximum": 1
                }
            ],
            "choices": [
                {
                    "id": 907,
                    "url": "https://api.represent.me/api/question_choices/907/",
                    "text": "Hillary",
                    "mongo_number": 1,
                    "direct_vote_count": 13,
                    "direct_value": 5.0,
                    "direct_sum": 26.0,
                    "direct_heat": 0.659229208924949,
                    "direct_consensus": 1.0,
                    "direct_skipped": 0,
                    "direct_minimum": 0,
                    "direct_low": 0,
                    "direct_medium": 0,
                    "direct_high": 0,
                    "direct_maximum": 13,
                    "created_at": "2016-11-10T20:58:57.310259Z",
                    "modified_at": "2019-07-14T21:37:18.390364Z",
                    "liquid_vote_count": 13,
                    "liquid_value": 5.0,
                    "liquid_sum": 26.0,
                    "liquid_heat": 0.659229208924949,
                    "liquid_consensus": 1.0,
                    "liquid_skipped": 0,
                    "liquid_minimum": 0,
                    "liquid_low": 0,
                    "liquid_medium": 0,
                    "liquid_high": 0,
                    "liquid_maximum": 13,
                    "polarisation": 0.447213595499958
                },
                {
                    "id": 912,
                    "url": "https://api.represent.me/api/question_choices/912/",
                    "text": "Other",
                    "mongo_number": 6,
                    "direct_vote_count": 2,
                    "direct_value": 5.0,
                    "direct_sum": 4.0,
                    "direct_heat": 0.101419878296146,
                    "direct_consensus": 1.0,
                    "direct_skipped": 0,
                    "direct_minimum": 0,
                    "direct_low": 0,
                    "direct_medium": 0,
                    "direct_high": 0,
                    "direct_maximum": 2,
                    "created_at": "2016-11-10T20:58:57.318392Z",
                    "modified_at": "2019-07-14T21:37:18.407771Z",
                    "liquid_vote_count": 2,
                    "liquid_value": 5.0,
                    "liquid_sum": 4.0,
                    "liquid_heat": 0.101419878296146,
                    "liquid_consensus": 1.0,
                    "liquid_skipped": 0,
                    "liquid_minimum": 0,
                    "liquid_low": 0,
                    "liquid_medium": 0,
                    "liquid_high": 0,
                    "liquid_maximum": 2,
                    "polarisation": 0.447213595499958
                },
                {
                    "id": 911,
                    "url": "https://api.represent.me/api/question_choices/911/",
                    "text": "Gary Johnson",
                    "mongo_number": 5,
                    "direct_vote_count": 1,
                    "direct_value": 5.0,
                    "direct_sum": 2.0,
                    "direct_heat": 0.050709939148073,
                    "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-11-10T20:58:57.316782Z",
                    "modified_at": "2019-07-14T21:37:18.425239Z",
                    "liquid_vote_count": 1,
                    "liquid_value": 5.0,
                    "liquid_sum": 2.0,
                    "liquid_heat": 0.050709939148073,
                    "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": 910,
                    "url": "https://api.represent.me/api/question_choices/910/",
                    "text": "Jill Stein",
                    "mongo_number": 4,
                    "direct_vote_count": 5,
                    "direct_value": 5.0,
                    "direct_sum": 10.0,
                    "direct_heat": 0.253549695740365,
                    "direct_consensus": 1.0,
                    "direct_skipped": 0,
                    "direct_minimum": 0,
                    "direct_low": 0,
                    "direct_medium": 0,
                    "direct_high": 0,
                    "direct_maximum": 5,
                    "created_at": "2016-11-10T20:58:57.315162Z",
                    "modified_at": "2019-07-14T21:37:18.442573Z",
                    "liquid_vote_count": 5,
                    "liquid_value": 5.0,
                    "liquid_sum": 10.0,
                    "liquid_heat": 0.253549695740365,
                    "liquid_consensus": 1.0,
                    "liquid_skipped": 0,
                    "liquid_minimum": 0,
                    "liquid_low": 0,
                    "liquid_medium": 0,
                    "liquid_high": 0,
                    "liquid_maximum": 5,
                    "polarisation": 0.447213595499958
                },
                {
                    "id": 909,
                    "url": "https://api.represent.me/api/question_choices/909/",
                    "text": "Wrote in Bernie",
                    "mongo_number": 3,
                    "direct_vote_count": 2,
                    "direct_value": 5.0,
                    "direct_sum": 4.0,
                    "direct_heat": 0.101419878296146,
                    "direct_consensus": 1.0,
                    "direct_skipped": 0,
                    "direct_minimum": 0,
                    "direct_low": 0,
                    "direct_medium": 0,
                    "direct_high": 0,
                    "direct_maximum": 2,
                    "created_at": "2016-11-10T20:58:57.313541Z",
                    "modified_at": "2019-07-14T21:37:18.459906Z",
                    "liquid_vote_count": 2,
                    "liquid_value": 5.0,
                    "liquid_sum": 4.0,
                    "liquid_heat": 0.101419878296146,
                    "liquid_consensus": 1.0,
                    "liquid_skipped": 0,
                    "liquid_minimum": 0,
                    "liquid_low": 0,
                    "liquid_medium": 0,
                    "liquid_high": 0,
                    "liquid_maximum": 2,
                    "polarisation": 0.447213595499958
                },
                {
                    "id": 908,
                    "url": "https://api.represent.me/api/question_choices/908/",
                    "text": "Trump",
                    "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-11-10T20:58:57.311922Z",
                    "modified_at": "2019-07-14T21:37:18.477172Z",
                    "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": 906,
                    "url": "https://api.represent.me/api/question_choices/906/",
                    "text": "Didn't vote",
                    "mongo_number": 0,
                    "direct_vote_count": 2,
                    "direct_value": 5.0,
                    "direct_sum": 4.0,
                    "direct_heat": 0.101419878296146,
                    "direct_consensus": 1.0,
                    "direct_skipped": 0,
                    "direct_minimum": 0,
                    "direct_low": 0,
                    "direct_medium": 0,
                    "direct_high": 0,
                    "direct_maximum": 2,
                    "created_at": "2016-11-10T20:58:57.307944Z",
                    "modified_at": "2019-07-14T21:37:18.495222Z",
                    "liquid_vote_count": 2,
                    "liquid_value": 5.0,
                    "liquid_sum": 4.0,
                    "liquid_heat": 0.101419878296146,
                    "liquid_consensus": 1.0,
                    "liquid_skipped": 0,
                    "liquid_minimum": 0,
                    "liquid_low": 0,
                    "liquid_medium": 0,
                    "liquid_high": 0,
                    "liquid_maximum": 2,
                    "polarisation": 0.447213595499958
                }
            ],
            "description": "For science! And to better prepare for 2018 and beyond",
            "perodic_repeat_interval": null,
            "ogImage": null,
            "subtype": "mcq",
            "topic": null,
            "topic_info": null,
            "group": null,
            "geo": 170,
            "geo_info": {
                "id": 170,
                "ID": "USA",
                "name": "United States of America",
                "m_type": "country",
                "location": {
                    "type": "Point",
                    "coordinates": [
                        -112.49572628642001,
                        45.68811349999799
                    ]
                },
                "members_count": 274,
                "question_count": 43,
                "created_at": "2016-03-20T04:26:45.750462Z",
                "type_description": null,
                "parent": null,
                "parent_url": null,
                "politicians": [],
                "modified_at": "2019-09-27T17:11:04.944605Z"
            },
            "group_url": null,
            "geo_url": "https://api.represent.me/api/geos/170/",
            "links": [
                {
                    "id": 370,
                    "url": "https://api.represent.me/api/question_links/370/",
                    "link": "http://progcode.co",
                    "desc": "",
                    "thumbnailUrl": null,
                    "title": "http://progcode.co"
                }
            ],
            "start_at": null,
            "end_at": null,
            "publish": true,
            "count_comments": 1,
            "count_comments_suggestion": 0,
            "count_comments_reason": 1,
            "count_comments_info": 0,
            "group_name": null,
            "their_vote": [],
            "my_importance": [],
            "direct_vote_count": 25,
            "direct_value": 0.0,
            "direct_sum": 50.0,
            "direct_heat": 0.50709939148073,
            "direct_consensus": 0.52,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 0,
            "created_at": "2016-11-10T20:58:57.238104Z",
            "modified_at": "2019-07-14T21:37:18.513997Z",
            "liquid_vote_count": 25,
            "liquid_value": 0.0,
            "liquid_sum": 50.0,
            "liquid_heat": 0.50709939148073,
            "liquid_consensus": 0.52,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 0,
            "polarisation": 0.0
        }
    ]
}