Chuyển tới nội dung chính

Storage connections API

Global storage connections (platform control plane).

This page lists 7 endpoints (OpenAPI tag control-plane-storage). It is generated from openapi.json; see the REST API overview for authentication, CSRF and error conventions.

MethodPathOperation idNotes
GET/api/control-plane/storagelist
POST/api/control-plane/storagecreate
GET/api/control-plane/storage/{id}detail
PUT/api/control-plane/storage/{id}update
DELETE/api/control-plane/storage/{id}remove
GET/api/control-plane/storage/{id}/downloaddownload_objectStream a single object from a storage connection's bucket as an attachment.
GET/api/control-plane/storage/{id}/objectsbrowse_objectsBrowse the objects/folders in a storage connection's bucket (folder-style).

GET /api/control-plane/storage​

Operation id: list. Auth: Session cookie. Forbidden (403): Missing storage:read permission.

Response 200 (application/json): array of StorageDto

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes
purposestring, nullableno
providerstringyes
endpointstring, nullableno
regionstringyes
bucketstringyes
key_prefixstring, nullableno
access_keystringyes
path_stylebooleanyes
secret_refstring (uuid), nullableno
created_atstring (date-time)yes
StatusMeaning
200Global storage connections
401Not authenticated
403Missing storage:read permission
500Internal error

POST /api/control-plane/storage​

Operation id: create. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing storage:create permission.

Request body (application/json): StorageInput

FieldTypeRequiredDescription
namestringyes
purposestring, nullableno
providerstringyes
endpointstring, nullableno
regionstringyes
bucketstringyes
key_prefixstring, nullableno
access_keystringyes
secret_refstring (uuid), nullableno
path_stylebooleanno
new_secretNewSecretno

Response 201 (application/json): StorageDto

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes
purposestring, nullableno
providerstringyes
endpointstring, nullableno
regionstringyes
bucketstringyes
key_prefixstring, nullableno
access_keystringyes
path_stylebooleanyes
secret_refstring (uuid), nullableno
created_atstring (date-time)yes
StatusMeaning
201Storage connection created
400Invalid input
401Not authenticated
403Missing storage:create permission
409A storage connection with this name already exists
500Internal error

GET /api/control-plane/storage/{id}​

Operation id: detail. Auth: Session cookie. Forbidden (403): Missing storage:read permission.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesStorage connection id

Response 200 (application/json): StorageDto

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes
purposestring, nullableno
providerstringyes
endpointstring, nullableno
regionstringyes
bucketstringyes
key_prefixstring, nullableno
access_keystringyes
path_stylebooleanyes
secret_refstring (uuid), nullableno
created_atstring (date-time)yes
StatusMeaning
200Storage connection detail
401Not authenticated
403Missing storage:read permission
404No such storage connection
500Internal error

PUT /api/control-plane/storage/{id}​

Operation id: update. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing storage:update permission.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesStorage connection id

Request body (application/json): StorageInput

FieldTypeRequiredDescription
namestringyes
purposestring, nullableno
providerstringyes
endpointstring, nullableno
regionstringyes
bucketstringyes
key_prefixstring, nullableno
access_keystringyes
secret_refstring (uuid), nullableno
path_stylebooleanno
new_secretNewSecretno

Response 200 (application/json): StorageDto

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes
purposestring, nullableno
providerstringyes
endpointstring, nullableno
regionstringyes
bucketstringyes
key_prefixstring, nullableno
access_keystringyes
path_stylebooleanyes
secret_refstring (uuid), nullableno
created_atstring (date-time)yes
StatusMeaning
200Storage connection updated (secret rotation pushed to warehouses)
400Invalid input
401Not authenticated
403Missing storage:update permission
404No such storage connection
409The new name clashes with an existing connection
500Internal error

DELETE /api/control-plane/storage/{id}​

Operation id: remove. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Missing storage:delete permission.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesStorage connection id

Response 200 (application/json): Ack

FieldTypeRequiredDescription
okbooleanyes
StatusMeaning
200Storage connection deleted
401Not authenticated
403Missing storage:delete permission
404No such storage connection
500Internal error

GET /api/control-plane/storage/{id}/download​

Operation id: download_object. Auth: Session cookie. Forbidden (403): Missing storage:read permission.

Stream a single object from a storage connection's bucket as an attachment.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesStorage connection id
keyquerystringyesObject key to download
StatusMeaning
200Object bytes streamed as an attachment
400Invalid request or object could not be read
401Not authenticated
403Missing storage:read permission
404No such storage connection
500Internal error

GET /api/control-plane/storage/{id}/objects​

Operation id: browse_objects. Auth: Session cookie. Forbidden (403): Missing storage:read permission.

Browse the objects/folders in a storage connection's bucket (folder-style).

ParameterInTypeRequiredDescription
idpathstring (uuid)yesStorage connection id
prefixquerystringnoFolder prefix to list under

Response 200 (application/json): ListingDto

FieldTypeRequiredDescription
foldersstring[]yes
objectsObjectDto[]yes
StatusMeaning
200Folders and objects under the prefix
400Invalid request or bucket could not be listed
401Not authenticated
403Missing storage:read permission
404No such storage connection
500Internal error