Skip to content

Latest commit

 

History

History
104 lines (71 loc) · 6.97 KB

README.md

File metadata and controls

104 lines (71 loc) · 6.97 KB

Connectors

(connector.connectors)

Overview

Available Operations

  • list - List Connectors
  • get - Get Connector

list

List Connectors

Example Usage

import apideck_unify
from apideck_unify import Apideck
import os

with Apideck(
    api_key=os.getenv("APIDECK_API_KEY", ""),
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:

    res = apideck.connector.connectors.list(filter_={
        "unified_api": apideck_unify.UnifiedAPIID.FILE_STORAGE,
    })

    while res is not None:
        # Handle items

        res = res.next()

Parameters

Parameter Type Required Description Example
cursor OptionalNullable[str] Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
limit Optional[int] Number of results to return. Minimum 1, Maximum 200, Default 20
filter_ Optional[models.ConnectorsFilter] Apply filters {
"unified_api": "file-storage"
}
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ConnectorConnectorsAllResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.APIError 4XX, 5XX */*

get

Get Connector

Example Usage

from apideck_unify import Apideck
import os

with Apideck(
    api_key=os.getenv("APIDECK_API_KEY", ""),
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:

    res = apideck.connector.connectors.get(id="<id>")

    assert res.get_connector_response is not None

    # Handle response
    print(res.get_connector_response)

Parameters

Parameter Type Required Description
id str ✔️ ID of the record you are acting upon.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.ConnectorConnectorsOneResponse

Errors

Error Type Status Code Content Type
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.APIError 4XX, 5XX */*