Trigger Action
uploads.trigger_action(strupload_id, UploadTriggerActionParams**kwargs) -> UploadTriggerActionResponse
POST/uploads/{uploadId}/action
Trigger an action on upload
Trigger Action
import os
from scenario_sdk import Scenario
client = Scenario(
api_key=os.environ.get("SCENARIO_SDK_API_KEY"), # This is the default and can be omitted
api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"), # This is the default and can be omitted
)
response = client.uploads.trigger_action(
upload_id="uploadId",
action="complete",
)
print(response.upload){
"upload": {
"id": "id",
"authorId": "authorId",
"createdAt": "createdAt",
"fileName": "fileName",
"kind": "3d",
"ownerId": "ownerId",
"source": "civitai",
"status": "complete",
"updatedAt": "updatedAt",
"assetOptions": {
"collectionIds": [
"string"
],
"hide": true,
"parentId": "parentId"
},
"config": {},
"contentType": "contentType",
"entityId": "entityId",
"errorMessage": "errorMessage",
"fileSize": 0,
"jobId": "jobId",
"originalFileName": "originalFileName",
"parts": [
{
"expires": "expires",
"number": 0,
"url": "url"
}
],
"partsCount": 0,
"provider": "civitai",
"url": "url"
}
}Returns Examples
{
"upload": {
"id": "id",
"authorId": "authorId",
"createdAt": "createdAt",
"fileName": "fileName",
"kind": "3d",
"ownerId": "ownerId",
"source": "civitai",
"status": "complete",
"updatedAt": "updatedAt",
"assetOptions": {
"collectionIds": [
"string"
],
"hide": true,
"parentId": "parentId"
},
"config": {},
"contentType": "contentType",
"entityId": "entityId",
"errorMessage": "errorMessage",
"fileSize": 0,
"jobId": "jobId",
"originalFileName": "originalFileName",
"parts": [
{
"expires": "expires",
"number": 0,
"url": "url"
}
],
"partsCount": 0,
"provider": "civitai",
"url": "url"
}
}