Skip to content

Latest commit

 

History

History
271 lines (193 loc) · 7.72 KB

WebhooksApi.md

File metadata and controls

271 lines (193 loc) · 7.72 KB

MimePost.WebhooksApi

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

Method HTTP request Description
webhooks_get GET /webhooks/ Get the list of all the webhooks
webhooks_id_delete DELETE /webhooks/{id} Remove a single webhook
webhooks_id_get GET /webhooks/{id} Get the details of a single webhook
webhooks_id_put PUT /webhooks/{id} Update the details of a single webhook
webhooks_post POST /webhooks/ Add single webhook

webhooks_get

ApiResponseAllWebhooks webhooks_get()

Get the list of all the webhooks

Example

from __future__ import print_function
import time
import MimePost
from MimePost.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = MimePost.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# create an instance of the API class
api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration))

try:
    # Get the list of all the webhooks
    api_response = api_instance.webhooks_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhooksApi->webhooks_get: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ApiResponseAllWebhooks

Authorization

api_key

HTTP request headers

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

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

webhooks_id_delete

ApiResponse webhooks_id_delete(id)

Remove a single webhook

Example

from __future__ import print_function
import time
import MimePost
from MimePost.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = MimePost.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# create an instance of the API class
api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration))
id = 56 # int | 

try:
    # Remove a single webhook
    api_response = api_instance.webhooks_id_delete(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhooksApi->webhooks_id_delete: %s\n" % e)

Parameters

Name Type Description Notes
id int

Return type

ApiResponse

Authorization

api_key

HTTP request headers

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

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

webhooks_id_get

ApiResponseSingleWebhooks webhooks_id_get(id)

Get the details of a single webhook

Example

from __future__ import print_function
import time
import MimePost
from MimePost.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = MimePost.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# create an instance of the API class
api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration))
id = 56 # int | 

try:
    # Get the details of a single webhook
    api_response = api_instance.webhooks_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhooksApi->webhooks_id_get: %s\n" % e)

Parameters

Name Type Description Notes
id int

Return type

ApiResponseSingleWebhooks

Authorization

api_key

HTTP request headers

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

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

webhooks_id_put

ApiResponseSingleWebhooks webhooks_id_put(id, webhook=webhook)

Update the details of a single webhook

Example

from __future__ import print_function
import time
import MimePost
from MimePost.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = MimePost.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# create an instance of the API class
api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration))
id = 56 # int | 
webhook = MimePost.Webhook1() # Webhook1 |  (optional)

try:
    # Update the details of a single webhook
    api_response = api_instance.webhooks_id_put(id, webhook=webhook)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhooksApi->webhooks_id_put: %s\n" % e)

Parameters

Name Type Description Notes
id int
webhook Webhook1 [optional]

Return type

ApiResponseSingleWebhooks

Authorization

api_key

HTTP request headers

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

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

webhooks_post

ApiResponseWebhooks webhooks_post(webhook=webhook)

Add single webhook

Example

from __future__ import print_function
import time
import MimePost
from MimePost.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = MimePost.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# create an instance of the API class
api_instance = MimePost.WebhooksApi(MimePost.ApiClient(configuration))
webhook = MimePost.Webhook() # Webhook |  (optional)

try:
    # Add single webhook
    api_response = api_instance.webhooks_post(webhook=webhook)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhooksApi->webhooks_post: %s\n" % e)

Parameters

Name Type Description Notes
webhook Webhook [optional]

Return type

ApiResponseWebhooks

Authorization

api_key

HTTP request headers

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

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