Skip to content

Commit 9f11d0a

Browse files
authored
API: Local-to-local workflows for Python, local-to-remote workflows for REST and Python (#607)
1 parent 365b575 commit 9f11d0a

File tree

3 files changed

+481
-35
lines changed

3 files changed

+481
-35
lines changed

api-reference/workflow/overview.mdx

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,14 @@ the `POST` method to call the `/workflows/<workflow-id>/run` endpoint (for `curl
18221822
`<workflow-id>` with the workflow's unique ID. To get this ID, see [List workflows](#list-workflows).
18231823

18241824
<AccordionGroup>
1825-
<Accordion title="Python SDK">
1825+
<Accordion title="Python SDK (remote source and remote destination)">
1826+
<Note>
1827+
If the target workflow was originally created programmatically by the Unstructured Python SDK or with a REST API client such as `curl` or Postman,
1828+
and the workflow uses a local source connector, you can run the workflow only with a REST API client such as `curl` or Postman,
1829+
as described later in this section.
1830+
You cannot run the workflow with the Python SDK or the Unstructured user interface (UI), even though the workflow is visible in the UI.
1831+
</Note>
1832+
18261833
```python
18271834
import os
18281835

@@ -1842,7 +1849,14 @@ the `POST` method to call the `/workflows/<workflow-id>/run` endpoint (for `curl
18421849
print(response.raw_response)
18431850
```
18441851
</Accordion>
1845-
<Accordion title="Python SDK (async)">
1852+
<Accordion title="Python SDK (async) (remote source and remote destination)">
1853+
<Note>
1854+
If the target workflow was originally created programmatically by the Unstructured Python SDK or with a REST API client such as `curl` or Postman,
1855+
and the workflow uses a local source connector, you can run the workflow only with a REST API client such as `curl` or Postman,
1856+
as described later in this section.
1857+
You cannot run the workflow with the Python SDK or the Unstructured user interface (UI), even though the workflow is visible in the UI.
1858+
</Note>
1859+
18461860
```python
18471861
import os
18481862
import asyncio
@@ -1874,16 +1888,7 @@ the `POST` method to call the `/workflows/<workflow-id>/run` endpoint (for `curl
18741888
--header "unstructured-api-key: $UNSTRUCTURED_API_KEY"
18751889
```
18761890
</Accordion>
1877-
<Accordion title="curl (local source and local destination)">
1878-
To run a workflow that uses a local source and local destination, the workflow must have already been created to use a local source and a local destination. Also,
1879-
the workflow must have already been created as a custom worklow, and the workflow cannot have been created to run on a schedule.
1880-
1881-
The workflow's source and destination must both be local. You cannot run a workflow that specifies a local source and a remote destination, nor can you run a worklow that specifies a remote source
1882-
and a local destination.
1883-
1884-
The Unstructured user interface (UI) and the Unstructured Python SDK currently do not support running workflows that use a local source
1885-
and a local destination.
1886-
1891+
<Accordion title="curl (local source and local or remote destination)">
18871892
In the following command, replace:
18881893

18891894
- `</full/path/to/local/filename.extension>` with the full path to the local file to upload.
@@ -1901,7 +1906,7 @@ the `POST` method to call the `/workflows/<workflow-id>/run` endpoint (for `curl
19011906
--form "input_files=@</full/path/to/local/filename.extension>;filename=<filename.extension>;type=<local-file-media-type>" # For each additional file to be uploaded.
19021907
```
19031908

1904-
To access the processed files' data, [download a processed local file](#download-a-processed-local-file-from-a-job) from the workflow's job run.
1909+
For a local destination, to access the processed files' data, [download a processed local file](#download-a-processed-local-file-from-a-job) from the workflow's job run.
19051910
</Accordion>
19061911
<Accordion title="Postman (remote source and remote destination)">
19071912
1. In the method drop-down list, select **POST**.
@@ -1918,16 +1923,7 @@ the `POST` method to call the `/workflows/<workflow-id>/run` endpoint (for `curl
19181923

19191924
4. Click **Send**.
19201925
</Accordion>
1921-
<Accordion title="Postman (local source and local destination)">
1922-
To run a workflow that uses a local source and local destination, the workflow must have already been created to use a local source and a local destination. Also,
1923-
the workflow must have already been created as a custom worklow, and the workflow cannot have been created to run on a schedule.
1924-
1925-
The workflow's source and destination must both be local. You cannot run a workflow that specifies a local source and a remote destination, nor can you run a worklow that specifies a remote source
1926-
and a local destination.
1927-
1928-
The Unstructured user interface (UI) and the Unstructured Python SDK currently do not support running workflows that use a local source
1929-
and a local destination.
1930-
1926+
<Accordion title="Postman (local source and local or remote destination)">
19311927
1. In the method drop-down list, select **POST**.
19321928
2. In the address box, enter the following URL:
19331929

@@ -1960,7 +1956,7 @@ the `POST` method to call the `/workflows/<workflow-id>/run` endpoint (for `curl
19601956

19611957
5. Click **Send**.
19621958

1963-
To access the processed files' data, [download a processed local file](#download-a-processed-local-file-from-a-job) from the workflow's job run.
1959+
For a local destination, to access the processed files' data, [download a processed local file](#download-a-processed-local-file-from-a-job) from the workflow's job run.
19641960
</Accordion>
19651961
</AccordionGroup>
19661962

0 commit comments

Comments
 (0)