Skip to content

Latest commit

 

History

History
316 lines (236 loc) · 7.57 KB

WebhooksApi.md

File metadata and controls

316 lines (236 loc) · 7.57 KB

IO.Swagger.Api.WebhooksApi

All URIs are relative to https://api.bombbomb.com/v2

Method HTTP request Description
AddWebHook POST /webhook Add Webhook
DeleteWebHook DELETE /webhook/{hookId} Deletes Webhook
GetWebHooks GET /webhook/ Lists Webhooks
ListWebHookEvents GET /webhook/events Describe WebHook Events
SendWebhookExample POST /webhook/test Sends test Webhook

AddWebHook

BBWebHook AddWebHook (string hookUrl)

Add Webhook

Idempotently adds a Webhook url

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class AddWebHookExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: BBOAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WebhooksApi();
            var hookUrl = hookUrl_example;  // string | The Url of your listener

            try
            {
                // Add Webhook
                BBWebHook result = apiInstance.AddWebHook(hookUrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.AddWebHook: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
hookUrl string The Url of your listener

Return type

BBWebHook

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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

DeleteWebHook

string DeleteWebHook (string hookId)

Deletes Webhook

Deletes a Webhook

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class DeleteWebHookExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: BBOAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WebhooksApi();
            var hookId = hookId_example;  // string | The id of the webhook to delete

            try
            {
                // Deletes Webhook
                string result = apiInstance.DeleteWebHook(hookId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.DeleteWebHook: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
hookId string The id of the webhook to delete

Return type

string

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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

GetWebHooks

List GetWebHooks ()

Lists Webhooks

Lists all registered Webhooks

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class GetWebHooksExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: BBOAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WebhooksApi();

            try
            {
                // Lists Webhooks
                List<BBWebHook> result = apiInstance.GetWebHooks();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.GetWebHooks: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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

ListWebHookEvents

void ListWebHookEvents ()

Describe WebHook Events

Returns example Webhook events for each kind of possible event.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class ListWebHookEventsExample
    {
        public void main()
        {
            var apiInstance = new WebhooksApi();

            try
            {
                // Describe WebHook Events
                apiInstance.ListWebHookEvents();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.ListWebHookEvents: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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

SendWebhookExample

void SendWebhookExample ()

Sends test Webhook

Triggers a test webhook to be sent to your endpoints.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class SendWebhookExampleExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: BBOAuth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WebhooksApi();

            try
            {
                // Sends test Webhook
                apiInstance.SendWebhookExample();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.SendWebhookExample: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

BBOAuth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

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