From 00d4ffe1a5eb5b61eef30ea33c45af21cb2efb9c Mon Sep 17 00:00:00 2001 From: Paul Cornell Date: Thu, 17 Apr 2025 15:17:16 -0700 Subject: [PATCH] Workflow Endpoint: how to test connectors --- api-reference/workflow/overview.mdx | 136 +++++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 2 deletions(-) diff --git a/api-reference/workflow/overview.mdx b/api-reference/workflow/overview.mdx index 23ad8a5e..c76bda4f 100644 --- a/api-reference/workflow/overview.mdx +++ b/api-reference/workflow/overview.mdx @@ -209,12 +209,14 @@ You can [list](#list-source-connectors), [get](#get-a-source-connector), [create](#create-a-source-connector), [update](#update-a-source-connector), -and [delete](#delete-a-source-connector) source connectors. +[delete](#delete-a-source-connector), and +[test](#test-a-source-connector) source connectors. You can also [list](#list-destination-connectors), [get](#get-a-destination-connector), [create](#create-a-destination-connector), [update](#update-a-destination-connector), -and [delete](#delete-a-destination-connector) destination connectors. +[delete](#delete-a-destination-connector), and +[test](#test-a-destination-connector) destination connectors. For general information, see [Connectors](/ui/connectors). @@ -749,6 +751,70 @@ the `DELETE` method to call the `/sources/` endpoint (for `curl` o +### Test a source connector + +To test a source connector, use the `POST` method to call the `/sources//connection-check` endpoint (for `curl` or Postman), replacing +`` with the connector's unique ID. To get this ID, see [List source connectors](#list-source-connectors). + +The Python SDK does not support testing source connectors. + + + + ```bash + curl --request 'POST' --location \ + "$UNSTRUCTURED_API_URL/sources//connection-check" \ + --header 'accept: application/json' \ + --header "unstructured-api-key: $UNSTRUCTURED_API_KEY" + ``` + + + 1. In the method drop-down list, select **POST**. + 2. In the address box, enter the following URL: + + ```text + {{UNSTRUCTURED_API_URL}}/sources//connection-check + ``` + + 3. On the **Headers** tab, enter the following headers: + + - **Key**: `unstructured-api-key`, **Value**: `{{UNSTRUCTURED_API_KEY}}` + - **Key**: `accept`, **Value**: `application/json` + + 4. Click **Send**. + + + +To get information about the most recent connector check for a source connector, use the `GET` method to call the `/sources//connection-check` endpoint (for `curl` or Postman), replacing +`` with the connector's unique ID. To get this ID, see [List source connectors](#list-source-connectors). + +The Python SDK does not support getting information about the most recent connector check for a source connector. + + + + ```bash + curl --request 'GET' --location \ + "$UNSTRUCTURED_API_URL/sources//connection-check" \ + --header 'accept: application/json' \ + --header "unstructured-api-key: $UNSTRUCTURED_API_KEY" + ``` + + + 1. In the method drop-down list, select **GET**. + 2. In the address box, enter the following URL: + + ```text + {{UNSTRUCTURED_API_URL}}/sources//connection-check + ``` + + 3. On the **Headers** tab, enter the following headers: + + - **Key**: `unstructured-api-key`, **Value**: `{{UNSTRUCTURED_API_KEY}}` + - **Key**: `accept`, **Value**: `application/json` + + 4. Click **Send**. + + + ### List destination connectors 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/` endpoint (for `cu +### Test a destination connector + +To test a destination connector, use the `POST` method to call the `/destinations//connection-check` endpoint (for `curl` or Postman), replacing +`` with the connector's unique ID. To get this ID, see +[List destination connectors](#list-destination-connectors). + +The Python SDK does not support testing destination connectors. + + + + ```bash + curl --request 'POST' --location \ + "$UNSTRUCTURED_API_URL/destinations//connection-check" \ + --header 'accept: application/json' \ + --header "unstructured-api-key: $UNSTRUCTURED_API_KEY" + ``` + + + 1. In the method drop-down list, select **POST**. + 2. In the address box, enter the following URL: + + ```text + {{UNSTRUCTURED_API_URL}}/destinations//connection-check + ``` + + 3. On the **Headers** tab, enter the following headers: + + - **Key**: `unstructured-api-key`, **Value**: `{{UNSTRUCTURED_API_KEY}}` + - **Key**: `accept`, **Value**: `application/json` + + 4. Click **Send**. + + + +To get information about the most recent connector check for a destination connector, use the `GET` method to call the `/destinations//connection-check` endpoint (for `curl` or Postman), replacing +`` with the connector's unique ID. To get this ID, see +[List destination connectors](#list-destination-connectors). + +The Python SDK does not support getting information about the most recent connector check for a destination connector. + + + + ```bash + curl --request 'GET' --location \ + "$UNSTRUCTURED_API_URL/destinations//connection-check" \ + --header 'accept: application/json' \ + --header "unstructured-api-key: $UNSTRUCTURED_API_KEY" + ``` + + + 1. In the method drop-down list, select **GET**. + 2. In the address box, enter the following URL: + + ```text + {{UNSTRUCTURED_API_URL}}/destinations//connection-check + ``` + + 3. On the **Headers** tab, enter the following headers: + + - **Key**: `unstructured-api-key`, **Value**: `{{UNSTRUCTURED_API_KEY}}` + - **Key**: `accept`, **Value**: `application/json` + + 4. Click **Send**. + + + ## Workflows You can [list](#list-workflows),