GitHub Actions workflows status
CodeClimate
The origin and root path for this API is: https://api.klimapartner.net/push
The following endpoints are defined in this API:
Supported methods:
GET
(target lambda → get-public-key)
Description:
This endpoint returns the public key used in the push-notification protocol. For now it only returns the public key related to the Kaskadi project!
Authorization:
Type | Identity source |
---|---|
Cognito |
|
Query string parameters:
No query string parameters found for this method.
Request body:
No body found for this method.
Examples:
Example #1
Request:
GET https://api.klimapartner.net/push/public-key
Headers:
Authorization: Bearer COGNITO_ACCESS_TOKEN
Response:
Status code:
200
Headers:
Access-Control-Allow-Origin: *
Body:
{
"publicKey": "kaskadi_push_notification_public_key"
}
Supported methods:
POST
(target lambda → register-sub)
Description:
This endpoint allows a client to register for push-notification. The body should contain subscription data as defined here.
Authorization:
Type | Identity source |
---|---|
Cognito |
|
Query string parameters:
No query string parameters found for this method.
Request body:
Key | Default | Description |
---|---|---|
endpoint |
Client endpoint for the push-notification system. | |
keys |
Object - set of keys used for authenticaton when pushing notification to the client. |
Examples:
Example #1
Request:
POST https://api.klimapartner.net/push/register
Headers:
Authorization: Bearer COGNITO_ACCESS_TOKEN
Body:
{
"endpoint": "https://fcm.googleapis.com/fcm/send/dpH5lCsTSSM:APA91bHqjZxM0VImWWqDRN7U0a3AycjUf4O-byuxb_wJsKRaKvV_iKw56s16ekq6FUqoCF7k2nICUpd8fHPxVTgqLunFeVeB9lLCQZyohyAztTH8ZQL9WCxKpA6dvTG_TUIhQUFq_n",
"keys": {
"p256dh": "BLQELIDm-6b9Bl07YrEuXJ4BL_YBVQ0dvt9NQGGJxIQidJWHPNa9YrouvcQ9d7_MqzvGS9Alz60SZNCG3qfpk=",
"auth": "4vQK-SvRAN5eo-8ASlrwA=="
}
}
Response:
Status code:
201
Headers:
Access-Control-Allow-Origin: *
Body:
{
"message": "Subscriptions successfully registered!"
}
The following lambda functions are used in this API:
The following layers are used in this API:
Name | Sources | Timeout | Handler | Layers |
---|---|---|---|---|
register-sub |
|
default | handler |
See configuration file for more details.
Name | Sources | Timeout | Handler | Layers |
---|---|---|---|---|
get-public-key |
|
default | handler |
See configuration file for more details.
Layer for push-api
aws-es-client
, version:1.0.2
(see on NPM)create-es-client
(local utility)
See configuration file for more details.
You can use any tags (and their respective values) visible below to find ressources related to this stack on AWS. See here for more details.
Tag | Value |
---|---|
app | kaskadi |
service | push-api |
logical-unit | push |
type | http |