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

{
    "id": 1735,
    "url": "https://api.represent.me/api/questions/1735/",
    "question": "The new London Mayor should offer FREE cyber security advice for all businesses and citizens in London",
    "slug": "the-new-london-mayor-should-offer-free-cyber-security-advice-for-all-businesses-and-citizens-in-london",
    "my_vote": [],
    "user": {
        "id": 4813,
        "username": "EclipseExperience",
        "first_name": "Eclipse",
        "last_name": "Experience",
        "url": "https://api.represent.me/api/users/4813/",
        "photo": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/28090-1rh1a1h.png",
        "age": 35,
        "latest_compare": [],
        "follow": [],
        "locations": [
            "https://api.represent.me/api/user_geos/712729/",
            "https://api.represent.me/api/user_geos/712728/",
            "https://api.represent.me/api/user_geos/712727/",
            "https://api.represent.me/api/user_geos/712726/",
            "https://api.represent.me/api/user_geos/712725/",
            "https://api.represent.me/api/user_geos/712724/"
        ],
        "bio": "",
        "created_at": "2016-02-02T22:52:14.967000Z",
        "modified_at": "2019-04-15T15:53:32.348946Z",
        "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": 9085,
            "question_count": 923,
            "created_at": "2016-03-20T04:26:45.483907Z",
            "type_description": null,
            "parent": null,
            "parent_url": null,
            "politicians": [],
            "modified_at": "2019-07-27T09:51:07.091181Z"
        },
        "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": 7867,
            "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-07-27T09:51:07.055081Z"
        },
        "last_answer_time": "2017-02-08T19:07:11.024400Z",
        "politician": null,
        "politician_info": null,
        "is_email_verified": true,
        "is_admin_verified": false,
        "is_facebook_verified": false,
        "is_google_verified": false,
        "is_twitter_verified": false,
        "is_linkedin_verified": false,
        "is_stripe_verified": false,
        "verification_count": 1,
        "verification_score": 59,
        "count_questions": 12,
        "count_votes": 48,
        "count_question_votes": 36,
        "count_friends": 0,
        "count_comment_votes": 0,
        "count_choice_votes": 12,
        "count_group_memberships": 1,
        "count_following_tags": 1,
        "count_comments": 0,
        "count_following_users": 1,
        "count_followers": 0,
        "karma": 0
    },
    "tags": [
        {
            "id": 3194,
            "tag": {
                "id": 541,
                "text": "london mayoral tech",
                "followers_count": 2,
                "questions_count": 13,
                "votes_count": 401
            },
            "created_at": "2016-03-20T04:30:04.388080Z",
            "modified_at": "2016-03-29T15:55:31.696328Z",
            "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": 80,
            "url": "https://api.represent.me/api/question_choices/80/",
            "text": "high priority",
            "mongo_number": 1,
            "direct_vote_count": 8,
            "direct_value": 5.0,
            "direct_sum": 16.0,
            "direct_heat": 0.754716981132076,
            "direct_consensus": 1.0,
            "direct_skipped": 0,
            "direct_minimum": 0,
            "direct_low": 0,
            "direct_medium": 0,
            "direct_high": 0,
            "direct_maximum": 8,
            "created_at": "2016-03-20T04:30:04.395338Z",
            "modified_at": "2017-08-22T10:17:41.730565Z",
            "liquid_vote_count": 8,
            "liquid_value": 5.0,
            "liquid_sum": 16.0,
            "liquid_heat": 0.754716981132076,
            "liquid_consensus": 1.0,
            "liquid_skipped": 0,
            "liquid_minimum": 0,
            "liquid_low": 0,
            "liquid_medium": 0,
            "liquid_high": 0,
            "liquid_maximum": 8,
            "polarisation": 0.447213595499958
        },
        {
            "id": 81,
            "url": "https://api.represent.me/api/question_choices/81/",
            "text": "medium priority",
            "mongo_number": 2,
            "direct_vote_count": 13,
            "direct_value": 5.0,
            "direct_sum": 26.0,
            "direct_heat": 1.22641509433962,
            "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-03-20T04:30:04.398111Z",
            "modified_at": "2017-08-22T10:17:41.748314Z",
            "liquid_vote_count": 13,
            "liquid_value": 5.0,
            "liquid_sum": 26.0,
            "liquid_heat": 1.22641509433962,
            "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": 82,
            "url": "https://api.represent.me/api/question_choices/82/",
            "text": "low priority",
            "mongo_number": 3,
            "direct_vote_count": 6,
            "direct_value": 5.0,
            "direct_sum": 12.0,
            "direct_heat": 0.566037735849057,
            "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-03-20T04:30:04.400940Z",
            "modified_at": "2017-08-22T10:17:41.761991Z",
            "liquid_vote_count": 6,
            "liquid_value": 5.0,
            "liquid_sum": 12.0,
            "liquid_heat": 0.566037735849057,
            "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
        },
        {
            "id": 79,
            "url": "https://api.represent.me/api/question_choices/79/",
            "text": "very high priority",
            "mongo_number": 0,
            "direct_vote_count": 4,
            "direct_value": 5.0,
            "direct_sum": 8.0,
            "direct_heat": 0.377358490566038,
            "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:04.392437Z",
            "modified_at": "2017-08-22T10:17:41.775922Z",
            "liquid_vote_count": 4,
            "liquid_value": 5.0,
            "liquid_sum": 8.0,
            "liquid_heat": 0.377358490566038,
            "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": "",
    "perodic_repeat_interval": null,
    "ogImage": null,
    "subtype": "mcq",
    "topic": 541,
    "topic_info": {
        "id": 541,
        "text": "london mayoral tech",
        "followers_count": 2,
        "questions_count": 13,
        "votes_count": 401
    },
    "group": null,
    "geo": 12088,
    "geo_info": {
        "id": 12088,
        "ID": "LONDON",
        "name": "London",
        "m_type": "city",
        "location": {
            "type": "Point",
            "coordinates": [
                -0.14705218544701582,
                51.489459281219816
            ]
        },
        "members_count": 2172,
        "question_count": 110,
        "created_at": "2016-04-06T12:47:29Z",
        "type_description": null,
        "parent": null,
        "parent_url": null,
        "politicians": [],
        "modified_at": "2019-07-27T09:51:07.039168Z"
    },
    "group_url": null,
    "geo_url": "https://api.represent.me/api/geos/12088/",
    "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": 31,
    "direct_value": 0.0,
    "direct_sum": 62.0,
    "direct_heat": 1.07638888888889,
    "direct_consensus": 0.419354838709677,
    "direct_skipped": 0,
    "direct_minimum": 0,
    "direct_low": 0,
    "direct_medium": 0,
    "direct_high": 0,
    "direct_maximum": 0,
    "created_at": "2016-02-03T09:44:54.027000Z",
    "modified_at": "2017-08-22T10:17:41.791403Z",
    "liquid_vote_count": 31,
    "liquid_value": 0.0,
    "liquid_sum": 62.0,
    "liquid_heat": 1.07638888888889,
    "liquid_consensus": 0.419354838709677,
    "liquid_skipped": 0,
    "liquid_minimum": 0,
    "liquid_low": 0,
    "liquid_medium": 0,
    "liquid_high": 0,
    "liquid_maximum": 0,
    "polarisation": 0.0
}