Add a member to a group
POST
/v2/orgs/{org_name}/groups/{group_name}/members Add a member to a group.
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"
}Request and responses
Request
application/json
Type:
object
member
· required
Type:
string
All schema constraints and annotations
{
"example": "jonsnow",
"type": "string"
}All schema constraints and annotations
{
"examples": [
{
"member": "jonsnow"
}
],
"properties": {
"member": {
"example": "jonsnow",
"type": "string"
}
},
"required": [
"member"
],
"type": "object"
}Schema example
{
"member": "jonsnow"
}Response
200
OK
No response content is declared.
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"
}Response
500
Internal
application/json
Schema:
error
error
{
"errinfo": null,
"message": "internal error"
}Referenced schemas
Complete operation contract
{
"description": "Add a member to a group.\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
"operationId": "postV2OrgsByOrgNameGroupsByGroupNameMembers",
"parameters": [
{
"$ref": "#/components/parameters/org_name"
},
{
"$ref": "#/components/parameters/group_name"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/add_member_to_org_group"
},
"responses": {
"200": {
"description": "OK"
},
"401": {
"$ref": "#/components/responses/unauthorized"
},
"403": {
"$ref": "#/components/responses/forbidden"
},
"404": {
"$ref": "#/components/responses/not_found"
},
"500": {
"$ref": "#/components/responses/internal_error"
}
},
"security": [
{
"bearerAuth": []
}
],
"summary": "Add a member to a group",
"tags": [
"groups"
]
}