小插件 API
检索 Labii 小插件目录。
除非另有说明,所有路径均相对于 https://www.labii.dev,并且需要使用 Bearer 令牌进行身份验证。请将每个占位符替换为 Labii 环境中的相应标识符。
端点
| 操作 | 方法 | 路径 |
|---|---|---|
| 获取小插件列表 | GET | /widgets/widget/list/organization/{{organization_sid}}/list/ |
| 获取小插件详情 | GET | /widgets/widget/detail/{{widget_sid}}/ |
| 获取小插件类别 | GET | /widgets/category/ |
列表端点的最后一个 URL 段用于选择响应序列化器。示例使用 list;支持的端点还可以提供 name 或 detail 等表示形式。
序列化器字段
列表响应项: sid, icon, name, type, category, category_display, sub_category, sub_category_display, company, version, release_date, subscription_price, notes, related_to, allow_multiple, is_readonly, is_public, status, documentation_url, screenshot_url, change_permission, verbose_name
详情响应: sid, icon, name, category, category_display, sub_category, sub_category_display, company, notes, description, documentation_url, screenshot_url, type, constructor, related_to, version, release_date, order, subscription_price, allow_multiple, is_readonly, metadata_labels, data, copy_exclude_paths, change_permission, help_text, verbose_name
写入序列化器: sid, icon, name, name_translations, category, sub_category, sub_category_translations, company, notes, notes_translations, description, description_translations, documentation_url, documentation_url_translations, screenshot_url, type, constructor, uischema, version, release_date, order, subscription_price, allow_multiple, is_readonly, is_archived, is_public, available_to, metadata_labels, data, copy_exclude_paths, updated_by, date_updated, date_created
写入序列化器是后端验证架构。视图可能根据 URL 或已验证用户填充标识、父级和审计字段,也可能禁止特定操作修改某些字段。
列表响应 JSON
以下值为占位值,用于展示当前列表序列化器返回的确切键。这并不表示每个字段都可以为 null。
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 1,
"next": null,
"previous": null,
"add_permission": false,
"results": [
{
"sid": null,
"icon": null,
"name": null,
"type": null,
"category": null,
"category_display": null,
"sub_category": null,
"sub_category_display": null,
"company": null,
"version": null,
"release_date": null,
"subscription_price": null,
"notes": null,
"related_to": null,
"allow_multiple": null,
"is_readonly": null,
"is_public": null,
"status": null,
"documentation_url": null,
"screenshot_url": null,
"change_permission": null,
"verbose_name": null
}
]
}
详情响应 JSON
以下值为占位值,用于展示当前详情序列化器返回的确切键。嵌套关系和元数据的值取决于具体资源。
{
"sid": null,
"icon": null,
"name": null,
"category": null,
"category_display": null,
"sub_category": null,
"sub_category_display": null,
"company": null,
"notes": null,
"description": null,
"documentation_url": null,
"screenshot_url": null,
"type": null,
"constructor": null,
"related_to": null,
"version": null,
"release_date": null,
"order": null,
"subscription_price": null,
"allow_multiple": null,
"is_readonly": null,
"metadata_labels": null,
"data": null,
"copy_exclude_paths": null,
"change_permission": null,
"help_text": null,
"verbose_name": null
}
请求示例
curl --request GET \
--url 'https://www.labii.dev/widgets/widget/list/organization/{{organization_sid}}/list/' \
--header 'Authorization: Bearer <api_key>'