Skip to content

Commit a6571bf

Browse files
authored
Partner API docs for snapshots and forks (#444)
1 parent f26df0b commit a6571bf

1 file changed

Lines changed: 225 additions & 0 deletions

File tree

static/api/extensions/v1/api.yaml

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ tags:
7272
- name: buckets
7373
description: Bucket management
7474
x-displayName: Buckets
75+
- name: snapshots
76+
description: Bucket snapshots
77+
x-displayName: Snapshots
7578
- name: billing
7679
description: Usage and billing
7780
x-displayName: Usage and Billing
@@ -441,6 +444,116 @@ paths:
441444
schema:
442445
$ref: "#/components/schemas/GenericError"
443446

447+
/v1/providers/{provider_id}/orgs/{org_id}/buckets/{bucket_name}/snapshots:
448+
post:
449+
tags:
450+
- snapshots
451+
summary: Take a snapshot of the bucket
452+
description: |
453+
Takes a snapshot of the bucket's current state. The bucket must have
454+
snapshots enabled. See https://www.tigrisdata.com/docs/snapshots/.
455+
operationId: Tigris_CreateSnapshot
456+
parameters:
457+
- $ref: "#/components/parameters/provider_id"
458+
- $ref: "#/components/parameters/org_id"
459+
- $ref: "#/components/parameters/bucket_name"
460+
requestBody:
461+
content:
462+
application/json:
463+
schema:
464+
$ref: "#/components/schemas/CreateSnapshotRequest"
465+
required: false
466+
responses:
467+
"200":
468+
description: OK
469+
content:
470+
application/json:
471+
schema:
472+
$ref: "#/components/schemas/CreateSnapshotResponse"
473+
default:
474+
description: Unexpected error
475+
content:
476+
application/json:
477+
schema:
478+
$ref: "#/components/schemas/GenericError"
479+
get:
480+
tags:
481+
- snapshots
482+
summary: List snapshots for a bucket
483+
description: |
484+
Lists snapshots for the bucket, ordered by creation time. See
485+
https://www.tigrisdata.com/docs/snapshots/.
486+
operationId: Tigris_ListSnapshots
487+
parameters:
488+
- $ref: "#/components/parameters/provider_id"
489+
- $ref: "#/components/parameters/org_id"
490+
- $ref: "#/components/parameters/bucket_name"
491+
responses:
492+
"200":
493+
description: OK
494+
content:
495+
application/json:
496+
schema:
497+
$ref: "#/components/schemas/ListSnapshotsResponse"
498+
default:
499+
description: Unexpected error
500+
content:
501+
application/json:
502+
schema:
503+
$ref: "#/components/schemas/GenericError"
504+
505+
/v1/providers/{provider_id}/orgs/{org_id}/buckets/{bucket_name}/snapshots/{version}:
506+
get:
507+
tags:
508+
- snapshots
509+
summary: Get snapshot details
510+
description: |
511+
Returns snapshot metadata. See https://www.tigrisdata.com/docs/snapshots/.
512+
operationId: Tigris_GetSnapshot
513+
parameters:
514+
- $ref: "#/components/parameters/provider_id"
515+
- $ref: "#/components/parameters/org_id"
516+
- $ref: "#/components/parameters/bucket_name"
517+
- $ref: "#/components/parameters/version"
518+
responses:
519+
"200":
520+
description: OK
521+
content:
522+
application/json:
523+
schema:
524+
$ref: "#/components/schemas/GetSnapshotResponse"
525+
default:
526+
description: Unexpected error
527+
content:
528+
application/json:
529+
schema:
530+
$ref: "#/components/schemas/GenericError"
531+
delete:
532+
tags:
533+
- snapshots
534+
summary: Delete a snapshot
535+
description: |
536+
Deletes the snapshot. See https://www.tigrisdata.com/docs/snapshots/.
537+
operationId: Tigris_DeleteSnapshot
538+
parameters:
539+
- $ref: "#/components/parameters/provider_id"
540+
- $ref: "#/components/parameters/org_id"
541+
- $ref: "#/components/parameters/bucket_name"
542+
- $ref: "#/components/parameters/version"
543+
responses:
544+
"200":
545+
description: OK
546+
content:
547+
application/json:
548+
schema:
549+
$ref: "#/components/schemas/DeleteSnapshotResponse"
550+
default:
551+
description: Unexpected error
552+
content:
553+
application/json:
554+
schema:
555+
$ref: "#/components/schemas/GenericError"
556+
444557
/v1/providers/{provider_id}/orgs/{org_id}/key/get:
445558
post:
446559
tags:
@@ -1051,6 +1164,20 @@ components:
10511164
$ref: "#/components/schemas/BucketOptions"
10521165
user_role:
10531166
$ref: "#/components/schemas/OrgMembership"
1167+
fork_of:
1168+
type: string
1169+
description: |
1170+
Create this bucket as a fork of the named source bucket. The source
1171+
must belong to the same organization, and the acting user must
1172+
either have `user_role=Admin` or own the source bucket. See
1173+
https://www.tigrisdata.com/docs/forks/.
1174+
source_snapshot:
1175+
type: string
1176+
description: |
1177+
Fork from a specific snapshot of the source bucket. Accepts a snapshot
1178+
version string or any UNIX nanosecond-precision timestamp (e.g.
1179+
`1765889000501544464`). Requires `fork_of`. See
1180+
https://www.tigrisdata.com/docs/forks/.
10541181
OrgMembership:
10551182
type: string
10561183
description: |
@@ -1097,6 +1224,11 @@ components:
10971224
type: boolean
10981225
description:
10991226
If set to true, per object ACL will be enabled. Default is false.
1227+
enable_snapshots:
1228+
type: boolean
1229+
description: |
1230+
Enable snapshots on the bucket. Create-time only. See
1231+
https://www.tigrisdata.com/docs/snapshots/.
11001232
object_notifications:
11011233
$ref: "#/components/schemas/ObjectNotifications"
11021234
lifecycle_rules:
@@ -1549,6 +1681,69 @@ components:
15491681
- starting_after
15501682
- price
15511683
- subtotal
1684+
SnapshotInfo:
1685+
type: object
1686+
description: |
1687+
A point-in-time snapshot of a bucket. See
1688+
https://www.tigrisdata.com/docs/snapshots/.
1689+
properties:
1690+
version:
1691+
type: string
1692+
description: Snapshot version (UNIX nanosecond-precision timestamp).
1693+
created_at:
1694+
type: string
1695+
format: date-time
1696+
bucket:
1697+
type: string
1698+
description: Name of the bucket this snapshot belongs to.
1699+
description:
1700+
type: string
1701+
description: Optional name or description.
1702+
CreateSnapshotRequest:
1703+
type: object
1704+
additionalProperties: false
1705+
properties:
1706+
description:
1707+
type: string
1708+
description: Optional name or description for the snapshot.
1709+
CreateSnapshotResponse:
1710+
type: object
1711+
properties:
1712+
snapshot:
1713+
$ref: "#/components/schemas/SnapshotInfo"
1714+
ListSnapshotsResponse:
1715+
type: object
1716+
properties:
1717+
snapshots:
1718+
type: array
1719+
items:
1720+
$ref: "#/components/schemas/SnapshotInfo"
1721+
GetSnapshotResponse:
1722+
type: object
1723+
properties:
1724+
snapshot:
1725+
$ref: "#/components/schemas/SnapshotInfo"
1726+
DeleteSnapshotResponse:
1727+
type: object
1728+
ForkInfo:
1729+
type: object
1730+
description: |
1731+
Fork metadata for a bucket that was created as a fork, or that has forks
1732+
depending on it. See https://www.tigrisdata.com/docs/forks/.
1733+
properties:
1734+
parent_bucket:
1735+
type: string
1736+
description:
1737+
Name of the immediate source bucket this bucket was forked from.
1738+
snapshot:
1739+
type: string
1740+
description:
1741+
Snapshot version this bucket was forked from (UNIX
1742+
nanosecond-precision timestamp).
1743+
has_children:
1744+
type: boolean
1745+
description:
1746+
True if one or more buckets have been forked from this bucket.
15521747
BucketInfo:
15531748
type: object
15541749
properties:
@@ -1582,6 +1777,11 @@ components:
15821777
type: boolean
15831778
description:
15841779
If true, anonymous users can list objects in this public bucket
1780+
snapshots_enabled:
1781+
type: boolean
1782+
description: True if the bucket was created with snapshots enabled.
1783+
fork_info:
1784+
$ref: "#/components/schemas/ForkInfo"
15851785
website:
15861786
$ref: "#/components/schemas/BucketWebsiteSettings"
15871787
object_notifications:
@@ -1659,6 +1859,24 @@ components:
16591859
type: array
16601860
items:
16611861
$ref: "#/components/schemas/BucketAccess"
1862+
attach_policies:
1863+
type: array
1864+
items:
1865+
type: string
1866+
description: |
1867+
Names of existing IAM policies to attach to this access key.
1868+
All policies must already exist — if any policy name is invalid, the
1869+
request fails and no key is created.
1870+
create_policies:
1871+
type: array
1872+
items:
1873+
$ref: "#/components/schemas/CreatePolicyRequest"
1874+
description: |
1875+
New IAM policies to create and attach to this access key.
1876+
Each policy is created first, then attached atomically. If a policy
1877+
with the same name already exists the request fails — use
1878+
attach_policies to reuse an existing policy. If policy document
1879+
validation fails, no key is created.
16621880
CreateAccessKeyResponse:
16631881
type: object
16641882
required:
@@ -2124,6 +2342,13 @@ components:
21242342
description: Name of the IAM policy
21252343
schema:
21262344
type: string
2345+
version:
2346+
name: version
2347+
in: path
2348+
required: true
2349+
description: Snapshot version (UNIX nanosecond-precision timestamp).
2350+
schema:
2351+
type: string
21272352
securitySchemes:
21282353
Nonce:
21292354
type: apiKey

0 commit comments

Comments
 (0)