CreateProjectNotification Method
Description
Creates a new project notification.
HTTP Request
POST https://api.skeddly.com/api/Projects/<id>/Notifications
Body
The body is a JSON structure with the following properties.
amazonSnsSettings
Email settings for the notification. Required when notificationMethod is amazon-sns.
Type: ProjectNotificationAmazonSnsSettings object
Required: Conditional
emailSettings
Email settings for the notification. Required when notificationMethod is email.
Type: ProjectNotificationEmailSettings object
Required: Conditional
notificationLevel
Level of notification.
Type: string
Allowed Values:
allerrors-only
Required: Yes
notificationMethod
Method of notification.
Type: string
Allowed Values:
emailslackamazon-sns
Required: Yes
slackSettings
Slack settings for the notification. Required when notificationMethod is slack.
Type: ProjectNotificationSlackSettings object
Required: Conditional
Returns
A ProjectNotification object.
Sample Request
POST /api/Projects/proj-12345678/Notifications HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json
{
"notificationLevel": "errors-only",
"notificationMethod": "email",
"emailSettings": {
"emailAddresses": [
"[email protected]"
]
}
}curl -X POST "https://api.skeddly.com/api/Projects/proj-12345678/Notifications" \
-H "Authorization: AccessKey <api key>" \
-d notificationLevel="errors-only" \
-d notificationMethod="email" \
-d emailSettings.emailAddresses[0]="[email protected]"Sample Response
{
"notificationId": "pn-12345678",
"createdDate": "2023-01-26T12:00:00:Z",
"lastModifiedDate": "2023-01-26T12:00:00:Z",
"lastModifiedBy": "u-12345678",
"notificationLevel": "errors-only",
"notificationMethod": "email",
"emailSettings": {
"emailAddresses": [
"[email protected]"
]
}
}Last updated