Create a new group
POST
/v2/orgs/{org_name}/groups Create a new group within an organization.
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).
型:
string
All schema constraints and annotations
{
"type": "string"
}Request and responses
Request
application/json
description
型:
string
All schema constraints and annotations
{
"type": "string"
}name
· required
型:
string
All schema constraints and annotations
{
"type": "string"
}All schema constraints and annotations
{
"examples": [
{
"description": "Development team",
"name": "developers"
}
],
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name"
]
}Schema example
{
"description": "Development team",
"name": "developers"
}Response
201
Group created successfully
application/json
スキーマ:
org_group
Schema example
{
"description": "Development team",
"id": 10,
"member_count": 1,
"name": "developers",
"role": "member",
"uuid": "e36eca69-4cc8-4f17-9845-ae8c2b832691"
}Response
400
Bad Request
application/json
スキーマ:
error
error
{
"errinfo": null,
"message": "bad request"
}Response
401
Unauthorized
application/json
スキーマ:
error
error
{
"errinfo": null,
"message": "unauthorized"
}Response
403
Forbidden
application/json
スキーマ:
error
error
{
"errinfo": null,
"message": "permission denied"
}Referenced schemas
#/components/schemas/org_group
Complete operation contract
{
"description": "Create a new group within an organization.\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
"operationId": "postV2OrgsByOrgNameGroups",
"requestBody": {
"content": {
"application/json": {
"schema": {
"examples": [
{
"description": "Development team",
"name": "developers"
}
],
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
}
}
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/org_group"
}
}
},
"description": "Group created successfully"
},
"400": {
"$ref": "#/components/responses/bad_request"
},
"401": {
"$ref": "#/components/responses/unauthorized"
},
"403": {
"$ref": "#/components/responses/forbidden"
}
},
"security": [
{
"bearerAuth": []
}
],
"summary": "Create a new group",
"tags": [
"groups"
]
}