Addendum API (deprecated)
create-addendum (WIP)
Creates custom addendum resource for given source (SDCDocument/SDCWorkflow)
Extensible via ZEN
Params:
addendum
Addendum resource
SDCAddendum (without 'date')
yes
Should be used only for custom created(by user) SDCAddendum resources
Request:
Response:
add-note
Creates addendum Note for SDCDocument/SDCWorkflow
Params:
target
reference to target resource
zenbox/Reference
yes
user
reference to user which adds note
zenbox/Reference
yes
text
reference to target resource
zen/string
yes
Should be used for creating Note addendum for SDCDocument/SDCWorkflow
Request:
Response:
add-to-history
Add history addendum for resource for given status. When resource in status 'completed/amended' - snapshot can be saved (if resource is differs)
Params:
resource
resource body
SDCDocument/SDCWorkflow
yes
user
reference to user which adds note
zenbox/Reference
yes
Should be used for storing status changes for SDCDocument/SDCWorkflow.
When status is
completed
/amended
- try find latestcomplete
/amended
History resource with snapshot and checks is resource different - if so - ads snapshot field to new History addendum
Request:
Response:
create-amendment
Finds History addendums for given target and try generate Amendment report - which contains difference between 2 latest snapshots of that resource.
Params:
target
reference to resource with History addendums
SDCDocument/SDCWorkflow
yes
user
reference to user which adds note
zenbox/Reference
yes
Should be used for compute diff for two latest History snapshots of SDCDocument/SDCWorkflow and created Addendum resource for it.
If there are less than 2 History addendums with
completed
/ammended
status and with snapshot - Amendment should not be created.
Difference is array of diff objects
Diff object is a map of keys
type
change operation type
"remove"/"replace"/"add"
path
path of change
vector of strings
old
old value (if exists)
zen/string? (optional)
new
new value (if exitts)
zen/string (optional)
Request:
Response:
add-comment
Add comment for docuement/workflow with optional path to commented value in resource
Params:
target
reference to target resource
zenbox/Reference
yes
user
reference to user which adds note
zenbox/Reference
yes
path
path to commented value in resource
vector of strings
no
text
reference to target resource
zen/string
yes
Should be used for creating Comment addendum for SDCDocument/SDCWorkflow
Request:
Response:
It's looks like
Comment
similar toNote
- but semantically they are different. Comment should not releated to status ofSDCDocument
/SDCWorkflow
and used for informal conversations, which doesn't have any legal force.Note
should be used forSDCDocument
/SDCWorkflow
incompleted
/amended
statuses.
get-addendums
Returns collection of addendums for the given target resource.
Params:
target
reference to target resource
zenbox/Reference
yes
Request:
Response:
Server responds with HTTP 422 Unprocessable Entity
if wrong target is provided.
Request:
Result:
Error
Last updated