跳转到内容
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?context=manage' \
--header 'Authorization: Bearer <token>'
context
string
Allowed values: manage create setup

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 operation.resource_limit_exceeded 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.action_unsupported policy.action_parameter_required policy.action_parameter_invalid policy.promotion_source_unsupported policy.promotion_source_config_unsupported policy.promotion_target_unsupported 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_pending 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
action_id
required

Connector 内唯一且稳定的 action ID。

string
description_key
required

前端本地化说明 key。

string
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
fields

Action-owned input schema. Values are never persisted into the policy.

Array<object>
object
advanced_group_key

Connector localization key for a collapsed advanced field group.

string | null
allow_endpoint_without_protocol

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

boolean
allowed_endpoint_protocols

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

Array<string>
default_mode

Connector-owned rule deciding whether an empty optional text field also resolves to default_value.

string
Allowed values: missing_only missing_or_empty_text
default_rules

Ordered conditional defaults. The first matching rule wins; when none matches, default_value remains the fallback.

Array<object>

Ordered connector-owned default selected from the current field values.

object
conditions
required
Array<object>

One connector field equals one scalar value.

Conditions deliberately stay small and inspectable. Multiple conditions on one rule are ANDed; connectors can declare multiple ordered rules when they need OR behavior.

object
field
required
string
value
required
One of:
boolean
value
required
One of:
boolean
default_value
One of:
null
help_key

可选 help 文案 key。

string | null
inactive_value_behavior

What the form/payload normalizer does when visible_when is false.

string
Allowed values: preserve clear
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
placeholder

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

string | null
required
required

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

boolean
required_message_key

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

string | null
required_when

Conditions that make an otherwise optional field required in the UI.

Array<object>

One connector field equals one scalar value.

Conditions deliberately stay small and inspectable. Multiple conditions on one rule are ANDed; connectors can declare multiple ordered rules when they need OR behavior.

object
field
required
string
value
required
One of:
boolean
scope
required

字段进入哪个配置域。

string
Allowed values: connector_config static_credential authorization_application action_input
secret
required

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

boolean
select
One of:
null
trim_on_blur

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

boolean
validation

可被前端用于即时反馈、且必须由后端再次执行的基础约束。

object
max_integer
integer | null format: int64
max_length
integer | null format: int32
min_integer
integer | null format: int64
visible_when

Conditions that must all match for the field to be rendered.

Array<object>

One connector field equals one scalar value.

Conditions deliberately stay small and inspectable. Multiple conditions on one rule are ANDed; connectors can declare multiple ordered rules when they need OR behavior.

object
field
required
string
value
required
One of:
boolean
kind
required

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

string
Allowed values: custom authorization credential_validation connection_test
label_key
required

前端本地化 label key。

string
mutates_remote_state
required

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

boolean
output_fields

Connector-owned presentation schema for successful structured output.

Action output remains transient and is never copied into policy config.

Array<object>
object
false_key

Connector-owned label used when a boolean value is false.

string | null
label_key
required

Connector-owned localization key used as the field label.

string
name
required

Top-level key read from StoragePolicyActionResult.output.

string
true_key

Connector-owned label used when a boolean value is true.

string | null
value_kind
required

Wire value shape accepted by the generic presenter.

string
Allowed values: text number boolean string_list
requires_authorization
required

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

boolean
requires_confirmation
required

True 表示 UI 在执行前应展示明确确认步骤。

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
config_schema_version
required

当前 connector 能解析并输出的配置 schema 版本。

integer format: int32
connector_id
required

持久化到 policy 的稳定 connector/plugin id。

string
credential_management
One of:
null
credential_mode
required

Connector 的主要凭据模式。

string
Allowed values: none static_secret remote_node oauth_delegated
credential_schema_version

凭据 payload 的独立 schema 版本。配置字段演进不应使已保存凭据失效。

integer | null format: int32
deployment_scope
required

Policy 数据相对于多个 Primary 的可见范围。

string
Allowed values: instance_local shared_across_primary_instances
description
required

人类可读说明。

string
fields
required

管理端配置字段声明。

Array<object>
object
advanced_group_key

Connector localization key for a collapsed advanced field group.

string | null
allow_endpoint_without_protocol

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

boolean
allowed_endpoint_protocols

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

Array<string>
default_mode

Connector-owned rule deciding whether an empty optional text field also resolves to default_value.

string
Allowed values: missing_only missing_or_empty_text
default_rules

Ordered conditional defaults. The first matching rule wins; when none matches, default_value remains the fallback.

Array<object>

Ordered connector-owned default selected from the current field values.

object
conditions
required
Array<object>

One connector field equals one scalar value.

Conditions deliberately stay small and inspectable. Multiple conditions on one rule are ANDed; connectors can declare multiple ordered rules when they need OR behavior.

object
field
required
string
value
required
One of:
boolean
value
required
One of:
boolean
default_value
One of:
null
help_key

可选 help 文案 key。

string | null
inactive_value_behavior

What the form/payload normalizer does when visible_when is false.

string
Allowed values: preserve clear
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
placeholder

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

string | null
required
required

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

boolean
required_message_key

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

string | null
required_when

Conditions that make an otherwise optional field required in the UI.

Array<object>

One connector field equals one scalar value.

Conditions deliberately stay small and inspectable. Multiple conditions on one rule are ANDed; connectors can declare multiple ordered rules when they need OR behavior.

object
field
required
string
value
required
One of:
boolean
scope
required

字段进入哪个配置域。

string
Allowed values: connector_config static_credential authorization_application action_input
secret
required

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

boolean
select
One of:
null
trim_on_blur

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

boolean
validation

可被前端用于即时反馈、且必须由后端再次执行的基础约束。

object
max_integer
integer | null format: int64
max_length
integer | null format: int32
min_integer
integer | null format: int64
visible_when

Conditions that must all match for the field to be rendered.

Array<object>

One connector field equals one scalar value.

Conditions deliberately stay small and inspectable. Multiple conditions on one rule are ANDed; connectors can declare multiple ordered rules when they need OR behavior.

object
field
required
string
value
required
One of:
boolean
label
required

人类可读名称。

string
promotions

Target-owned in-place promotion contracts from compatible connectors.

Array<object>

Target-owned contract for promoting a compatible saved policy in place.

object
config_mappings
required
Array<object>
object
preserve_value

Require the target connector’s normalized value to remain exactly equal to the normalized source value. Use this for object-namespace fields.

boolean
source_field
required
string
target_field
required
string
confirmation_key
required

Target-owned confirmation copy rendered before mutating a saved policy.

string
credential_mappings
Array<object>
object
preserve_value

Require the target connector’s normalized value to remain exactly equal to the normalized source value. Use this for object-namespace fields.

boolean
source_field
required
string
target_field
required
string
description_key
required

Target-owned recommendation copy rendered by the generic UI.

string
promotion_id
required

Stable identity for one target-owned in-place connector promotion.

string
requirements
Array<object>
object
matcher
required
One of:
object
case_sensitive
boolean
kind
required
string
Allowed values: string_equals
value
required
string
negate

Negate the matcher result. This keeps exclusions composable without adding a second inverse variant for every matcher kind.

boolean
source_field
required

Source connector config field inspected by the generic recommendation and server-side eligibility checks.

string
source_connector_id
required

Stable connector/plugin identifier.

Built-in connectors use reverse-DNS-style identifiers such as asterdrive.storage.local. Dynamically loaded plugins use the same type and registry path, so core code never needs a built-in connector enum.

string
related_issues

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

Array<integer>
requires_authorization
required

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

boolean
supports_initial_setup
required

是否能在首次系统初始化中直接创建一个可用的默认 policy。

需要先保存 policy、再跳转授权或完成其他后置配置的 connector 应设为 false。

boolean
ui
required

管理端展示元数据。

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

object
badge_rgb
required

Connector-owned badge accent color.

Keeping the color as structured RGB data lets external connectors pick their own presentation without extending a core-owned color enum or sending executable CSS through the descriptor API.

object
blue
required
integer format: int32
green
required
integer format: int32
red
required
integer format: int32
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": [
{
"endpoints": [
"execute_draft_storage_policy_action"
],
"fields": [
{
"default_mode": "missing_only",
"inactive_value_behavior": "preserve",
"kind": "text",
"scope": "connector_config",
"select": {
"data_source": "remote_nodes",
"value_kind": "string"
}
}
],
"kind": "custom",
"output_fields": [
{
"value_kind": "text"
}
]
}
],
"capabilities": {
"object_naming": "opaque_uuid"
},
"credential_management": {
"status_presentations": {
"additionalProperty": {
"tone": "neutral"
}
}
},
"credential_mode": "none",
"deployment_scope": "instance_local",
"fields": [
{
"default_mode": "missing_only",
"inactive_value_behavior": "preserve",
"kind": "text",
"scope": "connector_config",
"select": {
"data_source": "remote_nodes",
"value_kind": "string"
}
}
],
"promotions": [
{
"requirements": [
{
"matcher": {
"kind": "string_equals"
}
}
]
}
]
}
]
}

Unauthorized

Forbidden