API endpoint that allows groups to be viewed or edited.

filtering

http://localhost:8000/api/groups/?members__user=1

will get groups user 1 is a member of

extra filter API

http://localhost:8000/api/groups/?useradmin=1

will find groups where user 1 is an admin

http://localhost:8000/api/groups/?i_can_ask=true - gets groups you are a member of where you can ask questions

http://localhost:8000/api/groups/?i_can_ask=false - gets groups you are a member of where you cannot ask questions

meaning of fields

canAskDefault : new members can_ask flag will match this, controlling if they can ask questions to a group

require_approval_to_join : if True, a membership request will be created, instead of the user instantly joining the group `when the user attempts to join.

secret : prevents the group from showing in the groups list

autoPublishQuestions : users questions must be approved by admin before being added to the group

in detail view

check out unanswered to see questions in a group you have not answered

check out questions to see all questions in a group

check out join to join or request to join a group

check out leave to leave a group

check out enable_notifications

check out disable_notifications

If require_approval_to_join is true a request to join will be sent instead of instantly joining

check out members to see members of a group

GET /api/groups/?ordering=-votes_count
HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 80,
    "next": "https://api.represent.me/api/groups/?ordering=-votes_count&page=2",
    "previous": null,
    "next_id": 2,
    "previous_id": null,
    "results": [
        {
            "id": 111,
            "url": "https://api.represent.me/api/groups/111/",
            "name": "Undivided",
            "slug": "undivided",
            "parent": null,
            "desc": "We, the young people of the UK, are the ones who will be most affected by the decision to leave the EU. Don’t let someone else decide your future without knowing what matters to you.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/24e22b36-46cf-4e76-ac72-44f6d54983aa.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2016-11-14T17:57:17.661977Z",
            "modified_at": "2019-11-06T11:56:27.261430Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 5739,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 695,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 291424,
            "official": false
        },
        {
            "id": 15,
            "url": "https://api.represent.me/api/groups/15/",
            "name": "Daily Questions",
            "slug": "daily-questions",
            "parent": null,
            "desc": "Topical questions, every day.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/12471-18awip8.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2015-06-24T16:12:06.319000Z",
            "modified_at": "2019-11-14T08:08:31.894945Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 20328,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 15,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 9141,
            "official": false
        },
        {
            "id": 20,
            "url": "https://api.represent.me/api/groups/20/",
            "name": "The Green Party",
            "slug": "the-green-party",
            "parent": null,
            "desc": "Join in the debate on Green Party Issues",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/14438-193ufp.jpg",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2015-08-23T16:09:29Z",
            "modified_at": "2019-11-13T14:27:38.022845Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 236,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 54,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": false,
            "votes_count": 3616,
            "official": true
        },
        {
            "id": 6,
            "url": "https://api.represent.me/api/groups/6/",
            "name": "Represent",
            "slug": "represent",
            "parent": null,
            "desc": "Help us choose what we should do next, and how we run Represent.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/9806-1mgofwp.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2015-04-25T11:30:13Z",
            "modified_at": "2019-11-06T11:28:29.565961Z",
            "private": false,
            "default_share_email": 2,
            "member_count": 6257,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 26,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": false,
            "votes_count": 2293,
            "official": true
        },
        {
            "id": 96,
            "url": "https://api.represent.me/api/groups/96/",
            "name": "NUS Union Development Zone",
            "slug": "nus-union-development-zone",
            "parent": null,
            "desc": "Exploring political education in students' unions. Questions will change as we work our way through the conference. Email rob.griffiths@nus.org.uk with any questions.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/1341a081-8ead-4d80-99fd-9f4a461c3e4f.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2016-09-05T13:22:08.897674Z",
            "modified_at": "2017-04-24T14:27:32.735797Z",
            "private": true,
            "default_share_email": 2,
            "member_count": 82,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 34,
            "require_approval_to_join": true,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 1399,
            "official": false
        },
        {
            "id": 11,
            "url": "https://api.represent.me/api/groups/11/",
            "name": "21st century democracy",
            "slug": "21st-century-democracy",
            "parent": null,
            "desc": "What does a modern democracy look like? And how do we get there?",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/10430-1qbid9g.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2015-05-27T12:40:16.179000Z",
            "modified_at": "2018-12-03T19:40:57.506064Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 81,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 25,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 701,
            "official": false
        },
        {
            "id": 62,
            "url": "https://api.represent.me/api/groups/62/",
            "name": "The Progressive Alliance",
            "slug": "the-progressive-alliance",
            "parent": null,
            "desc": "Where the people help existing parties find a way to work together in the service of the fundamental principles of international cooperation and creative solidarity.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/ea97e9f1-71c2-474e-9ed6-094156d290f4.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2016-06-29T08:26:02.193571Z",
            "modified_at": "2018-12-03T19:40:35.680941Z",
            "private": false,
            "default_share_email": 2,
            "member_count": 140,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 10,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 503,
            "official": false
        },
        {
            "id": 31,
            "url": "https://api.represent.me/api/groups/31/",
            "name": "United Private Hire Drivers",
            "slug": "united-private-hire-drivers",
            "parent": null,
            "desc": "United Private Hire Drivers - Seeking better conditions for PH drivers! \r\n1. End exploitation/Fair Fares \r\n2. End UberPOOL \r\n3. Cap sector \r\n4. End discrimination",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/24395-muugy5.jpg",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2015-12-11T09:09:44.182000Z",
            "modified_at": "2017-08-22T10:19:44.924376Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 0,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 7,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 465,
            "official": false
        },
        {
            "id": 9,
            "url": "https://api.represent.me/api/groups/9/",
            "name": "Bristol",
            "slug": "bristol",
            "parent": null,
            "desc": "Pathways to participation in local decision making.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/23156-1ht1qg9.jpg",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2015-05-19T18:07:56.396000Z",
            "modified_at": "2019-10-29T20:41:40.000440Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 30,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 28,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 297,
            "official": false
        },
        {
            "id": 44,
            "url": "https://api.represent.me/api/groups/44/",
            "name": "Woodcraft Folk",
            "slug": "woodcraft-folk",
            "parent": null,
            "desc": "Trial period: if enough people engage with/ share this, \r\nWoodcraft Folk may consider integrating Represent.me into its national democratic framework, to better represent its members young and old, across the nation.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/blob_GKQgmnx",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2016-04-13T13:38:52.851746Z",
            "modified_at": "2017-04-23T11:01:43.209290Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 5,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 11,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 102,
            "official": false
        }
    ]
}