Tasking Notifications
Notifications for tasking events are set up as part of your tasking request. You will set the notification type, the target where the notification will be sent, and the notification level. You can request more than one type of notification for a single request.
Your order_template can also include ordering notifications if wanted.
Notification types
The following notification types are supported:
| Notification Type | Allowed Value |
|---|---|
email | A valid email address |
sns | A valid Amazon Simple Notification Service (SNS) topic ARN |
http | A valid HTTP address |
Notification levels
| Notification Level | Description | States |
|---|---|---|
INITIAL_FINAL | Send notifications when the order is first accepted into the system and when the order completes. | "INITIAL", "ACCEPTED", "FULFILLED", "PARTIALLY-FULFILLED", "FAIL", "DENIED", "CANCELED", "ERROR" |
FINAL_ONLY | Send a notification when the order is complete. | "FULFILLED", "PARTIALLY-FULFILLED", "FAIL", "DENIED", "CANCELED", "ERROR" |
INTERMEDIATE | Send notifications as the order moves from state to state from. | "INITIAL", "ACCEPTED", "AWAITING-COLLECTION", "IN-PRODUCTION", "PARTIAL-DELIVERY","FULFILLED", "PARTIALLY-FULFILLED", "FAIL", "DENIED", "CANCELED", "ERROR" |
ON_FAIL | Send notifications only when an order has failed or errored. | "FAIL" or "ERROR" |
Multiple notifications of the same type or different types can be created. Each type will have its own notification level. If a notification level is not specified, the default level is FINAL_ONLY.
Notification targets
Email notification
Email notifications take a comma-separated list of email addresses.
Example notification configuration for type email:
"notifications": [{
"type": "email",
"target": "user1@example.com,user2@example.com",
"level": "FINAL_ONLY"
}]
SNS notification
Amazon Simple Notification Service (SNS) topic notifications are configured with your organization's topic ARN. Your topic policy may need to be updated to receive notifications.
Example SNS notification for regular topics:
{
"type": "sns",
"target": "arn:aws:sns:us-east-2:123456789012:YourTopic",
"level": "FINAL_ONLY",
}
If your topic is First In, First Out (FIFO), an additional config section is needed with two required attributes:
requires_message_group_id(boolean, required): set thistrue.requires_message_deduplication_id(boolean, required): If set totrue, a unique Deduplication ID will be added to each message. If your topic uses Content Deduplication this can be set tofalse.
Example SNS notification for FIFO topics:
{
"type": "sns",
"target": "arn:aws:sns:us-east-2:123456789012:YourTopic",
"config": {
"requires_message_group_id": true,
"requires_message_deduplication_id": false,
},
"level": "FINAL_ONLY",
}
To allow notifications to be published to your topic, you can grant the principal arn:aws:iam::258652954197:root the sns:Publish action.
An example of a basic policy statement to allow publishing notifications would look like:
{
"Statement": [
{
"Sid": "Allow-MGP-Notifications",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::258652954197:root"
},
"Action": [
"sns:Publish",
],
"Resource": "arn:aws:sns:your_region:123456789012:YourTopicName"
}
]
}
The notification payload is a JSON object with the following format:
{
"status_or_event": {either "status" or "event"},
"tasking_id": {tasking id},
"tasking": {tasking details},
"message": "{status message}",
"is_final": {boolean},
"notification": {notifications configured for tasking},
"customer": {customer id},
"tasking_url": "https://api.maxar.com/tasking/v1/tasking/:tasking_id",
"get_tasking_api_reference": "https://developers.maxar.com/docs/tasking/api/get-a-tasking-request.html",
"get_auth_token_api_reference": "https://developers.maxar.com/docs/authentication/api/get-an-o-auth-2-bearer-token.html"
}
HTTP notification
HTTP notifications allow the platform to HTTP POST a JSON formatted notification message to an HTTP endpoint.
HTTP notification request objects have an optional config section that can add custom HTTP headers to the callback request. For example, you could provide an HTTP authorization header if the receiving endpoint requires credentials.
Example HTTP Notification type:
{
"type": "http",
"target": "https://your-service-url/notify/",
"config": {
"headers": {
"Authorization": "Bearer 12345",
"X-CUSTOM-HEADER": "some value",
}
},
"level": "INTERMEDIATE",
}
The HTTP message body is the same JSON object shown above for SNS notifications.