From 04d7e296ff10606c1a630470f7e427fa38dd76a1 Mon Sep 17 00:00:00 2001 From: Gurleen Sethi Date: Mon, 30 Jun 2025 10:47:29 -0400 Subject: [PATCH] feat: add example for creating OATs with public access --- content/reference/api/hub/latest.yaml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/content/reference/api/hub/latest.yaml b/content/reference/api/hub/latest.yaml index 681870cc93df..b53f5ef45428 100644 --- a/content/reference/api/hub/latest.yaml +++ b/content/reference/api/hub/latest.yaml @@ -685,6 +685,28 @@ paths: summary: Create access token description: | Create an access token for an organization. + + ## Creating an access token with read access to public repositories. + + To refer to public repositories, use the `*/*/public` paths. + + Example payload for creating an access token with read access to public repositories. + ```json + { + "label": "My public token", + "description": "Token for pulling repositories", + "resources": [ + { + "type": "TYPE_REPO", + "path": "*/*/public", + "scopes": [ + "repo-pull" + ] + } + ], + "expires_at": "2023-05-20T00:54:18Z" + } + ``` tags: - org-access-tokens security: @@ -927,7 +949,6 @@ paths: "404": $ref: "#/components/responses/NotFound" - /v2/orgs/{org_name}/members: parameters: - $ref: "#/components/parameters/org_name"