Skip to content

Create options for basic REST endpoints for data ingress / webhooks #510

@dalanmiller

Description

@dalanmiller

Similar to https://www.firebase.com/docs/rest/guide/saving-data.html

Given a pre-existing database, Horizon should have a way to allow people to ingest large .json dumps into Horizon. I got this question a fair number of times at OSCON from people thinking about how to move their data into Horizon.

Currently, your best bet is to hope that your data is in a format which is usable by rethinkdb import and then ingesting data that way. But this assumes you have experience with RethinkDB or are comfortable performing these kind of operations. Even thought it will definitely take longer for large datasets, making HTTP requests is definitely much simpler and easier for the smaller transferrals of application datasets.

It would be helpful to enable some sort of basic REST API:

hz serve --rest

POST
https://localhost:8181/horizon/rest/[table_name]

GET, PUT
https://localhost:8181/horizon/rest/[table_name]/[primary_id]

This would also help for people who have incoming data from other services and just need an endpoint to point some sort of webhook towards. In this case, origin domains could be whitelisted or some sort of access token could be provided as a query param (given TLS).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions