Skip to content

Webhook on add/modify/delete part #1339

@whc2001

Description

@whc2001

Is your feature request related to a problem? Please describe.
I want to print label when I add/modify a part. Back when I was still using PartKeepr, I did HTTP packet capture on its traffic (REST API) to extract the relavent part info, but with PartDB the request returns entire page instead of API response, so it's more difficult do that. However PartDB do have REST API as well, just that I need a trigger to know which part has been added/changed so I can query with the REST API.

Describe the solution you'd like
Each time when a part is added/modified/deleted, send a small HTTP request to a predefined endpoint. Don't care if the request failed.

Describe alternatives you've considered
I have almost no knowledge with PHP. With lots of searching and a little help of AI I managed to cobble together a solution:

webhook.zip

But it relies on symfony/messenger always running, and I wonder if there is easier solution.

Additional context
Theoretically I only need part_id in the event, anything else can be fetched with REST API later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions