Skip to content

Commit 04d7e29

Browse files
feat: add example for creating OATs with public access
1 parent d45b654 commit 04d7e29

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

content/reference/api/hub/latest.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,28 @@ paths:
685685
summary: Create access token
686686
description: |
687687
Create an access token for an organization.
688+
689+
## Creating an access token with read access to public repositories.
690+
691+
To refer to public repositories, use the `*/*/public` paths.
692+
693+
Example payload for creating an access token with read access to public repositories.
694+
```json
695+
{
696+
"label": "My public token",
697+
"description": "Token for pulling repositories",
698+
"resources": [
699+
{
700+
"type": "TYPE_REPO",
701+
"path": "*/*/public",
702+
"scopes": [
703+
"repo-pull"
704+
]
705+
}
706+
],
707+
"expires_at": "2023-05-20T00:54:18Z"
708+
}
709+
```
688710
tags:
689711
- org-access-tokens
690712
security:
@@ -927,7 +949,6 @@ paths:
927949
"404":
928950
$ref: "#/components/responses/NotFound"
929951

930-
931952
/v2/orgs/{org_name}/members:
932953
parameters:
933954
- $ref: "#/components/parameters/org_name"

0 commit comments

Comments
 (0)