Implement POST endpoint for CapPressure (data)
- POST/api/rafs-ddms/capillarypressuretests/{record_id}/data is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC
- User should be able to fill the SamplesAnalysis report with measurements taken in this analysis
- Successful response (200 status code) should update SamplesAnalysis record and include DDMSDatasets array with GET endpoint to the linked bulk data of CapPressure
- Validation cases should be covered with appropriate status codes
- Response should be returned in interval of 0.1-1 second
- Request & response structure should correspond to populated JSON
Content Schema Example
"SamplesAnalysisID": "osdu:work-product-component--SamplesAnalysisID:dd76cf6c-226f-5636-ad1b-1ca0f8249cc8:",
"TestData": [
{
"SampleID": "^[\\w-.]+:master-data-Sample:dd76cf6c-226f-5636-ad1b-1ca0f8249cc8:",
"Depth": {
"Value": 5293.22,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:m:"
},
"Permeability": {
"Value": 52.2,
"Type": "opendes:reference-data--PermeabilityMeasurementType:Kair:",
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:md:"
},
"Porosity": {
"Value": 0.266,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:pct:"
},
"InitialSaturation": {
"Value": 1,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:pct:"
},
"Remark": "Test was successfully executed",
"CapPressureSteps": [
{
"StepNumber": "1",
"CapPressure":{
"Value": 2,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:psia:"
},
"WaterSaturation": {
"Value": 0.978,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:pct:"
}
},
{
"StepNumber": "2",
"CapPressure":{
"Value": 1440,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:psia:"
},
"WaterSaturation": {
"Value": 0.937,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:pct:"
}
}
],
},
{
"SampleID": "^[\\w-.]+:master-data-Sample:dd8cf6c-226f-5636-ad1b-1ca0f8249cc12:",
"Depth": {
"Value": 5293.53,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:m:"
},
"Permeability": {
"Value": 88.4,
"Type": "opendes:reference-data--PermeabilityMeasurementType:Kair:",
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:md:"
},
"Porosity": {
"Value": 0.279,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:pct:"
},
"InitialSaturation": {
"Value": 1,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:pct:"
},
"Remark": "Test was successfully executed",
"CapPressureSteps": [
{
"StepNumber": "1",
"CapPressure":{
"Value": 2,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:psia:"
},
"WaterSaturation": {
"Value": 0.978,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:pct:"
}
},
{
"StepNumber": "2",
"CapPressure":{
"Value": 1450,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:psia:"
},
"WaterSaturation": {
"Value": 0.968,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:pct:"
}
}
]
}
]
}`
Edited by Vsevolod Svirin