memos-script/docs/WebhookServiceApi.md
2024-04-30 10:31:09 +08:00

6.8 KiB

memos.WebhookServiceApi

All URIs are relative to /

Method HTTP request Description
webhook_service_create_webhook POST /api/v1/webhooks CreateWebhook creates a new webhook.
webhook_service_delete_webhook DELETE /api/v1/webhooks/{id} DeleteWebhook deletes a webhook by id.
webhook_service_get_webhook GET /api/v1/webhooks/{id} GetWebhook returns a webhook by id.
webhook_service_list_webhooks GET /api/v1/webhooks ListWebhooks returns a list of webhooks.
webhook_service_update_webhook PATCH /api/v1/webhooks/{webhook.id} UpdateWebhook updates a webhook.

webhook_service_create_webhook

V1Webhook webhook_service_create_webhook(body)

CreateWebhook creates a new webhook.

Example

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

# create an instance of the API class
api_instance = memos.WebhookServiceApi()
body = memos.V1CreateWebhookRequest() # V1CreateWebhookRequest | 

try:
    # CreateWebhook creates a new webhook.
    api_response = api_instance.webhook_service_create_webhook(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhookServiceApi->webhook_service_create_webhook: %s\n" % e)

Parameters

Name Type Description Notes
body V1CreateWebhookRequest

Return type

V1Webhook

Authorization

No authorization required

HTTP request headers

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

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

webhook_service_delete_webhook

object webhook_service_delete_webhook(id)

DeleteWebhook deletes a webhook by id.

Example

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

# create an instance of the API class
api_instance = memos.WebhookServiceApi()
id = 56 # int | 

try:
    # DeleteWebhook deletes a webhook by id.
    api_response = api_instance.webhook_service_delete_webhook(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhookServiceApi->webhook_service_delete_webhook: %s\n" % e)

Parameters

Name Type Description Notes
id int

Return type

object

Authorization

No authorization required

HTTP request headers

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

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

webhook_service_get_webhook

V1Webhook webhook_service_get_webhook(id)

GetWebhook returns a webhook by id.

Example

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

# create an instance of the API class
api_instance = memos.WebhookServiceApi()
id = 56 # int | 

try:
    # GetWebhook returns a webhook by id.
    api_response = api_instance.webhook_service_get_webhook(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhookServiceApi->webhook_service_get_webhook: %s\n" % e)

Parameters

Name Type Description Notes
id int

Return type

V1Webhook

Authorization

No authorization required

HTTP request headers

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

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

webhook_service_list_webhooks

V1ListWebhooksResponse webhook_service_list_webhooks(creator_id=creator_id)

ListWebhooks returns a list of webhooks.

Example

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

# create an instance of the API class
api_instance = memos.WebhookServiceApi()
creator_id = 56 # int |  (optional)

try:
    # ListWebhooks returns a list of webhooks.
    api_response = api_instance.webhook_service_list_webhooks(creator_id=creator_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhookServiceApi->webhook_service_list_webhooks: %s\n" % e)

Parameters

Name Type Description Notes
creator_id int [optional]

Return type

V1ListWebhooksResponse

Authorization

No authorization required

HTTP request headers

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

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

webhook_service_update_webhook

V1Webhook webhook_service_update_webhook(body, webhook_id)

UpdateWebhook updates a webhook.

Example

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

# create an instance of the API class
api_instance = memos.WebhookServiceApi()
body = memos.WebhooksWebhookIdBody() # WebhooksWebhookIdBody | 
webhook_id = 56 # int | 

try:
    # UpdateWebhook updates a webhook.
    api_response = api_instance.webhook_service_update_webhook(body, webhook_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WebhookServiceApi->webhook_service_update_webhook: %s\n" % e)

Parameters

Name Type Description Notes
body WebhooksWebhookIdBody
webhook_id int

Return type

V1Webhook

Authorization

No authorization required

HTTP request headers

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

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