Implement CRUD endpoints to manage Multiple salinity tests (data)

Implement POST/api/rafs-ddms/samplesanalysis/data/multiplesalinitytests 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 salinitytests
  • Validation cases should be covered with appropriate status codes
  • Request & response structure should correspond to populated JSON

Implement GET/api/rafs-ddms/samplesanalysis/data/multiplesalinitytests is implemented and available on Swagger

  • record_id is the SamplesAnalysis WPC
  • User should be able to retrieve bulk data of salinitytestsusing new endpoint
  • Successful response (200 status code) should retrieve all existing salinitytests 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
Click to expand
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
    "SamplesAnalysisID": {
        "type": "string",
        "pattern": "^[\\w\\-\\.]+:work-product-component\\-\\-SamplesAnalysis:[\\w\\-\\.\\:\\%]+:[0-9]*$"
    },
    "TestMethod": {
        "type": "string"
    },
    "SalinityTestResults": {
        "type": "array",
        "items": {
            "type": "object",
            "properties": {
                "SampleID": {
                    "type": "string",
                    "pattern": "^[\\w\\-\\.]+:master-data\\-\\-Sample:[\\w\\-\\.\\:\\%]+:[0-9]*$"
                },
                "BQv": {
                    "type": "object",
                    "properties": {
                        "Value": {
                            "type": "number"
                        },
                        "UnitOfMeasure": {
                            "type": "string",
                            "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
                        }
                    }
                },
                "Qv": {
                    "type": "object",
                    "properties": {
                        "Value": {
                            "type": "number"
                        },
                        "UnitOfMeasure": {
                            "type": "string",
                            "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
                        }
                    }
                }
            },
    },
    "SalinityTestSteps": {
        "type": "array",
        "items": {
            "type": "object",
            "properties": {
                "BrineSalinity": {
                    "type": "object",
                    "properties": {
                        "Value": {
                            "type": "number"
                        },
                        "UnitOfMeasure": {
                            "type": "string",
                            "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
                        }
                    }
                },
                "BrineConductivity": {
                    "type": "object",
                    "properties": {
                        "Value": {
                            "type": "number"
                        },
                        "UnitOfMeasure": {
                            "type": "string",
                            "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
                        }
                    }
                },
                "CoreConductivity": {
                    "type": "object",
                    "properties": {
                        "Value": {
                            "type": "number"
                        },
                        "UnitOfMeasure": {
                            "type": "string",
                            "pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
                        }
                    }
                }
            }
        }
    }
},
"required": ["SamplesAnalysisID"]

}

Edited Jul 21, 2023 by Mykhailo Buriak
Assignee Loading
Time tracking Loading