Pacifica Notifications Service
Project description
Pacifica Notifications Service
Pacifica notification service to catch internal state of data and notify on that state
Overview
This service is a (Pacifica Policy)[https://github.com/pacifica/pacifica-policy.git] based routing mechanism for data subscribers to execute workflows based on the availability of data in Pacifica.
The (Pacifica Metadata)[https://github.com/pacifica/pacifica-metadata.git] service emits (CloudEvents)[https://github.com/cloudevents/spec] when new data is accepted. This service is intended to recieve and route those events to users that are allowed based on Pacifica Policy.
API Reference
There are two REST APIs available on this service. The first api accepts cloud events for processing. The second api allows users to subscribe to events and specify routing target urls to send those events.
Cloud Events Recieve
POST /receive
Content-Type: application/json
... JSON Cloud Event ...
Subscriptions
The subscriptions API is a REST style API accessed on /eventmatch
.
Create Event Subscription
Request:
POST /eventmatch
Http-Remote-User: dmlb2001
Content-Type: application/json
{
"name": "My Event Match",
"jsonpath": "data",
"target_url": "http://www.example.com/recieve"
}
Response:
Content-Type: application/json
{
"user": "dmlb2001",
"updated": "2018-08-02T13:53:05.838827",
"uuid": "466725b0-cbe1-45cd-b034-c3209aa4b6e0",
"deleted": null,
"version": "v0.1",
"jsonpath": "data",
"disabled": null,
"created": "2018-08-02T13:53:05.838827",
"name": "My Event Match",
"extensions": {},
"target_url": "http://www.example.com/receive",
"error": null
}
Get Event Subscription
Request:
GET /eventmatch/466725b0-cbe1-45cd-b034-c3209aa4b6e0
Http-Remote-User: dmlb2001
Content-Type: application/json
Response:
Content-Type: application/json
{
"user": "dmlb2001",
"updated": "2018-08-02T13:53:05.838827",
"uuid": "466725b0-cbe1-45cd-b034-c3209aa4b6e0",
"deleted": null,
"version": "v0.1",
"jsonpath": "data",
"disabled": null,
"created": "2018-08-02T13:53:05.838827",
"name": "My Event Match",
"extensions": {},
"target_url": "http://www.example.com/receive",
"error": null
}
Update Event Subscription
Request:
PUT /eventmatch/466725b0-cbe1-45cd-b034-c3209aa4b6e0
Http-Remote-User: dmlb2001
Content-Type: application/json
{
"target_url": "http://api.example.com/receive"
}
Response:
Content-Type: application/json
{
"user": "dmlb2001",
"updated": "2018-08-02T13:53:05.838827",
"uuid": "466725b0-cbe1-45cd-b034-c3209aa4b6e0",
"deleted": null,
"version": "v0.1",
"jsonpath": "data",
"disabled": null,
"created": "2018-08-02T13:53:05.838827",
"name": "My Event Match",
"extensions": {},
"target_url": "http://api.example.com/receive",
"error": null
}
Delete Event Subscription
Request:
DELETE /eventmatch/466725b0-cbe1-45cd-b034-c3209aa4b6e0
Response:
HTTP/1.1 200 OK
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pacifica-notifications-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3169dde8c189ebd339024c8be396fb9147d3a51614d27596575d4c2834fba57e |
|
MD5 | 7ac568d0519d9f1167b9453aef6bee05 |
|
BLAKE2b-256 | d33d032b780b075e1ffef81cfe673ebbb77b93264d7ac7ab96a55ec503ae39f9 |
Hashes for pacifica_notifications-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82a09dfb764a2e055eab5297e9ef9024c70b7c79bfe352514d5601ce5b9bed2c |
|
MD5 | 35b3d0130fa54cd77a6bc60f4e2dd0f6 |
|
BLAKE2b-256 | 7cf0954ac167a1f866d250474b499c7a3e5c5b08e44567b9bd0c36809475d6ee |
Hashes for pacifica_notifications-0.3.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 046c89a82cbd97d11f091591d512edac582cd54fe489f75892a353bbc24a3ef4 |
|
MD5 | 2c4d1245f3c4cad7cf2262f87e4ce4e4 |
|
BLAKE2b-256 | ca990e37dd16384622684f4e6cd4b33a003a420b236e2be7d40868571ba9efca |