...
URI | openspecimen/rest/ng/forms/{formId}/data | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Save or update DE form data. This API can be used to save data for forms associated at any level (Participant, SpecimenCollectionGroup, Specimen, and SpecimenEvent) | ||||||||||||||
URI Parameters | formId - Identifier of DE form for which data is being saved or updated | ||||||||||||||
HTTP Methods | POST: To save form data PUT: To update already saved form data | ||||||||||||||
Request Body |
|
...
Code Block |
---|
"{ \"id\":14313, \"time\":\"10-29-2014 1:15\", \"appData\":{ \"formCtxtId\":6.0, \"objectId\":11632.0 }, \"neoPlasticCellularityPct\":\"21\", \"user\":1.0, \"viableCellPct\":\"12\", \"containerId\":6, \"comments\":\"\" }" |
Download the sample java Java client from here.
NOTE:
To get the formId and formCtxId, execute the below SQL query:
...
In above SQL form display name refers to caption that user sees in Manage Forms or form data entry viewHere <form name> is the name of the form for which user wants to make data entry. e.g. for Specimen Collection Event the name is "SpecimenCollectionEvent".
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Form data saved successfully |
400 | All requests | Invalid parameters, e.g invalid user etc |
401 | All requests | Authorization failed, User doesn’t have privileges to register create events |
500 | All requests | Internal server error, Encountered server error while performing operations |
...