Open chevdor opened 3 years ago
What is this API doing. Is it creating a new Post for discussion with keys and data?
Yes, it API will either create a new post or append to an existing one.
If the set payload.app + payload.keys is not found, it creates a new post. If it is present however, it will add the payload.data to the existing post.
Background
Polkassembly is one of the places of choice to share network relevant discussions and open discussions such as results of running
srtool
(https://gitlab.com/chevdor/srtool).As part of a series of improvements for
srtool
, I would love to simplify the publishing of the results and such an endpoint would be an elegant solution.Proposal
This proposal consists in a new openly available ingestion endpoint, allowing devs and apps to post to polkassembly directly using its API.
In particular, this could help aggregate data in a single place and prevent the flourishing of unlinked single posts.
Details
I would like to open the discussion here to see how feasable it would be to add such an endpoint.
method: POST
payload:
Here would be a sample payload:
Benefit
Instead of having users (and apps) posting in new random discussions, this endpoint would allow creating one single discussion for a given set of
keys
(as defined in the payload). It would allow collecting thedata
from the payload in a single place while allow people to discuss in this single thread.data
could but does not have to be interpreted and could be simply added as attachement into a thread.