Skip to content

Latest commit

 

History

History
526 lines (414 loc) · 17.9 KB

WebhookApi.md

File metadata and controls

526 lines (414 loc) · 17.9 KB

Apideck.Api.WebhookApi

All URIs are relative to https://unify.apideck.com

Method HTTP request Description
EventLogsAll GET /webhook/logs List event logs
WebhooksAdd POST /webhook/webhooks Create webhook subscription
WebhooksAll GET /webhook/webhooks List webhook subscriptions
WebhooksDelete DELETE /webhook/webhooks/{id} Delete webhook subscription
WebhooksOne GET /webhook/webhooks/{id} Get webhook subscription
WebhooksUpdate PATCH /webhook/webhooks/{id} Update webhook subscription

EventLogsAll

GetWebhookEventLogsResponse EventLogsAll (string appId = null, string cursor = null, int? limit = null, WebhookEventLogsFilter filter = null)

List event logs

List event logs

Example

using System.Collections.Generic;
using System.Diagnostics;
using Apideck.Api;
using Apideck.Client;
using Apideck.Model;

namespace Example
{
    public class EventLogsAllExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://unify.apideck.com";
            // Configure API key authorization: apiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(config);
            var appId = dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX;  // string | The ID of your Unify application (optional) 
            var cursor = "cursor_example";  // string | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional) 
            var limit = 20;  // int? | Number of results to return. Minimum 1, Maximum 200, Default 20 (optional)  (default to 20)
            var filter = new WebhookEventLogsFilter(); // WebhookEventLogsFilter | Filter results (optional) 

            try
            {
                // List event logs
                GetWebhookEventLogsResponse result = apiInstance.EventLogsAll(appId, cursor, limit, filter);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookApi.EventLogsAll: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

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

Return type

GetWebhookEventLogsResponse

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 EventLogs -
400 Bad Request -
401 Unauthorized -
402 Payment Required -
404 The specified resource was not found -
422 Unprocessable -
0 Unexpected error -

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

WebhooksAdd

CreateWebhookResponse WebhooksAdd (CreateWebhookRequest createWebhookRequest, string appId = null)

Create webhook subscription

Create a webhook subscription to receive events

Example

using System.Collections.Generic;
using System.Diagnostics;
using Apideck.Api;
using Apideck.Client;
using Apideck.Model;

namespace Example
{
    public class WebhooksAddExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://unify.apideck.com";
            // Configure API key authorization: apiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(config);
            var createWebhookRequest = new CreateWebhookRequest(); // CreateWebhookRequest | 
            var appId = dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX;  // string | The ID of your Unify application (optional) 

            try
            {
                // Create webhook subscription
                CreateWebhookResponse result = apiInstance.WebhooksAdd(createWebhookRequest, appId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookApi.WebhooksAdd: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
createWebhookRequest CreateWebhookRequest
appId string The ID of your Unify application [optional]

Return type

CreateWebhookResponse

Authorization

apiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Webhooks -
400 Bad Request -
401 Unauthorized -
402 Payment Required -
404 The specified resource was not found -
422 Unprocessable -
0 Unexpected error -

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

WebhooksAll

GetWebhooksResponse WebhooksAll (string appId = null, string cursor = null, int? limit = null)

List webhook subscriptions

List all webhook subscriptions

Example

using System.Collections.Generic;
using System.Diagnostics;
using Apideck.Api;
using Apideck.Client;
using Apideck.Model;

namespace Example
{
    public class WebhooksAllExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://unify.apideck.com";
            // Configure API key authorization: apiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(config);
            var appId = dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX;  // string | The ID of your Unify application (optional) 
            var cursor = "cursor_example";  // string | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. (optional) 
            var limit = 20;  // int? | Number of results to return. Minimum 1, Maximum 200, Default 20 (optional)  (default to 20)

            try
            {
                // List webhook subscriptions
                GetWebhooksResponse result = apiInstance.WebhooksAll(appId, cursor, limit);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookApi.WebhooksAll: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

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

Return type

GetWebhooksResponse

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Webhooks -
400 Bad Request -
401 Unauthorized -
402 Payment Required -
404 The specified resource was not found -
422 Unprocessable -
0 Unexpected error -

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

WebhooksDelete

DeleteWebhookResponse WebhooksDelete (string id, string appId = null)

Delete webhook subscription

Delete a webhook subscription

Example

using System.Collections.Generic;
using System.Diagnostics;
using Apideck.Api;
using Apideck.Client;
using Apideck.Model;

namespace Example
{
    public class WebhooksDeleteExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://unify.apideck.com";
            // Configure API key authorization: apiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(config);
            var id = "id_example";  // string | JWT Webhook token that represents the unifiedApi and applicationId associated to the event source.
            var appId = dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX;  // string | The ID of your Unify application (optional) 

            try
            {
                // Delete webhook subscription
                DeleteWebhookResponse result = apiInstance.WebhooksDelete(id, appId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookApi.WebhooksDelete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

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

Return type

DeleteWebhookResponse

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Webhooks -
400 Bad Request -
401 Unauthorized -
402 Payment Required -
404 The specified resource was not found -
422 Unprocessable -
0 Unexpected error -

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

WebhooksOne

GetWebhookResponse WebhooksOne (string id, string appId = null)

Get webhook subscription

Get the webhook subscription details

Example

using System.Collections.Generic;
using System.Diagnostics;
using Apideck.Api;
using Apideck.Client;
using Apideck.Model;

namespace Example
{
    public class WebhooksOneExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://unify.apideck.com";
            // Configure API key authorization: apiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(config);
            var id = "id_example";  // string | JWT Webhook token that represents the unifiedApi and applicationId associated to the event source.
            var appId = dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX;  // string | The ID of your Unify application (optional) 

            try
            {
                // Get webhook subscription
                GetWebhookResponse result = apiInstance.WebhooksOne(id, appId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookApi.WebhooksOne: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

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

Return type

GetWebhookResponse

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Webhooks -
400 Bad Request -
401 Unauthorized -
402 Payment Required -
404 The specified resource was not found -
422 Unprocessable -
0 Unexpected error -

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

WebhooksUpdate

UpdateWebhookResponse WebhooksUpdate (string id, UpdateWebhookRequest updateWebhookRequest, string appId = null)

Update webhook subscription

Update a webhook subscription

Example

using System.Collections.Generic;
using System.Diagnostics;
using Apideck.Api;
using Apideck.Client;
using Apideck.Model;

namespace Example
{
    public class WebhooksUpdateExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://unify.apideck.com";
            // Configure API key authorization: apiKey
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(config);
            var id = "id_example";  // string | JWT Webhook token that represents the unifiedApi and applicationId associated to the event source.
            var updateWebhookRequest = new UpdateWebhookRequest(); // UpdateWebhookRequest | 
            var appId = dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX;  // string | The ID of your Unify application (optional) 

            try
            {
                // Update webhook subscription
                UpdateWebhookResponse result = apiInstance.WebhooksUpdate(id, updateWebhookRequest, appId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookApi.WebhooksUpdate: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
id string JWT Webhook token that represents the unifiedApi and applicationId associated to the event source.
updateWebhookRequest UpdateWebhookRequest
appId string The ID of your Unify application [optional]

Return type

UpdateWebhookResponse

Authorization

apiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Webhooks -
400 Bad Request -
401 Unauthorized -
402 Payment Required -
404 The specified resource was not found -
422 Unprocessable -
0 Unexpected error -

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