Skip to main content

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 TypeAllowed Value
emailA valid email address
snsA valid Amazon Simple Notification Service (SNS) topic ARN
httpA valid HTTP address

Notification levels

Notification LevelDescriptionStatus
INITIAL_FINALSend notifications when the request is first accepted into the system and when the process completes."RECEIVED," "SUCCESS," "FAIL," "CANCELED," or "ERROR"
FINAL_ONLYSend a notification when the process is complete."SUCCESS", "FAIL", "FINAL", "CANCELED", or "ERROR".
INTERMEDIATESend notifications as the process moves from state to state.For example, notify when order moves from "RECEIVED" to "IN_PROGRESS".
ON_FAILSend notifications only when the process 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 this true.
  • requires_message_deduplication_id (boolean, required): If set to true, a unique Deduplication ID will be added to each message. If your topic uses Content Deduplication this can be set to false.

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.