跳转到内容
AsterDrive Developer Docs开发者

list_storage_driver_descriptors

GET
/api/v1/admin/policies/storage-drivers
curl --request GET \
--url https://example.com/api/v1/admin/policies/storage-drivers \
--header 'Authorization: Bearer <token>'

List storage driver capability descriptors

Media typeapplication/json

统一 API 响应格式

成功: { "code": "success", "msg": "", "data": {...} } 失败: { "code": "auth.credentials_failed", "msg": "Invalid Credentials" }

object
code
required
string
Allowed values: success bad_request not_found internal_server_error database.error config.error endpoint.not_found rate_limited mail.not_configured mail.delivery_failed conflict config.public_site_url_required config.public_site_url_invalid auth.failed auth.token_expired auth.token_invalid forbidden auth.pending_activation auth.contact_verification_invalid auth.contact_verification_expired auth.token_missing auth.credentials_failed auth.mfa_failed auth.refresh_token_stale auth.refresh_token_reuse_detected file.not_found file.too_large file.type_not_allowed file.upload_failed upload.session_not_found upload.session_expired upload.chunk_failed upload.assembly_failed thumbnail.failed resource.locked precondition_failed upload.assembling storage.policy_not_found storage.driver_error storage.quota_exceeded storage.unsupported_driver storage.auth_failed storage.permission_denied storage.misconfigured storage.object_not_found storage.rate_limited storage.transient_failure storage.precondition_failed storage.operation_unsupported folder.not_found share.not_found share.expired share.password_required share.download_limit_reached archive_preview.disabled archive_preview.user_disabled archive_preview.share_disabled archive_preview.source_too_large archive_preview.invalid_archive archive_preview.manifest_too_large archive_preview.unsupported_type archive_preview.rejected archive_preview.source_size_mismatch archive_compress.disabled archive_download.user_disabled archive_download.share_disabled auth.username_exists auth.email_exists auth.identifier_exists auth.admin_required auth.account_disabled auth.request_source_untrusted auth.request_origin_untrusted auth.request_referer_untrusted auth.request_source_missing auth.session_user_mismatch auth.csrf_cookie_missing auth.csrf_header_missing auth.csrf_token_invalid auth.passkey_login_disabled auth.registration_disabled auth.email_blocked auth.email_not_allowlisted auth.mfa_flow_invalid auth.mfa_flow_expired auth.mfa_code_invalid auth.mfa_attempts_exceeded auth.mfa_factor_required auth.mfa_factor_already_exists auth.mfa_recovery_code_used auth.mfa_email_code_required auth.mfa_email_code_expired auth.invitation_invalid auth.invitation_expired auth.invitation_revoked auth.invitation_accepted auth.password_change_required avatar.file_required avatar.upload_read_failed avatar.processor_unavailable avatar.empty_image avatar.render_failed avatar.output_invalid file.name_conflict file.etag_mismatch file.modified_during_write folder.name_conflict lock.not_owner share.scope_denied managed_ingress.binding_mismatch managed_ingress.default_delete_requires_replacement managed_ingress.default_error managed_ingress.default_missing managed_ingress.default_not_applied managed_ingress.default_update_requires_replacement managed_ingress.driver_unsupported managed_ingress.local_path_invalid managed_ingress.required managed_ingress.single_primary_required remote_storage_target.not_found master_binding.disabled passkey.name_invalid passkey.name_too_long passkey.not_discoverable team.not_member team.owner_required team.admin_or_owner_required policy.upload_sessions_exist policy.storage_access_key_required policy.storage_secret_key_required policy.storage_bucket_required policy.storage_endpoint_invalid policy.remote_node_required policy.remote_node_unexpected policy.remote_storage_target_required policy.remote_node_disabled policy.remote_node_base_url_required policy.remote_node_transfer_strategy_unsupported policy.onedrive_options_unsupported policy.sftp_options_unsupported policy.onedrive_account_mode_required policy.onedrive_personal_china_cloud_unsupported policy.onedrive_sharepoint_site_required policy.onedrive_group_required policy.native_thumbnail_unsupported policy.native_media_metadata_unsupported policy.promotion_source_unsupported policy.promotion_target_unsupported policy.promotion_bucket_change_denied policy.action_unsupported policy.action_parameter_required policy.action_parameter_invalid workspace.scope_denied external_auth.provider_disabled external_auth.policy_denied external_auth.callback_redirect_uri_required offline_download.aria2_rpc_auth_failed offline_download.aria2_rpc_probe_failed remote_node.disabled remote_node.enrollment_required remote_node.unique_conflict storage.auth storage.not_found storage.permission storage.precondition storage.transient storage.unsupported storage.unknown task.lease_lost task.lease_renewal_timed_out task.worker_shutdown_requested task.retry_status_conflict task.retry_not_allowed team.member_exists thumbnail.format_guess_failed thumbnail.decode_failed thumbnail.encode_failed thumbnail.source_open_failed thumbnail.source_stream_failed thumbnail.task_panicked thumbnail.source_too_large thumbnail.processor_unavailable thumbnail.render_failed thumbnail.output_invalid thumbnail.source_temp_create_failed thumbnail.source_temp_flush_failed thumbnail.source_temp_copy_failed wopi.public_site_url_required wopi.app_disabled wopi.request_origin_untrusted wopi.request_referer_untrusted upload.temp_dir_create_failed upload.temp_file_create_failed upload.temp_file_write_failed upload.temp_file_flush_failed upload.request_body_read_failed upload.request_body_size_overflow upload.request_size_mismatch upload.hash_temp_open_failed upload.hash_temp_read_failed upload.field_read_failed upload.local_staging_path_resolve_failed upload.local_staging_dir_create_failed upload.local_staging_file_create_failed upload.local_staging_write_failed upload.local_staging_flush_failed upload.direct_relay_write_failed upload.direct_relay_shutdown_failed upload.direct_relay_task_failed upload.body_size_overflow upload.declared_size_invalid upload.empty_file upload.chunk_persist_failed upload.chunk_relay_failed upload.chunk_transport_mismatch upload.chunk_session_invalid upload.chunk_number_out_of_range upload.chunk_size_mismatch upload.chunk_too_large upload.chunk_size_overflow upload.status_conflict upload.completed_file_missing upload.previous_failure upload.parts_required upload.incomplete_chunks upload.incomplete_parts upload.missing_part upload.temp_object_missing upload.temp_object_size_mismatch upload.final_object_size_mismatch upload.session_corrupted upload.part_numbers_empty upload.part_numbers_too_many upload.part_number_out_of_range upload.assembly_io_failed upload.assembly_size_overflow webdav.username_exists wopi.max_expected_size_exceeded validation.request_origin_invalid validation.request_referer_invalid validation.request_host_invalid validation.request_scheme_invalid validation.request_header_value_invalid validation.system_already_initialized validation.system_not_initialized search.query_empty search.type_invalid search.tag_match_invalid search.size_range_invalid search.file_filter_type_conflict search.mime_type_empty search.category_invalid search.extensions_invalid search.tag_ids_invalid search.date_invalid search.date_range_invalid internal_storage.range_length_invalid internal_storage.range_empty_object internal_storage.range_offset_out_of_bounds internal_storage.range_header_invalid internal_storage.range_multiple_unsupported internal_storage.range_bounds_invalid internal_storage.content_length_required internal_storage.content_length_invalid internal_storage.compose_parts_required internal_storage.compose_expected_size_invalid
data
Array<object>
object
actions
required

管理端/服务端可执行动作声明。

Array<object>
object
affordance_action
One of:
null
endpoints

该 action 可通过哪些后端 endpoint 执行。

Array<string>
Allowed values: execute_draft_storage_policy_action execute_saved_storage_policy_action start_storage_authorization validate_storage_policy_credential test_policy_params test_policy_connection
kind
required

用于把 action 归类到授权、连接测试、policy action 等入口。

string
Allowed values: policy_action authorization credential_validation connection_test
mutates_remote_state
required

True 表示该动作会修改 provider 远端状态。

boolean
policy_action
One of:
null
requires_authorization
required

True 表示执行前必须存在可用授权凭据。

boolean
requires_saved_policy
required

True 表示必须先保存 policy,draft 参数不能执行。

boolean
authorization_provider

授权 provider,例如 microsoft_graph

string | null
capabilities
required

存储对象能力。

object
capacity
required

是否支持容量观测。

boolean
efficient_range
required

是否支持高效 range read。

boolean
list
required

是否支持底层对象路径列举。

boolean
object_naming
required

底层对象路径采用 opaque UUID,还是保留原文件名作为 provider item name。

string
Allowed values: opaque_uuid original_filename
object_storage_transfer_strategy
required

是否暴露对象存储 upload/download strategy 选项。

boolean
presigned_download
required

是否支持 presigned download。

boolean
remote_node_binding
required

是否需要或支持 remote node 绑定。

boolean
storage_native_media_metadata
required

是否支持 provider/storage-native media metadata。

boolean
storage_native_thumbnail
required

是否支持 provider/storage-native thumbnail。

boolean
credential_mode
required

Connector 的主要凭据模式。

string
Allowed values: none static_secret remote_node oauth_delegated
description
required

人类可读说明。

string
driver_recommendations

Connector-owned recommendations for moving a policy to a more specific driver.

Array<object>
object
endpoint_host_rules
required

Host rules owned by the source connector.

This keeps provider-detection rules in connector metadata instead of in the admin UI. Frontend code only performs generic URL host matching.

Array<object>
object
ends_with

Suffix hostname match after URL parsing and lower-casing.

string | null
equals

Exact hostname match after URL parsing and lower-casing.

string | null
target_driver_type
required

Candidate driver that should be suggested for matching endpoint hosts.

string
Allowed values: local s3 sftp azure_blob tencent_cos remote one_drive
driver_type
required

持久化到 policy 的 driver type。

string
Allowed values: local s3 sftp azure_blob tencent_cos remote one_drive
enabled
required

当前部署是否启用该 connector。

boolean
fields
required

管理端配置字段声明。

Array<object>
object
allow_endpoint_without_protocol

True 表示 endpoint 可以省略 URL scheme,由 connector 在后端补齐或解释。

boolean
allowed_endpoint_protocols

Endpoint 允许的 URL protocol,取值与浏览器 URL.protocol 一致,例如 https:

Array<string>
help_key

可选 help 文案 key。

string | null
invalid_protocol_message_key

Endpoint 协议不合法时的前端文案 key。

string | null
kind
required

前端可用的基础控件类型。

string
Allowed values: text secret select boolean number
label_key
required

前端本地化 label key。默认通常等于 name

string
name
required

提交 payload 中的字段名。

string
options

Select/radio 等枚举控件的稳定取值。

Array<string>
placeholder

可选 placeholder,本地化策略由前端决定。

string | null
required
required

是否必填。复杂条件校验仍由 connector/service 做最终裁决。

boolean
required_message_key

字段必填校验失败时的前端文案 key。

string | null
scope
required

字段进入哪个配置域。

string
Allowed values: connection policy_options application_credential remote_node_binding
secret
required

是否是敏感字段,前端应按 secret input 处理,后端不应明文回显。

boolean
trim_on_blur

True 表示该字段失焦时前端可以安全 trim。

boolean
visible_when_driver_types

同一字段只对部分 driver 可见时使用。为空表示不额外限制。

Array<string>
Allowed values: local s3 sftp azure_blob tencent_cos remote one_drive
label
required

人类可读名称。

string
related_issues

用于开发追踪的相关 issue 编号,不参与业务逻辑。

Array<integer>
requires_authorization
required

是否需要额外授权才能成为可用 policy。

boolean
ui
required

管理端展示元数据。

这类 label/icon/helper 虽然最终由前端渲染,但语义上属于 connector: 新 connector 不应该要求前端再维护一份 driver 展示矩阵。

object
base_path_empty_display
required

Base_path 为空时展示的 fallback 文案。

string
base_path_placeholder
required

Base_path input placeholder。

string
config_step_description_key
required

创建向导配置步骤说明 key。

string
config_step_title_key
required

创建向导配置步骤标题 key。

string
description_key
required

前端 i18n description key。

string
edit_context_key
required

编辑页上下文说明 key。

string
helper_key
required

创建向导右侧 helper 文案 key。

string
icon_name

Icon 库名称兜底。

string | null
icon_src

Driver 选择卡片/上下文条图标资源。

string | null
label_key
required

前端 i18n label key。

string
upload_workflows
required

上传工作流能力。

object
frontend_direct_provider_resumable_upload
required

是否允许前端直接拿 provider-native session 上传。

boolean
object_multipart_upload
required

支持对象存储 multipart/block upload 语义。

boolean
object_multipart_upload_capabilities
One of:
null
presigned_upload
required

支持浏览器/客户端使用 presigned URL 直传。

boolean
provider_resumable_upload
required

支持 provider-native resumable/session upload。

boolean
provider_resumable_upload_capabilities
One of:
null
simple_upload
required

后端/客户端可以用单请求写入小对象。

boolean
simple_upload_capabilities
required

单请求上传的静态语义。实际是否走 direct 仍受 policy chunk_size 限制。

object
max_provider_single_request_size

Provider 自身单请求 API 的最大对象大小;None 表示当前 connector 不声明静态上限。

integer | null format: int64
policy_limited
required

True 表示单请求 direct/relay 上限由具体 policy chunk_size 决定。

boolean
server_side_relay
required

True 表示浏览器把对象发给 AsterDrive,由后端 relay 到 provider。

boolean
stream_upload
required

后端可以通过 StreamUploadDriver 把 reader 写入 provider。

boolean
error
One of:
null
msg
required
string
Example
{
"code": "success",
"data": [
{
"actions": [
{
"affordance_action": "start_authorization",
"endpoints": [
"execute_draft_storage_policy_action"
],
"kind": "policy_action",
"policy_action": "configure_tencent_cos_cors"
}
],
"capabilities": {
"object_naming": "opaque_uuid"
},
"credential_mode": "none",
"driver_recommendations": [
{
"target_driver_type": "local"
}
],
"driver_type": "local",
"fields": [
{
"kind": "text",
"scope": "connection",
"visible_when_driver_types": [
"local"
]
}
]
}
]
}

Unauthorized

Forbidden