# Tigris Partner Integrations API reference

This API provides additional functionality for managing buckets, access keys, and organizations.

## OpenAPI specification 
This API follows the OpenAPI 3.0 specification, and the spec can be downloaded by clicking on the `Export` button in the top right corner.

## Authentication 
To authenticate with Tigris Object Store, you need to sign your requests with the signing key by following these steps:

Reach out to [help@tigrisdata.com](mailto:help@tigrisdata.com) to request a:

- Provider ID
- Signing Key

### 1. Generate current timestamp 
Set the `X-Tigris-Time` header to the current timestamp in milliseconds since epoch. Example: `1731703213870`

```text
X-Tigris-Time: 1731703213870
```

### 2. Generate a unique nonce 
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`

```text
X-Tigris-Nonce: f8d133cb-5a42-47b1-9ef2-874bb55bab72
```

### 3. Create a canonical request 
Concatenate the following details with a newline character in between:

```text
<HTTPMethod>\n
<CanonicalURI>\n
<Header:X-Tigris-Time>\n
<Header:X-Tigris-Nonce>
```

The `CanonicalURI` is the full request URL including the scheme, host, path, and query parameters.

For example, for a `POST` request to `/provider/laravel/orgs/my-org/provision`, the `CanonicalURI` would be:

```text
https://mgmt.storage.dev/provider/your-provider-id/orgs/user-org-id/provision
```

And for a `GET` request with query parameters:

```text
https://mgmt.storage.dev/provider/your-provider-id/orgs/?include_inactive=true
```

### 4. Generate request signature 
Calculate the HMAC-SHA256 of the canonical request using the shared secret as the signing key. Example:

```text
Signature = hex(sha256sign(canonical_request, "signing_key"))
```

### 5. Include the signature in the request 
Set the `X-Tigris-Signature` header to the generated signature.

```text
X-Tigris-Signature: <generated_signature>
```

## Authentication Details
- API Key: Nonce
- API Key: Timestamp
- API Key: Signature

| Security Scheme Type: | apiKey |
| Header parameter name: | X-Tigris-Nonce |

Unix timestamp in milliseconds of the request. Example: 1731703213870

| Security Scheme Type: | apiKey |
| Header parameter name: | X-Tigris-Time |

HMAC-SHA256 of the canonical request signed using the signing key. Example:

Create the `canonical_request` as:

```text
POST

https://mgmt.storage.dev/provider/your-provider-id/orgs/user-org-id/provision

1731703213870

f8d133cb-5a42-47b1-9ef2-874bb55bab72
```

Then, calculate HMAC-SHA256 of the canonical request using the signing key as:

```text
Signature = hex(sha256sign(canonical_request, "signing_key"))
```

| Security Scheme Type: | apiKey |
| Header parameter name: | X-Tigris-Signature |
