Implement CRUD endpoints for TEC (ThermalExpansionCoefficient) data type
- Implement enpoints to manage TEC content schema
Implement POST/api/rafs-ddms/tec/{record_id}/data is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC which was created previously
- 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 triaxial
- Validation cases should be covered with appropriate status codes
- Request & response structure should correspond to populated JSON
Implement GET/api/rafs-ddms/tec/{record_id}/data endpoint is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC
- User should be able to retrieve bulk data of tec analysis using new endpoint
- Successful response (200 status code) should retrieve all existing triaxial Measurements (bulk data) linked to specified record id (SamplesAnalysis WPC)
- Validation cases should be covered with appropriate status codes
- Structure of request and response should correspond to populated JSON content schema
{
"SampleID": {
"type": "string",
"pattern": "^[\\w-.]+:master-data-Sample:[\\w\\-\\.\\:\\%]+:[0-9]*$"
},
"TestFluid": {
"type": "string"
},
"BulkDensity": {
"type": "object",
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
},
"Pressure": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"PressureMeasurementType": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--PressureMeasurementType:[\\w\\-\\.\\:\\%]+:[0-9]*$"
},
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
}
]
},
"TestData": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"TimeStamp": {
"type": "string"
},
"TestTime": {
"type": "number"
},
"Temperature": {
"type": "object",
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
},
"AxialStrain": {
"type": "object",
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
}
}
]
},
"CoefficientData": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"RunNumber": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"TECMeasured": {
"type": "object",
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
},
"TECCorrectionFactor": {
"type": "object",
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
},
"TECCorrected": {
"type": "object",
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
},
"TemperatureMinimum": {
"type": "object",
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
},
"TemperatureMaximum": {
"type": "object",
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
},
"Spacer": {
"type": "string",
"pattern": "^[\\w-.]:reference-data--Elements:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
}
]
}
}
}
]
}
}
For additional reference - example units of measure for each attribute:
- SampleDepth: ft or m
- SampleLength: in
- SampleDiameter: in
- SampleMass: g
- BulkDensity: g/cc
- Pressure: psi
- TestTime: hours
- Temperature: degC
- AxialStrain: unitless
- TECMeasured: 1/degC
- TECCorrectionFactor: 1/degC
- TECCorrected: 1/degC
- TemperatureMinimum: degC
- TemperatureMaximum: degC
Edited by Michael Jones