You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-reference/sourcebot-public.openapi.json
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1114,11 +1114,12 @@
1114
1114
"type": "string",
1115
1115
"format": "date-time"
1116
1116
},
1117
-
"repos": {
1117
+
"repoIds": {
1118
1118
"type": "array",
1119
1119
"items": {
1120
-
"type": "string",
1121
-
"minLength": 1
1120
+
"type": "integer",
1121
+
"minimum": 0,
1122
+
"exclusiveMinimum": true
1122
1123
},
1123
1124
"minItems": 1
1124
1125
}
@@ -1128,24 +1129,25 @@
1128
1129
"token",
1129
1130
"createdAt",
1130
1131
"expiresAt",
1131
-
"repos"
1132
+
"repoIds"
1132
1133
]
1133
1134
},
1134
1135
"PublicCreateScopedAccessTokenRequest": {
1135
1136
"type": "object",
1136
1137
"properties": {
1137
-
"repos": {
1138
+
"repoIds": {
1138
1139
"type": "array",
1139
1140
"items": {
1140
-
"type": "string",
1141
-
"minLength": 1
1141
+
"type": "integer",
1142
+
"minimum": 0,
1143
+
"exclusiveMinimum": true
1142
1144
},
1143
1145
"minItems": 1,
1144
-
"description": "Repository names to bind to the token. Every name must identify exactly one repository accessible to the API-key owner."
1146
+
"description": "Repository IDs to bind to the token. Every ID must identify a repository accessible to the API-key owner."
1145
1147
}
1146
1148
},
1147
1149
"required": [
1148
-
"repos"
1150
+
"repoIds"
1149
1151
],
1150
1152
"additionalProperties": false
1151
1153
},
@@ -2332,7 +2334,7 @@
2332
2334
"Scoped Access Tokens"
2333
2335
],
2334
2336
"summary": "Create a scoped access token",
2335
-
"description": "Creates an opaque bearer token that expires exactly one hour after issuance and is restricted to the requested repositories. Repository names are resolved atomically against the API-key owner's current access; the request fails if any name is missing, inaccessible, or ambiguous.\n\nThis endpoint requires a Sourcebot API key. Scoped access tokens, OAuth tokens, and browser sessions cannot mint another scoped access token. The returned token is independent of the API key after issuance and cannot be refreshed.",
2337
+
"description": "Creates an opaque bearer token that expires exactly one hour after issuance and is restricted to the requested repositories. Repository IDs are validated atomically against the API-key owner's current access; the request fails if any ID is missing or inaccessible. Repository IDs are returned by GET /api/repos.\n\nThis endpoint requires a Sourcebot API key. Scoped access tokens, OAuth tokens, and browser sessions cannot mint another scoped access token. The returned token is independent of the API key after issuance and cannot be refreshed.",
Copy file name to clipboardExpand all lines: packages/web/src/openapi/publicApiDocument.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -437,7 +437,7 @@ export function createPublicOpenApiDocument(version: string) {
437
437
tags: [scopedAccessTokensTag.name],
438
438
summary: 'Create a scoped access token',
439
439
description: dedent`
440
-
Creates an opaque bearer token that expires exactly one hour after issuance and is restricted to the requested repositories. Repository names are resolved atomically against the API-key owner's current access; the request fails if any name is missing, inaccessible, or ambiguous.
440
+
Creates an opaque bearer token that expires exactly one hour after issuance and is restricted to the requested repositories. Repository IDs are validated atomically against the API-key owner's current access; the request fails if any ID is missing or inaccessible. Repository IDs are returned by GET /api/repos.
441
441
442
442
This endpoint requires a Sourcebot API key. Scoped access tokens, OAuth tokens, and browser sessions cannot mint another scoped access token. The returned token is independent of the API key after issuance and cannot be refreshed.
0 commit comments