REST API: is there a way to delete a single process for a document type, or is read-modify-PUT the only path? #491
Unanswered
woutraymaekers-maker
asked this question in
Q&A
Replies: 1 comment 2 replies
|
Well, currently the process you proposes is actually the only way forward. Let me see, if can add some "API sugar" to it :-) |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi Philip,
I'm trying to delete only one specific process (processIdentifier) for a given document type of a participant, while keeping the other processes/endpoints under that document type intact.
From reading the REST API wiki (https://github.com/phax/phoss-smp/wiki/REST-API) and the peppol-smp-client SMPClient sources, here's my understanding so far:
The finest-grained resource is ServiceMetadata, keyed by (ServiceGroupId, DocumentTypeId).
So to remove a single process, it looks like I'd need to: GET the current ServiceMetadata, remove the target Process from the ProcessList in memory, then PUT the full modified ServiceMetadata back (or DELETE the whole document type if no processes remain).
My question: is that read-modify-PUT approach the intended/only way to do this, or am I missing an endpoint or some other way of working?
What got me wondering: in the phoss-smp web UI, removing a single process for a document type looks like a simple, targeted action. I just wanted to confirm whether the UI is actually doing the same read-modify-PUT (full overwrite) under the hood, or if there's a more granular mechanism I'm not seeing.
Thank you for clarifying and for the fun talk on MLS this past Peppol convention!
Wout
All reactions