# List members of a group


[API catalog](/reference/api/) · [Docker Hub overview](/reference/api/hub/latest/) · [Product manual](https://docs.docker.com/docker-hub/) · [OpenAPI specification](/reference/api/hub/latest.yaml)

API version: 2-beta



`GET /v2/orgs/{org_name}/groups/{group_name}/members`

List the members (users) that are in a group.
If user is owner of the org or has otherwise elevated permissions, they can search by email and the result will also contain emails.

This operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.


## Connection and access

[API connection and authentication guidance](/reference/api/hub/latest/#authentication)


Server: `https://hub.docker.com`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "bearerAuth": []
  }
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request GET \
  --header "Authorization: Bearer ${TOKEN}" \
  --header 'Accept: application/json' \
  'https://hub.docker.com/v2/orgs/myorganization/groups/developers/members'
```

## Parameters

### org_name

Location: path. Required: yes.

Name of the organization (namespace).

```json
{
  "description": "Name of the organization (namespace).",
  "example": "myorganization",
  "in": "path",
  "name": "org_name",
  "pointer": "/paths/~1v2~1orgs~1{org_name}~1groups~1{group_name}~1members/get/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### group_name

Location: path. Required: yes.

Name of the group (team) in the organization.

```json
{
  "description": "Name of the group (team) in the organization.",
  "in": "path",
  "name": "group_name",
  "pointer": "/paths/~1v2~1orgs~1{org_name}~1groups~1{group_name}~1members/get/parameters/1",
  "required": true,
  "schema": {
    "example": "developers",
    "type": "string"
  }
}
```

### page

Location: query. Required: no.

Page number (starts on 1).

```json
{
  "description": "Page number (starts on 1).",
  "in": "query",
  "name": "page",
  "pointer": "/paths/~1v2~1orgs~1{org_name}~1groups~1{group_name}~1members/get/parameters/2",
  "schema": {
    "type": "integer"
  }
}
```

### page_size

Location: query. Required: no.

Number of items (rows) per page.

```json
{
  "description": "Number of items (rows) per page.",
  "in": "query",
  "name": "page_size",
  "pointer": "/paths/~1v2~1orgs~1{org_name}~1groups~1{group_name}~1members/get/parameters/3",
  "schema": {
    "type": "integer"
  }
}
```

### search

Location: query. Required: no.

Search members by username, full_name or email.

```json
{
  "description": "Search members by username, full_name or email.",
  "in": "query",
  "name": "search",
  "pointer": "/paths/~1v2~1orgs~1{org_name}~1groups~1{group_name}~1members/get/parameters/4",
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 application/json




Schema:

```json
{
  "examples": [
    {
      "count": 1,
      "next": null,
      "previous": null,
      "results": [
        {
          "date_joined": "2021-01-05T21:06:53.506400Z",
          "email": "example@docker.com",
          "full_name": "Jon Snow",
          "id": "0ab70deb065a43fcacd55d48caa945d8",
          "type": "User",
          "username": "dockeruser"
        }
      ]
    }
  ],
  "properties": {
    "count": {
      "example": 1,
      "type": "number"
    },
    "next": {
      "example": null,
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "example": null,
      "type": [
        "string",
        "null"
      ]
    },
    "results": {
      "items": {
        "$ref": "#/components/schemas/group_member"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```




Schema example:
```json
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "date_joined": "2021-01-05T21:06:53.506400Z",
      "email": "example@docker.com",
      "full_name": "Jon Snow",
      "id": "0ab70deb065a43fcacd55d48caa945d8",
      "type": "User",
      "username": "dockeruser"
    }
  ]
}
```


### Response 401 application/json

Unauthorized


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "unauthorized"
}
```


### Response 403 application/json

Forbidden


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "permission denied"
}
```


### Response 404 application/json

Not Found


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "not found"
}
```


## Complete operation contract

```json
{
  "description": "List the members (users) that are in a group.\nIf user is owner of the org or has otherwise elevated permissions, they can search by email and the result will also contain emails.\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
  "operationId": "getV2OrgsByOrgNameGroupsByGroupNameMembers",
  "parameters": [
    {
      "$ref": "#/components/parameters/org_name"
    },
    {
      "$ref": "#/components/parameters/group_name"
    },
    {
      "$ref": "#/components/parameters/page"
    },
    {
      "$ref": "#/components/parameters/page_size"
    },
    {
      "description": "Search members by username, full_name or email.",
      "in": "query",
      "name": "search",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "examples": [
              {
                "count": 1,
                "next": null,
                "previous": null,
                "results": [
                  {
                    "date_joined": "2021-01-05T21:06:53.506400Z",
                    "email": "example@docker.com",
                    "full_name": "Jon Snow",
                    "id": "0ab70deb065a43fcacd55d48caa945d8",
                    "type": "User",
                    "username": "dockeruser"
                  }
                ]
              }
            ],
            "properties": {
              "count": {
                "example": 1,
                "type": "number"
              },
              "next": {
                "example": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "previous": {
                "example": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "results": {
                "items": {
                  "$ref": "#/components/schemas/group_member"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        }
      },
      "description": ""
    },
    "401": {
      "$ref": "#/components/responses/unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/forbidden"
    },
    "404": {
      "$ref": "#/components/responses/not_found"
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "summary": "List members of a group",
  "tags": [
    "groups"
  ]
}
```

## Referenced schemas

- `#/components/parameters/group_name`

- `#/components/parameters/org_name`

- `#/components/parameters/page`

- `#/components/parameters/page_size`

- `#/components/responses/forbidden`

- `#/components/responses/not_found`

- `#/components/responses/unauthorized`

- [#/components/schemas/group_member](/reference/api/hub/latest/schemas/group_member/)




