7.0 KiB
memos.WebhookServiceApi
All URIs are relative to /
| Method | HTTP request | Description |
|---|---|---|
| webhook_service_create_webhook | POST /api/v2/webhooks | CreateWebhook creates a new webhook. |
| webhook_service_delete_webhook | DELETE /api/v2/webhooks/{id} | DeleteWebhook deletes a webhook by id. |
| webhook_service_get_webhook | GET /api/v2/webhooks/{id} | GetWebhook returns a webhook by id. |
| webhook_service_list_webhooks | GET /api/v2/webhooks | ListWebhooks returns a list of webhooks. |
| webhook_service_update_webhook | PATCH /api/v2/webhooks/{webhook.id} | UpdateWebhook updates a webhook. |
webhook_service_create_webhook
V2CreateWebhookResponse 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.V2CreateWebhookRequest() # V2CreateWebhookRequest |
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 | V2CreateWebhookRequest |
Return type
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
V2DeleteWebhookResponse 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
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
V2GetWebhookResponse 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
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
V2ListWebhooksResponse 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
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
V2UpdateWebhookResponse 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
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]