Skip to main content
POST
/
workflows
/
upsert
Python
import os
from unstructured import UnstructuredClient

client = UnstructuredClient(
    username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
    password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
)
response = client.workflows.upsert(
    workflow={
        "cadence": "cadence",
        "name": "name",
        "stages": [{
            "jobs": [{
                "endpoint": "endpoint",
                "endpoint_request_body": {},
            }]
        }],
    },
)
print(response.workflow_id)
{
  "workflow_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.deasylabs.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
workflow
WorkflowPydantic · object
required
create_unique_name
boolean
default:false

Response

Successful Response

workflow_id
string
required