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=-questions_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=-questions_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-09-14T12:16:46.837288Z",
            "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": 291422,
            "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-01-21T10:39:17.607193Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 235,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 54,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": false,
            "votes_count": 3614,
            "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": 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": "2018-02-24T22:26:19.630210Z",
            "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": 296,
            "official": false
        },
        {
            "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-09-09T16:00:17.841936Z",
            "private": false,
            "default_share_email": 2,
            "member_count": 6256,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 26,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": false,
            "votes_count": 2292,
            "official": true
        },
        {
            "id": 127,
            "url": "https://api.represent.me/api/groups/127/",
            "name": "Diem25",
            "slug": "diem25",
            "parent": null,
            "desc": "",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/02731f0c-d6b1-451f-924f-9efcb96de667.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-01-28T10:29:52.236569Z",
            "modified_at": "2017-05-08T21:21:40.755563Z",
            "private": true,
            "default_share_email": 0,
            "member_count": 8,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 25,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "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": 77,
            "url": "https://api.represent.me/api/groups/77/",
            "name": "US Republican supporters",
            "slug": "us-republican-supporters",
            "parent": null,
            "desc": "A group for Republican supporters to discuss policy and ideas.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/96a95f15-bf43-43d1-8b05-89c3562990e9.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2016-07-31T12:07:47.750660Z",
            "modified_at": "2017-02-01T15:43:04.392107Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 6,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 19,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": false
        },
        {
            "id": 76,
            "url": "https://api.represent.me/api/groups/76/",
            "name": "Labour Party Supporters",
            "slug": "labour-party-supporters",
            "parent": null,
            "desc": "A group for Labour supporters to discuss policy and ideas.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/730ef50f-0b59-4e3f-8b0b-f071137a6ea4.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2016-07-31T12:05:26.164109Z",
            "modified_at": "2017-08-02T10:24:41.247079Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 44,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 18,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": false
        },
        {
            "id": 78,
            "url": "https://api.represent.me/api/groups/78/",
            "name": "US Democrat supporters",
            "slug": "us-democrat-supporters",
            "parent": null,
            "desc": "A group for Labour supporters to discuss policy and ideas.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/cd53b444-92d4-45d0-a1ec-42d29eb4b357.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2016-07-31T12:08:14.103931Z",
            "modified_at": "2017-02-21T07:48:36.753092Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 5,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 17,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": false
        }
    ]
}