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/3636/
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 3636,
    "url": "https://api.represent.me/api/questions/3636/",
    "question": "The UK's national living wage should...",
    "slug": "the-uks-national-living-wage-should",
    "my_vote": [],
    "user": {
        "id": 17763,
        "username": "questionsbyrepresent",
        "first_name": "Questions",
        "last_name": "by Represent",
        "url": "https://api.represent.me/api/users/17763/",
        "photo": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/cc7bdcfd-ae42-4c69-b02d-0fb26129820c.png",
        "age": 45,
        "latest_compare": [],
        "follow": [],
        "locations": [
            "https://api.represent.me/api/user_geos/744961/",
            "https://api.represent.me/api/user_geos/744960/",
            "https://api.represent.me/api/user_geos/744959/",
            "https://api.represent.me/api/user_geos/744958/",
            "https://api.represent.me/api/user_geos/744957/",
            "https://api.represent.me/api/user_geos/744956/"
        ],
        "bio": "",
        "created_at": "2017-05-22T13:58:29Z",
        "modified_at": "2019-04-15T15:54:57.227687Z",
        "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": 9105,
            "question_count": 923,
            "created_at": "2016-03-20T04:26:45.483907Z",
            "type_description": null,
            "parent": null,
            "parent_url": null,
            "politicians": [],
            "modified_at": "2019-11-14T22:22:17.512629Z"
        },
        "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": 7887,
            "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-14T22:22:17.491362Z"
        },
        "last_answer_time": "2017-06-05T16:30:02.921000Z",
        "politician": null,
        "politician_info": null,
        "is_email_verified": true,
        "is_admin_verified": true,
        "is_facebook_verified": false,
        "is_google_verified": false,
        "is_twitter_verified": false,
        "is_linkedin_verified": false,
        "is_stripe_verified": false,
        "verification_count": 0,
        "verification_score": 100,
        "count_questions": 8,
        "count_votes": 4,
        "count_question_votes": 1,
        "count_friends": 0,
        "count_comment_votes": 0,
        "count_choice_votes": 3,
        "count_group_memberships": 1,
        "count_following_tags": 1,
        "count_comments": 0,
        "count_following_users": 2,
        "count_followers": 0,
        "karma": 0
    },
    "tags": [
        {
            "id": 8949,
            "tag": {
                "id": 45,
                "text": "money",
                "followers_count": 23,
                "questions_count": 22,
                "votes_count": 18536
            },
            "created_at": "2017-05-22T14:12:39.688589Z",
            "modified_at": "2017-05-22T14:12:39.688961Z",
            "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": 8948,
            "tag": {
                "id": 83,
                "text": "employment",
                "followers_count": 48,
                "questions_count": 51,
                "votes_count": 40154
            },
            "created_at": "2017-05-22T14:12:39.670098Z",
            "modified_at": "2017-05-22T14:12:39.670462Z",
            "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": 8947,
            "tag": {
                "id": 803,
                "text": "ge2017",
                "followers_count": 1,
                "questions_count": 136,
                "votes_count": 175339
            },
            "created_at": "2017-05-22T14:12:39.651404Z",
            "modified_at": "2017-05-22T14:12:39.651750Z",
            "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": 8946,
            "tag": {
                "id": 37,
                "text": "economy",
                "followers_count": 519,
                "questions_count": 138,
                "votes_count": 102390
            },
            "created_at": "2017-05-22T14:12:39.631697Z",
            "modified_at": "2017-05-22T14:12:39.632041Z",
            "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": 1293,
            "url": "https://api.represent.me/api/question_choices/1293/",
            "text": "be independently reviewed to set a genuine living wage across all sectors",
            "mongo_number": 4,
            "direct_vote_count": 1160,
            "direct_value": 5.0,
            "direct_sum": 2320.0,
            "direct_heat": 120.331950207469,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 1160,
            "created_at": "2017-05-22T14:12:39.603770Z",
            "modified_at": "2018-09-07T09:56:28.186689Z",
            "liquid_vote_count": 1160,
            "liquid_value": 5.0,
            "liquid_sum": 2320.0,
            "liquid_heat": 120.331950207469,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 1160,
            "polarisation": 0.447213595499958
        },
        {
            "id": 1294,
            "url": "https://api.represent.me/api/question_choices/1294/",
            "text": "be increased to 60 per cent of median earnings by 2020",
            "mongo_number": 5,
            "direct_vote_count": 153,
            "direct_value": 5.0,
            "direct_sum": 306.0,
            "direct_heat": 15.8713692946058,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 153,
            "created_at": "2017-05-22T14:12:39.610659Z",
            "modified_at": "2018-09-07T09:56:28.200764Z",
            "liquid_vote_count": 153,
            "liquid_value": 5.0,
            "liquid_sum": 306.0,
            "liquid_heat": 15.8713692946058,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 153,
            "polarisation": 0.447213595499958
        },
        {
            "id": 1295,
            "url": "https://api.represent.me/api/question_choices/1295/",
            "text": "should be the same for all age groups",
            "mongo_number": 6,
            "direct_vote_count": 347,
            "direct_value": 5.0,
            "direct_sum": 694.0,
            "direct_heat": 35.9958506224066,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 347,
            "created_at": "2017-05-22T14:12:39.617814Z",
            "modified_at": "2018-09-07T09:56:28.215403Z",
            "liquid_vote_count": 347,
            "liquid_value": 5.0,
            "liquid_sum": 694.0,
            "liquid_heat": 35.9958506224066,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 347,
            "polarisation": 0.447213595499958
        },
        {
            "id": 1292,
            "url": "https://api.represent.me/api/question_choices/1292/",
            "text": "increase to £10 per hour by 2020",
            "mongo_number": 3,
            "direct_vote_count": 497,
            "direct_value": 5.0,
            "direct_sum": 994.0,
            "direct_heat": 51.5560165975104,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 497,
            "created_at": "2017-05-22T14:12:39.596987Z",
            "modified_at": "2018-09-07T09:56:28.231518Z",
            "liquid_vote_count": 497,
            "liquid_value": 5.0,
            "liquid_sum": 994.0,
            "liquid_heat": 51.5560165975104,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 497,
            "polarisation": 0.447213595499958
        },
        {
            "id": 1290,
            "url": "https://api.represent.me/api/question_choices/1290/",
            "text": "stay the same",
            "mongo_number": 1,
            "direct_vote_count": 135,
            "direct_value": 5.0,
            "direct_sum": 270.0,
            "direct_heat": 14.0041493775934,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 135,
            "created_at": "2017-05-22T14:12:39.582012Z",
            "modified_at": "2018-09-07T09:56:28.245812Z",
            "liquid_vote_count": 135,
            "liquid_value": 5.0,
            "liquid_sum": 270.0,
            "liquid_heat": 14.0041493775934,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 135,
            "polarisation": 0.447213595499958
        },
        {
            "id": 1291,
            "url": "https://api.represent.me/api/question_choices/1291/",
            "text": "be lowered",
            "mongo_number": 2,
            "direct_vote_count": 4,
            "direct_value": 5.0,
            "direct_sum": 8.0,
            "direct_heat": 0.4149377593361,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 4,
            "created_at": "2017-05-22T14:12:39.589016Z",
            "modified_at": "2018-09-07T09:56:28.259217Z",
            "liquid_vote_count": 4,
            "liquid_value": 5.0,
            "liquid_sum": 8.0,
            "liquid_heat": 0.4149377593361,
            "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
        },
        {
            "id": 1289,
            "url": "https://api.represent.me/api/question_choices/1289/",
            "text": "be adandoned",
            "mongo_number": 0,
            "direct_vote_count": 47,
            "direct_value": 5.0,
            "direct_sum": 94.0,
            "direct_heat": 4.87551867219917,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 47,
            "created_at": "2017-05-22T14:12:39.570198Z",
            "modified_at": "2018-09-07T09:56:28.272920Z",
            "liquid_vote_count": 47,
            "liquid_value": 5.0,
            "liquid_sum": 94.0,
            "liquid_heat": 4.87551867219917,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 47,
            "polarisation": 0.447213595499958
        },
        {
            "id": 1326,
            "url": "https://api.represent.me/api/question_choices/1326/",
            "text": "be enforced",
            "mongo_number": null,
            "direct_vote_count": 143,
            "direct_value": 5.0,
            "direct_sum": 286.0,
            "direct_heat": 14.9581589958159,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 143,
            "created_at": "2017-05-26T11:28:03.428855Z",
            "modified_at": "2018-09-07T09:56:28.286926Z",
            "liquid_vote_count": 143,
            "liquid_value": 5.0,
            "liquid_sum": 286.0,
            "liquid_heat": 14.9581589958159,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 143,
            "polarisation": 0.447213595499958
        }
    ],
    "description": "The National Living Wage is £7.50 per hour if you are 25 or older. For 18-20 year olds it is £7.05 and for those under 18 it is £4.05. For apprentices the minimum wage is £3.50 per hour.",
    "perodic_repeat_interval": null,
    "ogImage": null,
    "subtype": "mcq",
    "topic": null,
    "topic_info": null,
    "group": null,
    "geo": 59,
    "geo_info": {
        "id": 59,
        "ID": "GBR",
        "name": "United Kingdom",
        "m_type": "country",
        "location": {
            "type": "Point",
            "coordinates": [
                -2.8869514831036756,
                54.14704818919766
            ]
        },
        "members_count": 9105,
        "question_count": 923,
        "created_at": "2016-03-20T04:26:45.483907Z",
        "type_description": null,
        "parent": null,
        "parent_url": null,
        "politicians": [],
        "modified_at": "2019-11-14T22:22:17.512629Z"
    },
    "group_url": null,
    "geo_url": "https://api.represent.me/api/geos/59/",
    "links": [
        {
            "id": 471,
            "url": "https://api.represent.me/api/question_links/471/",
            "link": "https://www.gov.uk/national-minimum-wage-rates",
            "desc": "",
            "thumbnailUrl": null,
            "title": "https://www.gov.uk/national-minimum-wage-rates"
        }
    ],
    "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": 2486,
    "direct_value": 0.0,
    "direct_sum": 4972.0,
    "direct_heat": 103.153526970954,
    "direct_consensus": 0.466613032984714,
    "direct_skipped": 0,
    "direct_minimum": 0,
    "direct_low": 0,
    "direct_medium": 0,
    "direct_high": 0,
    "direct_maximum": 0,
    "created_at": "2017-05-22T14:12:39.525362Z",
    "modified_at": "2018-09-07T09:56:28.300776Z",
    "liquid_vote_count": 2486,
    "liquid_value": 0.0,
    "liquid_sum": 4972.0,
    "liquid_heat": 103.153526970954,
    "liquid_consensus": 0.466613032984714,
    "liquid_skipped": 0,
    "liquid_minimum": 0,
    "liquid_low": 0,
    "liquid_medium": 0,
    "liquid_high": 0,
    "liquid_maximum": 0,
    "polarisation": 0.0
}