Administrator Storage Integration API
Base URL: http://localhost:8000/api/v1
Prefix: /admins/platform-settings/integrations
Auth: Administrator JWT required
Headers: Content-Type: application/json
1. Get Storage Configuration
Retrieve the saved integration state and sanitized configuration.
/admins/platform-settings/integrations/storage/Auth: Required
Headers
Authorization: Bearer {{admin_access_token}}
Content-Type: application/jsonSuccess Example
{
"success": true,
"message": "Integration retrieved successfully.",
"data": {
"integration": {
"type": "storage",
"is_enabled": true,
"configured": true,
"config": {
"provider": "gcs",
"bucket_name": "example-bucket",
"project_id": "example-project",
"has_service_account_json": true,
"has_access_key_id": false,
"has_secret_access_key": false,
"has_api_key": false,
"has_api_secret": false,
"has_connection_string": false
},
"updated_at": "2026-11-24T10:00:00Z"
}
}
}Notes
Sensitive values are returned as has_* flags. configured means encrypted configuration exists; it does not verify provider credentials. A missing integration record is created disabled.
Applicable errors: 401 missing/invalid JWT; 403 administrator access required; 406 unsupported response format.
Unauthorized - HTTP 401
{
"success": false,
"message": "Authentication credentials were not provided.",
"errors": {}
}Forbidden - HTTP 403
{
"success": false,
"message": "You do not have permission to perform this action.",
"errors": {}
}2. Update Storage Configuration
Save provider configuration and optionally enable or disable the integration.
/admins/platform-settings/integrations/storage/Auth: Required
Headers
Authorization: Bearer {{admin_access_token}}
Content-Type: application/jsonRequest Body
| Field | Type | Requirement |
|---|---|---|
is_enabled | boolean | Optional; preserves the saved state when omitted. |
config | object | Optional; merges the submitted fields with saved configuration. |
GCS
{
"is_enabled": true,
"config": {
"provider": "gcs",
"bucket_name": "example-bucket",
"project_id": "example-project",
"service_account_json": {
"type": "service_account",
"project_id": "example-project",
"client_email": "service@example-project.iam.gserviceaccount.com",
"private_key": "-----BEGIN PRIVATE KEY-----\nreplace-with-private-key\n-----END PRIVATE KEY-----"
}
}
}S3
{
"is_enabled": true,
"config": {
"provider": "s3",
"bucket_name": "example-bucket",
"region": "us-east-1",
"access_key_id": "replace-with-access-key",
"secret_access_key": "replace-with-secret-key"
}
}Cloudinary
{
"is_enabled": true,
"config": {
"provider": "cloudinary",
"cloud_name": "replace-with-cloud-name",
"api_key": "replace-with-api-key",
"api_secret": "replace-with-api-secret",
"secure": true
}
}Azure
{
"is_enabled": true,
"config": {
"provider": "azure",
"account_name": "replace-with-account-name",
"container_name": "example-container",
"connection_string": "replace-with-connection-string"
}
}Success Example
{
"success": true,
"message": "Integration updated successfully.",
"data": {
"integration": {
"type": "storage",
"is_enabled": true,
"configured": true,
"config": {
"provider": "gcs",
"bucket_name": "example-bucket",
"project_id": "example-project",
"has_service_account_json": true,
"has_access_key_id": false,
"has_secret_access_key": false,
"has_api_key": false,
"has_api_secret": false,
"has_connection_string": false
},
"updated_at": "2026-11-24T10:00:00Z"
}
}
}Notes
Both is_enabled and config are optional. PATCH merges with saved configuration; omit unchanged secrets to retain them. Required values must exist in the merged configuration when enabled. Saving does not verify provider connectivity. Disable with { "is_enabled": false }; re-enable with { "is_enabled": true } when configuration is complete.
Providers: gcs, s3, cloudinary, azure. Changing provider clears the previous provider's fields and retains shared settings. Shared options: make_files_private (boolean), allowed_file_types (string array). service_account_json must be a JSON object. Send only selected provider fields and shared settings.
Required fields when enabled
| Provider | Required fields |
|---|---|
gcs | bucket_name, project_id, service_account_json |
s3 | bucket_name, region, access_key_id, secret_access_key |
cloudinary | cloud_name, api_key, api_secret |
azure | account_name, container_name, connection_string |
The selected provider is also required.
Configuration fields
| Field | Type | Details |
|---|---|---|
provider | enum | Optional in a partial update |
bucket_name | string | Maximum length: 255; blank allowed |
project_id | string | Maximum length: 255; blank allowed |
region | string | Maximum length: 100; blank allowed |
service_account_json | object | write-only |
access_key_id | string | Maximum length: 255; blank allowed; write-only |
secret_access_key | string | Maximum length: 255; blank allowed; write-only |
endpoint_url | URL string | blank allowed |
cloud_name | string | Maximum length: 255; blank allowed |
api_key | string | Maximum length: 255; blank allowed; write-only |
api_secret | string | Maximum length: 255; blank allowed; write-only |
secure | boolean | Optional in a partial update |
account_name | string | Maximum length: 255; blank allowed |
container_name | string | Maximum length: 255; blank allowed |
connection_string | string | blank allowed; write-only |
make_files_private | boolean | Optional in a partial update |
allowed_file_types | string array | Optional in a partial update |
Disable without deleting configuration
{
"is_enabled": false
}Re-enable with complete saved configuration
{
"is_enabled": true
}When enabling S3 without saved credentials - HTTP 400
{
"success": false,
"message": "Validation failed.",
"errors": {
"config": {
"bucket_name": "This field is required when enabling the integration.",
"region": "This field is required when enabling the integration.",
"access_key_id": "This field is required when enabling the integration.",
"secret_access_key": "This field is required when enabling the integration."
}
}
}Applicable errors: 400 invalid/missing configuration or malformed JSON; 401 missing/invalid JWT; 403 administrator access required; 406 unsupported response format; 415 unsupported content type.
Unauthorized - HTTP 401
{
"success": false,
"message": "Authentication credentials were not provided.",
"errors": {}
}Forbidden - HTTP 403
{
"success": false,
"message": "You do not have permission to perform this action.",
"errors": {}
}