openspecimen/rest/ng/forms/{formId}/data
Use this resource to make data entry for specimen event in the openSpecimen application. Use HTTP POST method to call this API by passing the below details in JSON format. Here formId is the identifier of the event form for which user wants to perform the data entry.
Below are the attributes which need to be sent in the request body:
Parameter | Details | ||||||
---|---|---|---|---|---|---|---|
appData | data required to identify the form.
| ||||||
user | Id of the user, who is performing this event | ||||||
time | event time stamp | ||||||
comments | Extra information which user wants to store with event creation. | ||||||
other fields | Here comes all the event specific fields, like neoPlasticCellularityPct in case of Tissue Review Event. |
http[s]:<host>:<port>/openspecimen/rest/ng/forms/{formId}/data
Use this URL to make data entry for specimen event in openSpecimen application.
Result:
The response of this request will contains the details of the created participant.
Below is the example of the create Cell Review Event event:
URL | http[s]:<host>:<port>/openspecimen/rest/ng/forms/{formId}/data |
Method | POST |
content-type | text/plain |
Method | POST |
json | { "appData":{ "formCtxtId":6, "objectId":11632 }, "neoPlasticCellularityPct":"21", "viableCellPct":"12", "user":1, "time":"10-29-2014 1:15", "comments":"" } |
response | "{\"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\":\"\"}" |
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Event data inserted 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 |