Skip to content

Commit 6f45356

Browse files
Update latest.yaml to add group repo access (#22369)
Adding API documentation for assign a group (Team) to a repository for access <!--Delete sections as needed --> ## Description <!-- Tell us what you did and why --> ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review --------- Co-authored-by: Sarah Sanders <[email protected]>
1 parent 902dcc0 commit 6f45356

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

content/reference/api/hub/latest.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,42 @@ paths:
892892
$ref: "#/components/responses/Forbidden"
893893
"404":
894894
$ref: "#/components/responses/NotFound"
895+
/v2/repositories/{namespace}/{repository}/groups:
896+
parameters:
897+
- $ref: "#/components/parameters/namespace"
898+
- $ref: "#/components/parameters/repository"
899+
post:
900+
summary: Assign a group (Team) to a repository for access
901+
tags:
902+
- repositories
903+
security:
904+
- bearerAuth: []
905+
parameters:
906+
- in: query
907+
name: group_name
908+
required: true
909+
schema:
910+
type: string
911+
description: Name of the group (team) in the organization.
912+
- in: query
913+
name: permission
914+
required: true
915+
schema:
916+
type: string
917+
description: |
918+
Access level for the group. Possible values:
919+
- `read`
920+
- `write`
921+
- `admin`
922+
responses:
923+
"200":
924+
$ref: "#/components/responses/team_repo"
925+
"403":
926+
$ref: "#/components/responses/forbidden"
927+
"404":
928+
$ref: "#/components/responses/NotFound"
929+
930+
895931
/v2/orgs/{org_name}/members:
896932
parameters:
897933
- $ref: "#/components/parameters/org_name"
@@ -3087,6 +3123,20 @@ components:
30873123
description: Resources this token has access to
30883124
items:
30893125
$ref: "#/components/schemas/orgAccessTokenResource"
3126+
team_repo:
3127+
allOf:
3128+
- $ref: "#/components/responses/team_repo"
3129+
properties:
3130+
group_name:
3131+
type: string
3132+
description: Name of the group
3133+
permission:
3134+
type: string
3135+
description: Repo access permission
3136+
enum:
3137+
- read
3138+
- write
3139+
- admin
30903140
parameters:
30913141
namespace:
30923142
in: path

0 commit comments

Comments
 (0)