Skip to content

Latest commit

 

History

History
396 lines (254 loc) · 10.1 KB

WebhookApi.md

File metadata and controls

396 lines (254 loc) · 10.1 KB

Apideck.Webhook

Class Name

WebhookApi

Methods

List Event Logs

Method: eventLogsAll

Apideck->getWebhookApi()->eventLogsAll($data)

Parameters

Name Type Description Notes
x_apideck_app_id string The ID of your Unify application
cursor string Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
filter \Apideck\Client\Model\WebhookEventLogsFilter Filter results
limit [int] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20

Response Type

\Apideck\Client\Model\GetWebhookEventLogsResponse

HTTP response details

Status code Description
200 EventLogs
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

<?php
require('vendor/autoload.php');

use Apideck\Client\Apideck;
use Apideck\Client\ApideckConfiguration;
use Apideck\Client\ApiException;

$config = new ApideckConfiguration('<insert-api-key-here>', '<insert-application-id-here>', '<insert-consumer-id-here>', '<insert-service-id-here>');

$apideck = new Apideck($config);

try {
  $response = $apideck->getWebhookApi()->eventLogsAll();
  var_dump('API called successfully', $response);
} catch(ApiException $error) {
  var_dump('API called failed', $error);
}

[Back to top] [Back to API list] [Back to README]

Create Webhook Subscription

Method: webhooksAdd

Apideck->getWebhookApi()->webhooksAdd($data)

Parameters

Name Type Description Notes
create_webhook_request \Apideck\Client\Model\CreateWebhookRequest
x_apideck_app_id string The ID of your Unify application

Response Type

\Apideck\Client\Model\CreateWebhookResponse

HTTP response details

Status code Description
201 Webhooks
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

<?php
require('vendor/autoload.php');

use Apideck\Client\Apideck;
use Apideck\Client\ApideckConfiguration;
use Apideck\Client\ApiException;

$config = new ApideckConfiguration('<insert-api-key-here>', '<insert-application-id-here>', '<insert-consumer-id-here>', '<insert-service-id-here>');

$apideck = new Apideck($config);

try {
  $response = $apideck->getWebhookApi()->webhooksAdd($webhook);
  var_dump('API called successfully', $response);
} catch(ApiException $error) {
  var_dump('API called failed', $error);
}

[Back to top] [Back to API list] [Back to README]

List Webhook Subscriptions

Method: webhooksAll

Apideck->getWebhookApi()->webhooksAll($data)

Parameters

Name Type Description Notes
x_apideck_app_id string The ID of your Unify application
cursor string Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
limit [int] Number of results to return. Minimum 1, Maximum 200, Default 20 (optional) defaults to 20

Response Type

\Apideck\Client\Model\GetWebhooksResponse

HTTP response details

Status code Description
200 Webhooks
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

<?php
require('vendor/autoload.php');

use Apideck\Client\Apideck;
use Apideck\Client\ApideckConfiguration;
use Apideck\Client\ApiException;

$config = new ApideckConfiguration('<insert-api-key-here>', '<insert-application-id-here>', '<insert-consumer-id-here>', '<insert-service-id-here>');

$apideck = new Apideck($config);

try {
  $response = $apideck->getWebhookApi()->webhooksAll();
  var_dump('API called successfully', $response);
} catch(ApiException $error) {
  var_dump('API called failed', $error);
}

[Back to top] [Back to API list] [Back to README]

Delete Webhook Subscription

Method: webhooksDelete

Apideck->getWebhookApi()->webhooksDelete($data)

Parameters

Name Type Description Notes
id string JWT Webhook token that represents the unifiedApi and applicationId associated to the event source.
x_apideck_app_id string The ID of your Unify application

Response Type

\Apideck\Client\Model\DeleteWebhookResponse

HTTP response details

Status code Description
200 Webhooks
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

<?php
require('vendor/autoload.php');

use Apideck\Client\Apideck;
use Apideck\Client\ApideckConfiguration;
use Apideck\Client\ApiException;

$config = new ApideckConfiguration('<insert-api-key-here>', '<insert-application-id-here>', '<insert-consumer-id-here>', '<insert-service-id-here>');

$apideck = new Apideck($config);

try {
  $response = $apideck->getWebhookApi()->webhooksDelete('id_example');
  var_dump('API called successfully', $response);
} catch(ApiException $error) {
  var_dump('API called failed', $error);
}

[Back to top] [Back to API list] [Back to README]

Get Webhook Subscription

Method: webhooksOne

Apideck->getWebhookApi()->webhooksOne($data)

Parameters

Name Type Description Notes
id string JWT Webhook token that represents the unifiedApi and applicationId associated to the event source.
x_apideck_app_id string The ID of your Unify application

Response Type

\Apideck\Client\Model\GetWebhookResponse

HTTP response details

Status code Description
200 Webhooks
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

<?php
require('vendor/autoload.php');

use Apideck\Client\Apideck;
use Apideck\Client\ApideckConfiguration;
use Apideck\Client\ApiException;

$config = new ApideckConfiguration('<insert-api-key-here>', '<insert-application-id-here>', '<insert-consumer-id-here>', '<insert-service-id-here>');

$apideck = new Apideck($config);

try {
  $response = $apideck->getWebhookApi()->webhooksOne('id_example');
  var_dump('API called successfully', $response);
} catch(ApiException $error) {
  var_dump('API called failed', $error);
}

[Back to top] [Back to API list] [Back to README]

Update Webhook Subscription

Method: webhooksUpdate

Apideck->getWebhookApi()->webhooksUpdate($data)

Parameters

Name Type Description Notes
id string JWT Webhook token that represents the unifiedApi and applicationId associated to the event source.
update_webhook_request \Apideck\Client\Model\UpdateWebhookRequest
x_apideck_app_id string The ID of your Unify application

Response Type

\Apideck\Client\Model\UpdateWebhookResponse

HTTP response details

Status code Description
200 Webhooks
400 Bad Request
401 Unauthorized
402 Payment Required
404 The specified resource was not found
422 Unprocessable
4/5xx Unexpected error

Example Usage

<?php
require('vendor/autoload.php');

use Apideck\Client\Apideck;
use Apideck\Client\ApideckConfiguration;
use Apideck\Client\ApiException;

$config = new ApideckConfiguration('<insert-api-key-here>', '<insert-application-id-here>', '<insert-consumer-id-here>', '<insert-service-id-here>');

$apideck = new Apideck($config);

try {
  $response = $apideck->getWebhookApi()->webhooksUpdate('id_example', $webhook);
  var_dump('API called successfully', $response);
} catch(ApiException $error) {
  var_dump('API called failed', $error);
}

[Back to top] [Back to API list] [Back to README]