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
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2423,7 +2423,7 @@
2423
2423
"Scoped Access Tokens"
2424
2424
],
2425
2425
"summary": "Create a scoped access token",
2426
-
"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.",
2426
+
"description": "Creates an opaque bearer token that expires exactly one hour after issuance and is restricted to the requested repositories.",
2427
2427
"security": [
2428
2428
{
2429
2429
"bearerToken": []
@@ -2432,6 +2432,9 @@
2432
2432
"apiKeyHeader": []
2433
2433
}
2434
2434
],
2435
+
"x-mint": {
2436
+
"content": "<Info>\nThe scoped access token APIs require a custom entitlement. To request access, contact [team@sourcebot.dev](mailto:team@sourcebot.dev).\n</Info>"
2437
+
},
2435
2438
"requestBody": {
2436
2439
"required": true,
2437
2440
"content": {
@@ -2503,7 +2506,7 @@
2503
2506
"Scoped Access Tokens"
2504
2507
],
2505
2508
"summary": "Revoke a scoped access token",
2506
-
"description": "Immediately revokes a scoped access token created by the authenticated API-key owner. This endpoint requires a Sourcebot API key.",
2509
+
"description": "Immediately revokes a scoped access token created by the authenticated API-key owner.",
2507
2510
"security": [
2508
2511
{
2509
2512
"bearerToken": []
@@ -2512,6 +2515,9 @@
2512
2515
"apiKeyHeader": []
2513
2516
}
2514
2517
],
2518
+
"x-mint": {
2519
+
"content": "<Info>\nThe scoped access token APIs require a custom entitlement. To request access, contact [team@sourcebot.dev](mailto:team@sourcebot.dev).\n</Info>"
Copy file name to clipboardExpand all lines: docs/docs/api-reference/authentication.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,10 @@ curl -X POST https://your-sourcebot-instance.com/api/search \
35
35
36
36
## Using a scoped access token
37
37
38
+
<Info>
39
+
The scoped access token APIs require a custom entitlement. To request access, contact [team@sourcebot.dev](mailto:team@sourcebot.dev).
40
+
</Info>
41
+
38
42
Scoped access tokens are short-lived bearer credentials intended for clients that should only access a specific set of repositories. Create one with a Sourcebot API key by calling `POST /api/ee/scoped_access_token` with repository names:
Copy file name to clipboardExpand all lines: packages/web/src/openapi/publicApiDocument.ts
+14-4Lines changed: 14 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,12 @@ This API is only available with an active Sourcebot license. [More information](
50
50
</Note>
51
51
`;
52
52
53
+
constSCOPED_ACCESS_TOKEN_ENTITLEMENT_INFO=dedent`
54
+
<Info>
55
+
The scoped access token APIs require a custom entitlement. To request access, contact [team@sourcebot.dev](mailto:team@sourcebot.dev).
56
+
</Info>
57
+
`;
58
+
53
59
constpublicFileTreeNodeSchema: SchemaObject={
54
60
type: 'object',
55
61
properties: {
@@ -456,9 +462,7 @@ export function createPublicOpenApiDocument(version: string) {
456
462
tags: [scopedAccessTokensTag.name],
457
463
summary: 'Create a scoped access token',
458
464
description: dedent`
459
-
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.
460
-
461
-
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.
465
+
Creates an opaque bearer token that expires exactly one hour after issuance and is restricted to the requested repositories.
462
466
`,
463
467
security: [
464
468
{[securitySchemeNames.bearerToken]: []},
@@ -480,6 +484,9 @@ export function createPublicOpenApiDocument(version: string) {
480
484
403: errorJson('The current authentication method is not an API key, or the API-key owner is not permitted to perform this operation.'),
0 commit comments