Proxies a downstream GET request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization. Note: Vault will proxy all data to the downstream URL and method/verb in the headers.
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\ProxyGetProxyRequest(
serviceId: 'close',
unifiedApi: 'hris',
downstreamUrl: 'https://api.close.com/api/v1/lead',
downstreamAuthorization: 'Bearer <token>',
timeout: 30000,
);
$response = $sdk->proxy->get(
request: $request
);
if ($response->responseJson !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\ProxyGetProxyRequest | ✔️ | The request object to use for the request. |
?Operations\ProxyGetProxyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Unauthorized | 401 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Proxies a downstream OPTION request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization. Note: Vault will proxy all data to the downstream URL and method/verb in the headers.
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\ProxyOptionsProxyRequest(
serviceId: 'close',
unifiedApi: 'hris',
downstreamUrl: 'https://api.close.com/api/v1/lead',
downstreamAuthorization: 'Bearer <token>',
timeout: 30000,
);
$response = $sdk->proxy->options(
request: $request
);
if ($response->responseJson !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\ProxyOptionsProxyRequest | ✔️ | The request object to use for the request. |
?Operations\ProxyOptionsProxyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Unauthorized | 401 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Proxies a downstream POST request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization. Note: Vault will proxy all data to the downstream URL and method/verb in the headers.
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\ProxyPostProxyRequest(
serviceId: 'close',
unifiedApi: 'hris',
downstreamUrl: 'https://api.close.com/api/v1/lead',
downstreamAuthorization: 'Bearer <token>',
timeout: 30000,
);
$response = $sdk->proxy->post(
request: $request
);
if ($response->responseJson !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\ProxyPostProxyRequest | ✔️ | The request object to use for the request. |
?Operations\ProxyPostProxyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Unauthorized | 401 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Proxies a downstream PUT request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization. Note: Vault will proxy all data to the downstream URL and method/verb in the headers.
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\ProxyPutProxyRequest(
serviceId: 'close',
unifiedApi: 'hris',
downstreamUrl: 'https://api.close.com/api/v1/lead',
downstreamAuthorization: 'Bearer <token>',
timeout: 30000,
);
$response = $sdk->proxy->put(
request: $request
);
if ($response->responseJson !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\ProxyPutProxyRequest | ✔️ | The request object to use for the request. |
?Operations\ProxyPutProxyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Unauthorized | 401 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Proxies a downstream PATCH request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization. Note: Vault will proxy all data to the downstream URL and method/verb in the headers.
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\ProxyPatchProxyRequest(
serviceId: 'close',
unifiedApi: 'hris',
downstreamUrl: 'https://api.close.com/api/v1/lead',
downstreamAuthorization: 'Bearer <token>',
timeout: 30000,
);
$response = $sdk->proxy->patch(
request: $request
);
if ($response->responseJson !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\ProxyPatchProxyRequest | ✔️ | The request object to use for the request. |
?Operations\ProxyPatchProxyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Unauthorized | 401 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Proxies a downstream DELETE request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization. Note: Vault will proxy all data to the downstream URL and method/verb in the headers.
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\ProxyDeleteProxyRequest(
serviceId: 'close',
unifiedApi: 'hris',
downstreamUrl: 'https://api.close.com/api/v1/lead',
downstreamAuthorization: 'Bearer <token>',
timeout: 30000,
);
$response = $sdk->proxy->delete(
request: $request
);
if ($response->responseJson !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\ProxyDeleteProxyRequest | ✔️ | The request object to use for the request. |
?Operations\ProxyDeleteProxyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\Unauthorized | 401 | application/json |
| Errors\APIException | 4XX, 5XX | */* |