Skip to content

Latest commit

 

History

History
276 lines (203 loc) · 7.45 KB

WebhooksApi.md

File metadata and controls

276 lines (203 loc) · 7.45 KB

WebhooksApi

All URIs are relative to https://api.mimepost.com/v1/

Method HTTP request Description
webhooksGet GET /webhooks/ Get the list of all the webhooks
webhooksIdDelete DELETE /webhooks/{id} Remove a single webhook
webhooksIdGet GET /webhooks/{id} Get the details of a single webhook
webhooksIdPut PUT /webhooks/{id} Update the details of a single webhook
webhooksPost POST /webhooks/ Add single webhook

webhooksGet

ApiResponseAllWebhooks webhooksGet()

Get the list of all the webhooks

Example

// Import classes:
//import com.mimepost.ApiClient;
//import com.mimepost.ApiException;
//import com.mimepost.Configuration;
//import com.mimepost.auth.*;
//import io.swagger.client.api.WebhooksApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

WebhooksApi apiInstance = new WebhooksApi();
try {
    ApiResponseAllWebhooks result = apiInstance.webhooksGet();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#webhooksGet");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiResponseAllWebhooks

Authorization

api_key

HTTP request headers

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

webhooksIdDelete

ModelApiResponse webhooksIdDelete(id)

Remove a single webhook

Example

// Import classes:
//import com.mimepost.ApiClient;
//import com.mimepost.ApiException;
//import com.mimepost.Configuration;
//import com.mimepost.auth.*;
//import io.swagger.client.api.WebhooksApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

WebhooksApi apiInstance = new WebhooksApi();
Integer id = 56; // Integer | 
try {
    ModelApiResponse result = apiInstance.webhooksIdDelete(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#webhooksIdDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer

Return type

ModelApiResponse

Authorization

api_key

HTTP request headers

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

webhooksIdGet

ApiResponseSingleWebhooks webhooksIdGet(id)

Get the details of a single webhook

Example

// Import classes:
//import com.mimepost.ApiClient;
//import com.mimepost.ApiException;
//import com.mimepost.Configuration;
//import com.mimepost.auth.*;
//import io.swagger.client.api.WebhooksApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

WebhooksApi apiInstance = new WebhooksApi();
Integer id = 56; // Integer | 
try {
    ApiResponseSingleWebhooks result = apiInstance.webhooksIdGet(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#webhooksIdGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer

Return type

ApiResponseSingleWebhooks

Authorization

api_key

HTTP request headers

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

webhooksIdPut

ApiResponseSingleWebhooks webhooksIdPut(id, webhook)

Update the details of a single webhook

Example

// Import classes:
//import com.mimepost.ApiClient;
//import com.mimepost.ApiException;
//import com.mimepost.Configuration;
//import com.mimepost.auth.*;
//import io.swagger.client.api.WebhooksApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

WebhooksApi apiInstance = new WebhooksApi();
Integer id = 56; // Integer | 
Webhook1 webhook = new Webhook1(); // Webhook1 | 
try {
    ApiResponseSingleWebhooks result = apiInstance.webhooksIdPut(id, webhook);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#webhooksIdPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer
webhook Webhook1 [optional]

Return type

ApiResponseSingleWebhooks

Authorization

api_key

HTTP request headers

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

webhooksPost

ApiResponseWebhooks webhooksPost(webhook)

Add single webhook

Example

// Import classes:
//import com.mimepost.ApiClient;
//import com.mimepost.ApiException;
//import com.mimepost.Configuration;
//import com.mimepost.auth.*;
//import io.swagger.client.api.WebhooksApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

WebhooksApi apiInstance = new WebhooksApi();
Webhook webhook = new Webhook(); // Webhook | 
try {
    ApiResponseWebhooks result = apiInstance.webhooksPost(webhook);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling WebhooksApi#webhooksPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
webhook Webhook [optional]

Return type

ApiResponseWebhooks

Authorization

api_key

HTTP request headers

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