This service delegates POST requests to Orchestrate.io. The service endpoints are designed to make it somewhat feasible to set up AWS SNS HTTP(S) subscriptions to this service.
That way you can have all messages published to a topic...
- ...added or updated in a collection
- ...appended as events to a key in a collection
Considered non-existent, don't trust this.
That said, as of this writing the least insecure way of running this would probably be:
- Expose the service solely over HTTPS (using a proper certificate)
- Use random UUIDs (or something equivalent) as values for
{application}
- For example:
brew install uuid && heroku config:set $(uuid)=<orchestrate api key>
- For example:
- JSON payload
- Both endpoints requires a JSON request body
- The path parameter
{key-field}
specifies the field whose value will be the key in{collection}
- MIME content type
- Endpoints require JSON payload which can be sent as...
- ...
application/json
- ...
text/plain
(because that's what AWS SNS does)
- ...
- Endpoints require JSON payload which can be sent as...
All endpoints require three parameters:
{application}
must map to a environment variable whose value is the Orchestrate API that grants write access to{collection}
{collection}
is the Orchestrate.io collection{key-field}
is the field within the payload whose value will be used as key in{collection}
POST /{application}/{collection}/{key-field}
- Creates, or updates, the key specified by
{key-field}
in{collection}
.
POST /{application}/{collection}/{key-field}/{event-type}
- Creates an event of the given
{event-type}
on the key specified by{key-field}
in{collection}
with the current time as timestamp.
Made to run on Heroku or locally with foreman. Requires at least one environment variable for {application}
that contains a valid API key for Orchestrate.io. To run locally without HTTPS; set the environment variable DO_NOT_FORCE_HTTPS
to any value.
- HTTP or HTTPS subscription
- Raw message delivery
The service employes a filter (SnsSubscriptionRequestFilter
) which intercepts and confirms any inbound SNS subscription request.