(connector->connectors)
List Connectors
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
$sdk = Unify\Apideck::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->build();
$filter = new Components\ConnectorsFilter(
unifiedApi: Components\UnifiedApiId::FileStorage,
);
$responses = $sdk->connector->connectors->list(
appId: 'dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX',
limit: 20,
filter: $filter,
cursor: '<value>'
);
foreach ($responses as $response) {
if ($response->httpMeta->response->getStatusCode() === 200) {
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
appId |
?string | ➖ | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX |
limit |
?int | ➖ | Number of results to return. Minimum 1, Maximum 200, Default 20 | |
filter |
?Components\ConnectorsFilter | ➖ | Apply filters | { "unified_api": "file-storage" } |
cursor |
?string | ➖ | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. |
?Operations\ConnectorConnectorsAllResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\BadRequestResponse | 400 | application/json |
Errors\UnauthorizedResponse | 401 | application/json |
Errors\PaymentRequiredResponse | 402 | application/json |
Errors\APIException | 4XX, 5XX | */* |
Get Connector
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
$sdk = Unify\Apideck::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->build();
$response = $sdk->connector->connectors->get(
id: '<id>',
appId: 'dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX'
);
if ($response->getConnectorResponse !== null) {
// handle response
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
id |
string | ✔️ | ID of the record you are acting upon. | |
appId |
?string | ➖ | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX |
?Operations\ConnectorConnectorsOneResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\UnauthorizedResponse | 401 | application/json |
Errors\PaymentRequiredResponse | 402 | application/json |
Errors\NotFoundResponse | 404 | application/json |
Errors\APIException | 4XX, 5XX | */* |