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

{
    "count": 80,
    "next": "https://api.represent.me/api/groups/?ordering=-created_at&page=2",
    "previous": null,
    "next_id": 2,
    "previous_id": null,
    "results": [
        {
            "id": 134,
            "url": "https://api.represent.me/api/groups/134/",
            "name": "Make Votes Matter",
            "slug": "make-votes-matter",
            "parent": null,
            "desc": "The cross-party campaign to introduce Proportional Representation to the House of Commons.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/Make_Votes_Matter_logo_thumb.jpg",
            "logo_image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/static1.squarespace.jpg",
            "welcome_message": "The 2015 General Election was the most disproportionate ever. What will happen this time? We can be certain that seats in Parliament won’t match parties’ vote shares because we use the antiquated First Past the Post electoral system, unlike the vast majority of developed nations - they use Proportional Representation (PR).\r\n\r\nThere are many myths about PR - none hold up under scrutiny. No wonder that polls consistently show that the majority of the public want PR; the latest poll says 67% want to make seats match votes. They are joined by a growing Alliance of parties, MPs and public figures who want real democracy. What does your MP think?",
            "created_at": "2017-06-01T13:18:49Z",
            "modified_at": "2018-04-09T07:38:40.356138Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 4,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 0,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": false,
            "votes_count": 0,
            "official": true
        },
        {
            "id": 132,
            "url": "https://api.represent.me/api/groups/132/",
            "name": "I'm standing as a #GE2017 candidate",
            "slug": "im-standing-as-a-ge2017-candidate",
            "parent": null,
            "desc": "",
            "image": null,
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-04-24T16:53:19Z",
            "modified_at": "2017-06-06T15:53:17.493244Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 7,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 0,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": true
        },
        {
            "id": 131,
            "url": "https://api.represent.me/api/groups/131/",
            "name": "Election Daze",
            "slug": "election-daze",
            "parent": null,
            "desc": "For people interested in the series of unconferences happening around the UK in the run up to the General Eelection",
            "image": null,
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-04-21T11:57:09Z",
            "modified_at": "2017-06-06T11:28:54.257122Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 3,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 0,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": false
        },
        {
            "id": 129,
            "url": "https://api.represent.me/api/groups/129/",
            "name": "Essex County Progressives Caucus",
            "slug": "essex-county-progressives-caucus",
            "parent": null,
            "desc": "To Organize and Enact the Passions of Essex County Progressives",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/e079ad37-1772-4f3d-bd80-e51a7e97ddb5.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-02-22T11:31:55.550691Z",
            "modified_at": "2017-02-22T12:12:02.228591Z",
            "private": true,
            "default_share_email": 2,
            "member_count": 1,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 3,
            "require_approval_to_join": true,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 3,
            "official": false
        },
        {
            "id": 128,
            "url": "https://api.represent.me/api/groups/128/",
            "name": "Indivisible Party- Essex County, NY",
            "slug": "indivisible-party-essex-county-ny",
            "parent": null,
            "desc": "",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/92bf909d-6ce5-47cc-a1ba-fdad14489a58.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-02-10T07:41:45.764503Z",
            "modified_at": "2017-02-10T08:28:46.060179Z",
            "private": true,
            "default_share_email": 2,
            "member_count": 1,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 0,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": false
        },
        {
            "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": 125,
            "url": "https://api.represent.me/api/groups/125/",
            "name": "Work from home",
            "slug": "work-from-home",
            "parent": null,
            "desc": "",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/7a46e80f-f6d2-4200-ab2f-28cb0d568dad.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-01-27T17:28:47.922294Z",
            "modified_at": "2017-02-13T12:19:30.771447Z",
            "private": false,
            "default_share_email": 2,
            "member_count": 1,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 1,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": false
        },
        {
            "id": 124,
            "url": "https://api.represent.me/api/groups/124/",
            "name": "ENA",
            "slug": "ena",
            "parent": null,
            "desc": "ENA is non-profit association and Transition Initiative for the region of North Evia. It is our local \"forum for the future.\" Our purpose is to create and share a common vision and strategy towards the long term regenerative development of both people and place in North Evia. We do this by promoting community actions, sparking enterprise, sharing resources and building capacity by investing in the local social and solidarity economy.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/9d3066a6-317a-4489-99a1-3e97a3981387.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-01-24T08:39:54.865470Z",
            "modified_at": "2017-01-24T08:39:54.937742Z",
            "private": false,
            "default_share_email": 0,
            "member_count": 1,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 0,
            "require_approval_to_join": true,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": false
        },
        {
            "id": 123,
            "url": "https://api.represent.me/api/groups/123/",
            "name": "Grosvenor & Regency Estate",
            "slug": "grosvenor-regency-estate",
            "parent": null,
            "desc": "A place for the resident's of the Grosvenor and Regency Estate in Pimlico, London to explore issues that are important to them.",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/9fb8d024-7199-4a69-9ac6-e9936f451a8b.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-01-22T15:40:24.124349Z",
            "modified_at": "2017-02-02T11:26:10.188848Z",
            "private": false,
            "default_share_email": 2,
            "member_count": 1,
            "my_membership": null,
            "autoPublishQuestions": true,
            "requested_join": false,
            "questions_count": 2,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 1,
            "official": false
        },
        {
            "id": 121,
            "url": "https://api.represent.me/api/groups/121/",
            "name": "European Movement",
            "slug": "european-movement",
            "parent": null,
            "desc": "Fighting for Britain's role in Europe",
            "image": "https://s3.eu-central-1.amazonaws.com:443/static.represent.me/images/92d7af8e-2098-4eda-9e19-86388d3f8554.png",
            "logo_image": null,
            "welcome_message": "",
            "created_at": "2017-01-13T13:46:56.780136Z",
            "modified_at": "2017-06-06T11:30:14.466504Z",
            "private": false,
            "default_share_email": 2,
            "member_count": 3,
            "my_membership": null,
            "autoPublishQuestions": false,
            "requested_join": false,
            "questions_count": 0,
            "require_approval_to_join": false,
            "secret": false,
            "canAskDefault": true,
            "votes_count": 0,
            "official": false
        }
    ]
}