Notifiers
List Notifiers
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()
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.notifiers.list();
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"project_id": Optional[str],
"search": Optional[str],
"type": List[Literal["NOTIFIER_TYPE_UNSPECIFIED", "NOTIFIER_TYPE_EMAIL", "NOTIFIER_TYPE_SLACK_WEBHOOK", "NOTIFIER_TYPE_WEBHOOK"]], # optional
}
{
limit?: number;
startingAfter?: string;
endingBefore?: string;
projectId?: string;
search?: string;
type?: ("NOTIFIER_TYPE_UNSPECIFIED" | "NOTIFIER_TYPE_EMAIL" | "NOTIFIER_TYPE_SLACK_WEBHOOK" | "NOTIFIER_TYPE_WEBHOOK")[];
}
Show Response
Show Response
{
"object": str,
"data": List[Union[EmailNotifier, SlackWebhookNotifier, GenericWebhookNotifier]],
"has_more": bool,
}
{
object: string;
data: (EmailNotifier | SlackWebhookNotifier | GenericWebhookNotifier)[];
hasMore: boolean;
}
Create a Notifier
Creates a notifier destination in a project. ChooseNOTIFIER_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)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.notifiers.create({
type: "NOTIFIER_TYPE_UNSPECIFIED",
incomingWebhookUrl: "https://far-wear.org/",
displayName: "Dennis48",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"type": Literal["NOTIFIER_TYPE_UNSPECIFIED", "NOTIFIER_TYPE_EMAIL", "NOTIFIER_TYPE_SLACK_WEBHOOK", "NOTIFIER_TYPE_WEBHOOK"], # required
"emails": List[str], # required
"project_id": Optional[str],
"display_name": str, # required
"metadata": Dict[str, Any], # optional
"incoming_webhook_url": Optional[str],
"webhook_url": Optional[str],
"headers": Dict[str, Any], # optional
}
{
type: "NOTIFIER_TYPE_UNSPECIFIED" | "NOTIFIER_TYPE_EMAIL" | "NOTIFIER_TYPE_SLACK_WEBHOOK" | "NOTIFIER_TYPE_WEBHOOK"; // required
emails: string[]; // required
projectId?: string;
displayName: string; // required
metadata?: Record<string, unknown>;
incomingWebhookUrl?: string;
webhookUrl?: string;
headers?: Record<string, unknown>;
}
Show Response
Show Response
{
"notifier": Union[EmailNotifier, SlackWebhookNotifier, GenericWebhookNotifier],
}
{
notifier: EmailNotifier | SlackWebhookNotifier | GenericWebhookNotifier;
}
Retrieve a Notifier
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)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.notifiers.get({
notifierId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"notifier_id": str, # required
}
{
notifierId: string; // required
}
Show Response
Show Response
{
"notifier": Union[EmailNotifier, SlackWebhookNotifier, GenericWebhookNotifier],
}
{
notifier: EmailNotifier | SlackWebhookNotifier | GenericWebhookNotifier;
}
Delete a Notifier
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)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.notifiers.delete({
notifierId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"notifier_id": str, # required
}
{
notifierId: string; // required
}
Update a Notifier
Partially updates an existing notifier. When changingtype, 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>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.notifiers.update({
notifierId: "<id>",
updateNotifierRequest: {},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"notifier_id": str, # required
"project_id": Optional[str],
"display_name": Optional[str],
"metadata": Dict[str, Any], # optional
"type": Optional[Literal["NOTIFIER_TYPE_UNSPECIFIED", "NOTIFIER_TYPE_EMAIL", "NOTIFIER_TYPE_SLACK_WEBHOOK", "NOTIFIER_TYPE_WEBHOOK"]],
"emails": List[str], # optional
"incoming_webhook_url": Optional[str],
"webhook_url": Optional[str],
"headers": Dict[str, Any], # optional
}
{
notifierId: string; // required
updateNotifierRequest: { // required
projectId?: string;
displayName?: string;
metadata?: Record<string, unknown>;
type?: "NOTIFIER_TYPE_UNSPECIFIED" | "NOTIFIER_TYPE_EMAIL" | "NOTIFIER_TYPE_SLACK_WEBHOOK" | "NOTIFIER_TYPE_WEBHOOK";
emails?: string[];
incomingWebhookUrl?: string;
webhookUrl?: string;
headers?: Record<string, unknown>;
};
}
Show Response
Show Response
{
"notifier": Union[EmailNotifier, SlackWebhookNotifier, GenericWebhookNotifier],
}
{
notifier: EmailNotifier | SlackWebhookNotifier | GenericWebhookNotifier;
}