[Tenjin API Reference](https://api-docs.tenjin.com/llms.txt) › [Cloud Data Exporter API](https://api-docs.tenjin.com/cloud-data-exporter-api.md) › Test bucket permissions

- Cloud Data Exporter API OpenAPI spec: https://api-docs.tenjin.com/openapi/cloud-data-exporter-api.json

# Test bucket permissions

- **Method:** `POST`
- **Path:** `/v1/configs/test_bucket_permissions`
- **Operation ID:** `post_configs_test_bucket_permissions`
- **Tags:** Cloud Data Exporter Configs

Test bucket permissions without saving. Tenjin's role, in the session the bucket policy names for your organization, lists \[/]/v2/, then starts a multipart upload at \[/]/v2/\_tenjin_permission_check and aborts it. A policy without s3:ListBucket or s3:PutObject is refused. Nothing is stored, so s3:GetObject and s3:DeleteObject are not tested, and a policy without s3:AbortMultipartUpload passes too: S3 lets Tenjin abort an upload it started. Keep every action the policy lists, because the exports need them. A bucket encrypted with a KMS key is refused: Tenjin does not support KMS yet, and on the AWS-managed aws/s3 key S3 would encrypt the files under Tenjin's own key. A refusal names the action it tested, and a name the config endpoints would refuse is refused here with the same message.

## Effective servers

- `https://api.tenjin.com/cloud_data_exporter`

## Authentication

- **Bearer**: HTTP bearer (`JWT`)

  Generate an access token on the [Access Tokens](https://dashboard.tenjin.com/dashboard/access_tokens) page of the Tenjin dashboard and send it as `Authorization: Bearer <access token>`. [API access tokens](https://tenjin.com/docs/api-access-tokens/) explains them.

## Request body

**Required:** `true`

**Content type:** `application/json`

schema: `post_configs_test_bucket_permissions_Request`

- **`bucket` (required)**: `string`

  S3 bucket name
- **`name` (required)**: `string`

  Config name, the folder the files sit in
- **`region` (required)**: `string`

  S3 region (e.g. us-east-1)
- **`prefix`**: `string`

  S3 key prefix (optional)

**Example:**

```json
{
  "bucket": "",
  "region": "",
  "name": "",
  "prefix": ""
}
```

## Responses

### 200 { "success": true } when the bucket allows Tenjin's writes

**Content type:** `application/json`

`any`

**Example:**

```json
null
```

### 401, 403, 422, 503

- `401` The access token was revoked, or your user role has no access to the Cloud Data Exporter
- `403` Missing or malformed access token, or the Cloud Data Exporter is not enabled for this organization
- `422` Validation error, or the bucket refused the bucket permission check
- `503` Bucket permission check temporarily unavailable (Tenjin-side failure), retry shortly

**Content type:** `application/json`

schema: `Error`

- **`error` (required)**: `string`

  Error message (same as title, for backward compatibility)
- **`status` (required)**: `integer`

  HTTP status code
- **`title` (required)**: `string`

  Short, human-readable summary
- **`type` (required)**: `string`

  URI identifying the problem type
- **`detail`**: `string`

  Human-readable explanation specific to this occurrence

**Example:**

```json
{
  "error": "",
  "type": "",
  "title": "",
  "status": 422,
  "detail": ""
}
```

## Schemas

- `Error` — shown above.
- `post_configs_test_bucket_permissions_Request` — shown above.
