그룹 멤버 목록 조회
그룹 멤버 목록 조회
그룹에 속한 멤버(사용자) 목록을 반환해요. 사용자가 조직의 소유자이거나 높은 권한을 가졌다면 이메일로 검색할 수 있고 결과에 이메일도 포함돼요. 이 작업은 조직 액세스 토큰(OAT)에서 발급한 bearer 토큰을 받아요.
출처: 문서
본문
GET /v2/orgs/{org_name}/groups/{group_name}/members
그룹 멤버 목록 조회 작업이에요. 그룹에 속한 멤버(사용자) 목록을 반환해요. 사용자가 조직의 소유자이거나 높은 권한을 가졌다면 이메일로 검색할 수 있고 결과에 이메일도 포함돼요. 이 작업은 조직 액세스 토큰(OAT)에서 발급한 bearer 토큰을 받아요.
요청 예시
실행 전에 자리 표시자를 바꾸고 필요 자격 증명이나 요청 바디를 채워야 해요.
curl \
--request GET \
--header "Authorization: Bearer ${TOKEN}" \
--header 'Accept: application/json' \
'https://hub.docker.com/v2/orgs/myorganization/groups/developers/members'
요청과 응답
응답 200 Schema:
{
"examples": [
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"date_joined": "2021-01-05T21:06:53.506400Z",
"email": "[email protected]",
"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": "[email protected]",
"full_name": "Jon Snow",
"id": "0ab70deb065a43fcacd55d48caa945d8",
"type": "User",
"username": "dockeruser"
}
]
}
응답 401 Unauthorized
Schema:
{
"$ref": "#/components/schemas/error"
}
error:
{
"errinfo": null,
"message": "unauthorized"
}
응답 403 Forbidden
Schema:
{
"$ref": "#/components/schemas/error"
}
error:
{
"errinfo": null,
"message": "permission denied"
}
응답 404 Not Found
Schema:
{
"$ref": "#/components/schemas/error"
}
error:
{
"errinfo": null,
"message": "not found"
}
전체 작업 계약
{
"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": "[email protected]",
"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"
]
}