- list - List notifiers
- create - Create a notifier
- get - Retrieve a notifier
- delete - Delete a notifier
- update - Update a notifier
Returns notifier destinations visible to the caller, ordered by creation time with the newest notifier first.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.notifiers.list(type_=[
"NOTIFIER_TYPE_SLACK_WEBHOOK",
])
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
limit |
Optional[int] |
➖ |
Optional. Number of notifiers to return. Defaults to 25 and must be between 1 and 200. |
starting_after |
Optional[str] |
➖ |
Cursor for forward pagination. Set to the _id of the last item from the previous page. |
ending_before |
Optional[str] |
➖ |
Cursor for backward pagination. Set to the _id of the first item from the previous page. |
project_id |
Optional[str] |
➖ |
Restrict results to one project. Must be a project the caller is authorized for. |
search |
Optional[str] |
➖ |
Optional. Case-insensitive substring match on the notifier name. |
type |
List[models.NotifierType] |
➖ |
Optional. Restrict results to these notifier types. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.ListNotifiersResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Creates a notifier destination in a project. Choose NOTIFIER_TYPE_EMAIL, NOTIFIER_TYPE_SLACK_WEBHOOK, or NOTIFIER_TYPE_WEBHOOK and provide the matching destination fields.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.notifiers.create(request={
"type": "NOTIFIER_TYPE_UNSPECIFIED",
"incoming_webhook_url": "https://far-wear.org/",
"display_name": "Dennis48",
})
# Handle response
print(res)
models.CreateNotifierResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Retrieves an existing notifier by ID.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.notifiers.get(notifier_id="<id>")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
notifier_id |
str |
✔️ |
N/A |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.GetNotifierResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Deletes an existing notifier by ID.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.notifiers.delete(notifier_id="<id>")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
notifier_id |
str |
✔️ |
N/A |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
models.DeleteNotifierResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |
Partially updates an existing notifier. When changing type, provide the destination fields required by the new notifier type.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.notifiers.update(notifier_id="<id>", type_="NOTIFIER_TYPE_SLACK_WEBHOOK")
# Handle response
print(res)
| Parameter |
Type |
Required |
Description |
Example |
notifier_id |
str |
✔️ |
N/A |
|
project_id |
Optional[str] |
➖ |
Optional. New containing project. Workspace-scoped callers may set an empty value to make the notifier workspace-wide. Project-scoped API keys remain pinned to the API key's project. |
|
display_name |
Optional[str] |
➖ |
Optional. New human-readable notifier name. |
|
metadata |
Optional[models.UpdateNotifierRequestMetadata] |
➖ |
Optional. Replacement custom JSON metadata. |
|
type |
Optional[models.NotifierType] |
➖ |
N/A |
NOTIFIER_TYPE_SLACK_WEBHOOK |
emails |
List[str] |
➖ |
Optional replacement email recipients. Required when changing type to NOTIFIER_TYPE_EMAIL. |
|
incoming_webhook_url |
Optional[str] |
➖ |
Optional replacement Slack incoming webhook URL. Required when changing type to NOTIFIER_TYPE_SLACK_WEBHOOK. |
|
webhook_url |
Optional[str] |
➖ |
Optional replacement generic webhook URL. Required when changing type to NOTIFIER_TYPE_WEBHOOK. |
|
headers |
Optional[models.Headers] |
➖ |
Optional replacement generic webhook headers. Secret header values returned by GET or LIST are masked as an empty string; omit those entries or replace them with the real value when updating. |
|
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
|
models.UpdateNotifierResponse
| Error Type |
Status Code |
Content Type |
| models.APIDefaultError |
4XX, 5XX |
*/* |