Skip to content

Commit afffa96

Browse files
authored
Workflow Endpoint: how to test connectors (#597)
1 parent 23d341f commit afffa96

File tree

1 file changed

+134
-2
lines changed

1 file changed

+134
-2
lines changed

api-reference/workflow/overview.mdx

Lines changed: 134 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,14 @@ You can [list](#list-source-connectors),
209209
[get](#get-a-source-connector),
210210
[create](#create-a-source-connector),
211211
[update](#update-a-source-connector),
212-
and [delete](#delete-a-source-connector) source connectors.
212+
[delete](#delete-a-source-connector), and
213+
[test](#test-a-source-connector) source connectors.
213214
You can also [list](#list-destination-connectors),
214215
[get](#get-a-destination-connector),
215216
[create](#create-a-destination-connector),
216217
[update](#update-a-destination-connector),
217-
and [delete](#delete-a-destination-connector) destination connectors.
218+
[delete](#delete-a-destination-connector), and
219+
[test](#test-a-destination-connector) destination connectors.
218220

219221
For general information, see [Connectors](/ui/connectors).
220222

@@ -749,6 +751,70 @@ the `DELETE` method to call the `/sources/<connector-id>` endpoint (for `curl` o
749751
</Accordion>
750752
</AccordionGroup>
751753

754+
### Test a source connector
755+
756+
To test a source connector, use the `POST` method to call the `/sources/<connector-id>/connection-check` endpoint (for `curl` or Postman), replacing
757+
`<connector-id>` with the connector's unique ID. To get this ID, see [List source connectors](#list-source-connectors).
758+
759+
The Python SDK does not support testing source connectors.
760+
761+
<AccordionGroup>
762+
<Accordion title="curl">
763+
```bash
764+
curl --request 'POST' --location \
765+
"$UNSTRUCTURED_API_URL/sources/<connector-id>/connection-check" \
766+
--header 'accept: application/json' \
767+
--header "unstructured-api-key: $UNSTRUCTURED_API_KEY"
768+
```
769+
</Accordion>
770+
<Accordion title="Postman">
771+
1. In the method drop-down list, select **POST**.
772+
2. In the address box, enter the following URL:
773+
774+
```text
775+
{{UNSTRUCTURED_API_URL}}/sources/<connector-id>/connection-check
776+
```
777+
778+
3. On the **Headers** tab, enter the following headers:
779+
780+
- **Key**: `unstructured-api-key`, **Value**: `{{UNSTRUCTURED_API_KEY}}`
781+
- **Key**: `accept`, **Value**: `application/json`
782+
783+
4. Click **Send**.
784+
</Accordion>
785+
</AccordionGroup>
786+
787+
To get information about the most recent connector check for a source connector, use the `GET` method to call the `/sources/<connector-id>/connection-check` endpoint (for `curl` or Postman), replacing
788+
`<connector-id>` with the connector's unique ID. To get this ID, see [List source connectors](#list-source-connectors).
789+
790+
The Python SDK does not support getting information about the most recent connector check for a source connector.
791+
792+
<AccordionGroup>
793+
<Accordion title="curl">
794+
```bash
795+
curl --request 'GET' --location \
796+
"$UNSTRUCTURED_API_URL/sources/<connector-id>/connection-check" \
797+
--header 'accept: application/json' \
798+
--header "unstructured-api-key: $UNSTRUCTURED_API_KEY"
799+
```
800+
</Accordion>
801+
<Accordion title="Postman">
802+
1. In the method drop-down list, select **GET**.
803+
2. In the address box, enter the following URL:
804+
805+
```text
806+
{{UNSTRUCTURED_API_URL}}/sources/<connector-id>/connection-check
807+
```
808+
809+
3. On the **Headers** tab, enter the following headers:
810+
811+
- **Key**: `unstructured-api-key`, **Value**: `{{UNSTRUCTURED_API_KEY}}`
812+
- **Key**: `accept`, **Value**: `application/json`
813+
814+
4. Click **Send**.
815+
</Accordion>
816+
</AccordionGroup>
817+
752818
### List destination connectors
753819

754820
To list destination connectors, use the `UnstructuredClient` object's `destinations.list_destinations` function (for the Python SDK) or
@@ -1274,6 +1340,72 @@ the `DELETE` method to call the `/destinations/<connector-id>` endpoint (for `cu
12741340
</Accordion>
12751341
</AccordionGroup>
12761342

1343+
### Test a destination connector
1344+
1345+
To test a destination connector, use the `POST` method to call the `/destinations/<connector-id>/connection-check` endpoint (for `curl` or Postman), replacing
1346+
`<connector-id>` with the connector's unique ID. To get this ID, see
1347+
[List destination connectors](#list-destination-connectors).
1348+
1349+
The Python SDK does not support testing destination connectors.
1350+
1351+
<AccordionGroup>
1352+
<Accordion title="curl">
1353+
```bash
1354+
curl --request 'POST' --location \
1355+
"$UNSTRUCTURED_API_URL/destinations/<connector-id>/connection-check" \
1356+
--header 'accept: application/json' \
1357+
--header "unstructured-api-key: $UNSTRUCTURED_API_KEY"
1358+
```
1359+
</Accordion>
1360+
<Accordion title="Postman">
1361+
1. In the method drop-down list, select **POST**.
1362+
2. In the address box, enter the following URL:
1363+
1364+
```text
1365+
{{UNSTRUCTURED_API_URL}}/destinations/<connector-id>/connection-check
1366+
```
1367+
1368+
3. On the **Headers** tab, enter the following headers:
1369+
1370+
- **Key**: `unstructured-api-key`, **Value**: `{{UNSTRUCTURED_API_KEY}}`
1371+
- **Key**: `accept`, **Value**: `application/json`
1372+
1373+
4. Click **Send**.
1374+
</Accordion>
1375+
</AccordionGroup>
1376+
1377+
To get information about the most recent connector check for a destination connector, use the `GET` method to call the `/destinations/<connector-id>/connection-check` endpoint (for `curl` or Postman), replacing
1378+
`<connector-id>` with the connector's unique ID. To get this ID, see
1379+
[List destination connectors](#list-destination-connectors).
1380+
1381+
The Python SDK does not support getting information about the most recent connector check for a destination connector.
1382+
1383+
<AccordionGroup>
1384+
<Accordion title="curl">
1385+
```bash
1386+
curl --request 'GET' --location \
1387+
"$UNSTRUCTURED_API_URL/destinations/<connector-id>/connection-check" \
1388+
--header 'accept: application/json' \
1389+
--header "unstructured-api-key: $UNSTRUCTURED_API_KEY"
1390+
```
1391+
</Accordion>
1392+
<Accordion title="Postman">
1393+
1. In the method drop-down list, select **GET**.
1394+
2. In the address box, enter the following URL:
1395+
1396+
```text
1397+
{{UNSTRUCTURED_API_URL}}/destinations/<connector-id>/connection-check
1398+
```
1399+
1400+
3. On the **Headers** tab, enter the following headers:
1401+
1402+
- **Key**: `unstructured-api-key`, **Value**: `{{UNSTRUCTURED_API_KEY}}`
1403+
- **Key**: `accept`, **Value**: `application/json`
1404+
1405+
4. Click **Send**.
1406+
</Accordion>
1407+
</AccordionGroup>
1408+
12771409
## Workflows
12781410

12791411
You can [list](#list-workflows),

0 commit comments

Comments
 (0)