mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-02 04:17:33 +08:00
Merge branch 'master' into matt/be-1040-remove-cloud-job-ids-asset-param
This commit is contained in:
commit
3ba2414819
59
openapi.yaml
59
openapi.yaml
@ -2508,37 +2508,25 @@ paths:
|
|||||||
|
|
||||||
/api/assets/import:
|
/api/assets/import:
|
||||||
post:
|
post:
|
||||||
operationId: importAssets
|
operationId: importPublishedAssets
|
||||||
tags: [assets]
|
tags: [assets]
|
||||||
summary: Import assets from external URLs
|
summary: "[cloud-only] Import published assets into the caller's library"
|
||||||
description: "[cloud-only] Imports one or more assets from external URLs into the cloud asset store."
|
description: |
|
||||||
|
[cloud-only] Imports the specified published assets into the caller's asset library. New DB records reference the same storage objects; no file copying occurs. Assets the caller already owns (by hash) are deduplicated. The `id` field on each returned `AssetInfo` is the caller's newly-created private asset ID, not the published asset ID supplied in the request.
|
||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: "#/components/schemas/ImportPublishedAssetsRequest"
|
||||||
required:
|
|
||||||
- imports
|
|
||||||
properties:
|
|
||||||
imports:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: "#/components/schemas/AssetImportRequest"
|
|
||||||
description: Assets to import
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Import initiated
|
description: Successfully imported assets
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: "#/components/schemas/ImportPublishedAssetsResponse"
|
||||||
properties:
|
|
||||||
assets:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: "#/components/schemas/Asset"
|
|
||||||
"400":
|
"400":
|
||||||
description: Bad request
|
description: Bad request
|
||||||
content:
|
content:
|
||||||
@ -7373,24 +7361,35 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Target path on the runtime filesystem
|
description: Target path on the runtime filesystem
|
||||||
|
|
||||||
AssetImportRequest:
|
ImportPublishedAssetsRequest:
|
||||||
type: object
|
type: object
|
||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
description: "[cloud-only] A single asset to import from an external URL."
|
description: "[cloud-only] Request body for importing published assets into the caller's library."
|
||||||
required:
|
required:
|
||||||
- url
|
- published_asset_ids
|
||||||
properties:
|
properties:
|
||||||
url:
|
published_asset_ids:
|
||||||
type: string
|
|
||||||
format: uri
|
|
||||||
description: URL of the asset to import
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
description: Display name for the imported asset
|
|
||||||
tags:
|
|
||||||
type: array
|
type: array
|
||||||
|
description: IDs of published assets (inputs and models) to import.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
share_id:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
description: |
|
||||||
|
Optional. Share ID of the published workflow these assets belong to. When provided (non-null, non-empty): all `published_asset_ids` must belong to this share's workflow version; returns 400 if the share is not found or any asset does not belong to it. When omitted, null, or empty string: no share-scoped validation is performed and the assets are validated only against global rules (preserved for clients that have not yet adopted `share_id`).
|
||||||
|
|
||||||
|
ImportPublishedAssetsResponse:
|
||||||
|
type: object
|
||||||
|
x-runtime: [cloud]
|
||||||
|
description: "[cloud-only] Response after importing published assets. Each returned `AssetInfo.id` is the caller's newly-created private asset ID, not the published asset ID supplied in the request."
|
||||||
|
required:
|
||||||
|
- assets
|
||||||
|
properties:
|
||||||
|
assets:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/AssetInfo"
|
||||||
|
|
||||||
RemoteAssetMetadata:
|
RemoteAssetMetadata:
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user