Skip to content

Commit 2aff17c

Browse files
committed
Update partner API schema with org quota and bucket regions details
1 parent 0a229cd commit 2aff17c

File tree

1 file changed

+69
-51
lines changed

1 file changed

+69
-51
lines changed

static/api/extensions/v1/api.yaml

Lines changed: 69 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ info:
99
1010
## Authentication
1111
12-
To authenticate with Tigris Object Store, you need to sign your requests with the signing key following simple steps:
12+
To authenticate with Tigris Object Store, you need to sign your requests with the signing key by following these steps:
1313
1414
:::note
1515
Reach out to [[email protected]](mailto:[email protected]) to request a:
@@ -18,13 +18,13 @@ info:
1818
:::
1919
2020
### 1. Generate current timestamp
21-
Set the `X-Tigris-Time` header to the current timestamp in milliseconds since epoch. Ex - `1731703213870`
21+
Set the `X-Tigris-Time` header to the current timestamp in milliseconds since epoch. Example: `1731703213870`
2222
```
2323
X-Tigris-Time: 1731703213870
2424
```
2525
2626
### 2. Generate a unique nonce
27-
Set the `X-Tigris-Nonce` header to a unique random string to identify the request and prevent replay attacks. Ex - `f8d133cb-5a42-47b1-9ef2-874bb55bab72`
27+
Set the `X-Tigris-Nonce` header to a unique random string to identify the request and prevent replay attacks. Example: `f8d133cb-5a42-47b1-9ef2-874bb55bab72`
2828
```
2929
X-Tigris-Nonce: f8d133cb-5a42-47b1-9ef2-874bb55bab72
3030
```
@@ -39,7 +39,7 @@ info:
3939
```
4040
4141
:::tip
42-
The `CanonicalURI` is the path of the request URL including the host and query parameters.
42+
The `CanonicalURI` is the full request URL including the scheme, host, path, and query parameters.
4343
4444
For example, for a `POST` request to `/provider/laravel/orgs/my-org/provision`, the `CanonicalURI` would be:
4545
```
@@ -54,7 +54,7 @@ info:
5454
5555
5656
### 4. Generate request signature
57-
Calculate the HMAC-SHA256 of the canonical request using the shared secret as the signing key. Ex -
57+
Calculate the HMAC-SHA256 of the canonical request using the shared secret as the signing key. Example:
5858
```
5959
Signature = hex(sha256sign(canonical_request, "signing_key"))
6060
```
@@ -88,7 +88,7 @@ paths:
8888
- buckets
8989
summary: Provision a new bucket
9090
description: |
91-
Provision a new bucket in the organization account, also creates the organization account if it doesn't exist. This is an
91+
Provisions a new bucket in the organization account and also creates the organization account if it doesn't exist. This is an
9292
idempotent operation, and calling it multiple times with the same parameters will not create duplicate buckets.
9393
9494
Provisioning API responds with an access key and secret to access the newly provisioned bucket.
@@ -229,7 +229,7 @@ paths:
229229
post:
230230
tags:
231231
- buckets
232-
summary: Attach a custom domain to bucket
232+
summary: Attach a custom domain to a bucket
233233
description: |
234234
Sets a custom domain for a bucket. If the domain is already set, it will be replaced.
235235
@@ -274,7 +274,7 @@ paths:
274274
- buckets
275275
summary: Remove custom domain from bucket
276276
description: |
277-
Removes the custom domain from a bucket. After removal, the bucket will only be accessible via its default Tigris URL.
277+
Removes the custom domain from a bucket. After removal, the bucket will only be accessible via its default Tigris URL.
278278
The CNAME DNS record can be safely deleted after the custom domain is removed.
279279
operationId: Tigris_DeleteCustomDomain
280280
parameters:
@@ -324,7 +324,7 @@ paths:
324324
post:
325325
tags:
326326
- iam
327-
summary: Rotates Access Key secret
327+
summary: Rotate Access Key secret
328328
description: |
329329
Rotates the access key secret for a user. The old secret will be invalidated, and the new secret will be returned in the response.
330330
operationId: Tigris_RotateAccessKey
@@ -616,6 +616,8 @@ components:
616616
type: string
617617
description:
618618
Name of the organization where the bucket should be provisioned
619+
org_quota:
620+
$ref: "#/components/schemas/OrgQuota"
619621
user_id:
620622
type: string
621623
description: ID of the user who is requesting the bucket
@@ -627,6 +629,15 @@ components:
627629
type: string
628630
description: Role assigned to the user in the organization
629631
enum: [Admin, Member]
632+
OrgQuota:
633+
type: object
634+
required:
635+
- limit_bytes
636+
properties:
637+
limit_bytes:
638+
type: integer
639+
format: int64
640+
description: The number of bytes that the organization is allowed to store across all of its buckets. Zero means no limit.
630641
BucketOptions:
631642
type: object
632643
properties:
@@ -637,6 +648,8 @@ components:
637648
false.
638649
storage_class:
639650
$ref: "#/components/schemas/StorageClass"
651+
regions:
652+
$ref: "#/components/schemas/Regions"
640653
enable_object_acl:
641654
type: boolean
642655
description:
@@ -647,55 +660,50 @@ components:
647660
type: object
648661
description: |
649662
Configuration for object event notifications via webhook. Receive HTTP callbacks when objects are created, updated, or deleted in your bucket.
650-
651-
**Update behavior:**
652-
- `enabled` is required in all requests
653-
- Other fields (webhook, filter, region, auth) are optional and only update when included
654-
- Omitted optional fields preserve their existing values
655-
- Auth credentials are masked in responses and don't need to be re-sent
656-
663+
664+
**Update behavior (partial updates supported):**
665+
- **Omit field entirely**: Keeps existing settings unchanged
666+
- **Include only `enabled`**: Toggles notifications on/off while preserving all other config
667+
- **Include any field**: Updates specified fields, preserves others (auth not re-required)
668+
- **Remove completely**: Send `{"enabled": false}` with no other fields
669+
657670
**Common operations:**
658671
```json
659-
// Enable notifications (must provide webhook on first enable)
660-
{"enabled": true, "webhook": "https://webhook.example.com/events"}
661-
662-
// Disable temporarily (preserves all config for re-enabling later)
663-
{"enabled": false}
664-
665-
// Update webhook while keeping enabled state
666-
{"enabled": true, "webhook": "https://new-endpoint.com"}
667-
668-
// Change filter only
669-
{"enabled": true, "filter": "size > 1000000"}
670-
672+
// Enable notifications (preserves webhook, filter, auth)
673+
{"enabled": true}
674+
675+
// Disable temporarily (keeps all config for later)
676+
{"enabled": false, "webhook": "https://..."}
677+
678+
// Update webhook only (preserves auth, filter)
679+
{"webhook": "https://new-endpoint.com"}
680+
681+
// Change auth type (replaces entire auth object)
682+
{"auth": {"token": "new-token"}}
683+
671684
// Remove all notifications
672685
{"enabled": false}
673686
```
674-
687+
675688
**Note:** Auth credentials are masked in responses. You don't need to re-send them when updating other fields.
676689
required:
677690
- enabled
678691
properties:
679692
enabled:
680693
type: boolean
681-
description:
682-
Enable or disable notifications. When true, webhook must be
683-
provided.
694+
description: Enable or disable notifications (webhook required when true)
684695
webhook:
685696
type: string
686697
format: uri
687698
description: HTTPS endpoint to receive notification events
688699
example: "https://webhook.example.com/tigris-events"
689700
filter:
690701
type: string
691-
description:
692-
SQL WHERE clause to filter which objects trigger notifications
693-
(e.g., size comparisons)
702+
description: SQL WHERE clause to filter which objects trigger notifications (e.g., size comparisons)
694703
example: "size > 1000000"
695704
region:
696705
type: string
697-
description:
698-
Region to process notifications from (defaults to server region)
706+
description: Region to process notifications from (defaults to server region)
699707
example: "iad"
700708
auth:
701709
$ref: "#/components/schemas/ObjectNotificationAuth"
@@ -731,6 +739,8 @@ components:
731739
If set to true, per object ACL will be enabled. Default is false.
732740
object_notifications:
733741
$ref: "#/components/schemas/ObjectNotifications"
742+
regions:
743+
$ref: "#/components/schemas/Regions"
734744
UpdateBucketResponse:
735745
type: object
736746
DeleteBucketResponse:
@@ -936,6 +946,8 @@ components:
936946
description: If set to true, the bucket is publicly accessible
937947
storage_class:
938948
$ref: "#/components/schemas/StorageClass"
949+
regions:
950+
$ref: "#/components/schemas/Regions"
939951
object_acl_enabled:
940952
type: boolean
941953
description: If set to true, per object ACL is enabled
@@ -1043,13 +1055,12 @@ components:
10431055
role:
10441056
type: string
10451057
description: |
1046-
The role assigned to the access key defines the permissions (read,
1047-
write, admin) for the associated bucket.
1058+
The role defines the permissions for the associated bucket:
10481059
10491060
- `ReadOnly`: Read-only access to the bucket.
10501061
- `Editor`: Read and write access to the bucket.
1051-
- `Admin`: Full access to all the buckets in org, including management of
1052-
permissions. Since, this access key manages all the buckets, the value of `bucket_name`
1062+
- `Admin`: Full access to all the buckets in the org, including management of
1063+
permissions. Since this access key manages all the buckets, the value of `bucket_name`
10531064
field should always be `*`.
10541065
10551066
Example:
@@ -1177,6 +1188,8 @@ components:
11771188
If set to false, the organization will be deactivated and no new
11781189
resources can be provisioned. Existing resources will be
11791190
inaccessible.
1191+
org_quota:
1192+
$ref: "#/components/schemas/OrgQuota"
11801193
UpdateOrganizationResponse:
11811194
type: object
11821195
ListOrganizationsResponse:
@@ -1202,10 +1215,15 @@ components:
12021215
active:
12031216
type: boolean
12041217
description: If set to false, the organization is deactivated
1218+
quota:
1219+
$ref: "#/components/schemas/OrgQuota"
12051220
StorageClass:
12061221
type: string
12071222
description: Storage class for the bucket. Default is `STANDARD`.
12081223
enum: [STANDARD, STANDARD_IA, GLACIER, GLACIER_IR]
1224+
Regions:
1225+
type: string
1226+
description: Restricts the regions where bucket data is stored. Default is empty, which means no restrictions. See https://www.tigrisdata.com/docs/objects/object_regions/ for more details.
12091227
GenericError:
12101228
type: object
12111229
properties:
@@ -1238,33 +1256,33 @@ components:
12381256
type: apiKey
12391257
in: header
12401258
name: X-Tigris-Nonce
1241-
description:
1242-
Random unique string to identifying the request and prevent replay
1243-
attacks. Ex - "f8d133cb-5a42-47b1-9ef2-874bb55bab72"
1259+
description: |
1260+
Random unique string to identify the request and prevent replay attacks. Example: "f8d133cb-5a42-47b1-9ef2-874bb55bab72"
12441261
Timestamp:
12451262
type: apiKey
12461263
in: header
12471264
name: X-Tigris-Time
1248-
description: Unix timestamp in millis of the request. Ex - 1731703213870
1265+
description: |
1266+
Unix timestamp in milliseconds of the request. Example: 1731703213870
12491267
Signature:
12501268
type: apiKey
12511269
in: header
12521270
name: X-Tigris-Signature
12531271
description: |
1254-
HMAC-SHA256 of the request method, url, along with the unique nonce and timestamp signed using signing key.
1255-
To create the signature, concatenate the method, url, nonce, and timestamp with a newline character in between.
1256-
Then, calculate the HMAC-SHA256 of the concatenated string using the signing key. Ex -
1272+
HMAC-SHA256 of the canonical request signed using the signing key.
1273+
To create the signature, concatenate the HTTP method, URL, timestamp, and nonce with a newline character in between.
1274+
Then, calculate the HMAC-SHA256 of the concatenated string using the signing key. Example:
12571275
1258-
Created `canonical_request` as:
1276+
Create the `canonical_request` as:
12591277
```
12601278
POST
1261-
https://fly.mgnt.storage.tigris.dev/provider/laravel/orgs/my-org/provision
1279+
https://mgmt.storage.dev/provider/your-provider-id/orgs/user-org-id/provision
12621280
1731703213870
12631281
f8d133cb-5a42-47b1-9ef2-874bb55bab72
12641282
```
12651283
Then, calculate HMAC-SHA256 of the canonical request using the signing key as:
12661284
```
1267-
Signature = hex(sha256sign(canonical_request, "signing key"))
1285+
Signature = hex(sha256sign(canonical_request, "signing_key"))
12681286
```
12691287
security:
12701288
- Signature: []

0 commit comments

Comments
 (0)