Share feedback
Answers are generated based on the documentation.

List members of a group

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

https://hub.docker.com — Docker HUB API

Use one of these alternatives. Requirements within an alternative apply together.

  • bearerAuth

Parameters

org_name path Required

Name of the organization (namespace).

Type: string

All schema constraints and annotations
{
  "type": "string"
}

group_name path Required

Name of the group (team) in the organization.

Type: string

All schema constraints and annotations
{
  "example": "developers",
  "type": "string"
}

page query

Page number (starts on 1).

Type: integer

All schema constraints and annotations
{
  "type": "integer"
}

page_size query

Number of items (rows) per page.

Type: integer

All schema constraints and annotations
{
  "type": "integer"
}

search query

Search members by username, full_name or email.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

Request and responses

Response 200

application/json

Type: object

count

Type: number

All schema constraints and annotations
{
  "example": 1,
  "type": "number"
}
next

Type: string | null

All schema constraints and annotations
{
  "example": null,
  "type": [
    "string",
    "null"
  ]
}
previous

Type: string | null

All schema constraints and annotations
{
  "example": null,
  "type": [
    "string",
    "null"
  ]
}
results

Type: array

Array item

Schema: group_member

All schema constraints and annotations
{
  "items": {
    "$ref": "#/components/schemas/group_member"
  },
  "type": "array"
}
All schema constraints and annotations
{
  "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

{
  "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

Unauthorized

application/json

Schema: error

error

{
  "errinfo": null,
  "message": "unauthorized"
}

Response 403

Forbidden

application/json

Schema: error

error

{
  "errinfo": null,
  "message": "permission denied"
}

Response 404

Not Found

application/json

Schema: error

error

{
  "errinfo": null,
  "message": "not found"
}

Referenced schemas

#/components/schemas/group_member

Complete operation contract
{
  "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"
  ]
}