Webhook support - create AtomicData by calling a webhook

Open
#976 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
api, backend

Research direction

No files, tests, or entry points are named. Start by reviewing the webhook requirements in this issue, then identify the server entry point for POST requests and resource creation; done means a target-scoped webhook accepts JSON, enforces the creator's rights, and creates the resource.

Written by the indexing model from the issue text.

Description

Create instances of resources in one specific scope (parent) without needing an Agent / Commits / Token or whatsoever. Just send a POST request with a JSON body to that webhook and you're done!

When is this useful

  • Linking to other services / integrating with other tools (through hubs like IFTTT). For example: create a person every time a form has been submitted on airtable.

How to build this: ClassExtender plugin

  • We create a new WebHook class + ClassExtender (plugin)
  • They have a certain target where they write the information
  • They have a POST handler that parses the incoming JSON and creates a new resource in the hierarchy, at the target location.
  • The rights of the Agent who created the WebHook are checked when creating a new resource through that webhook.

Not to be confused with

The other direction in which webhooks can work: as notifications when something in AtomicServer changes #77. This is also very valuable, but for a different usecase.

Dominant language
TypeScript
Stars
1.6k
Forks
82
Avg merge
10h 34m
Merged PRs (30d)
205

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ontola/atomic-server

All issues in ontola/atomic-server

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.