M20 AZURE RAFS - code 422 - Observe Failure when running "https://{{RAFS_DDMS_HOST}}/v1/pvtreports"
- Am executed all the API collections from configuration to Rock sample analysis collections.
- All API collections are executed without any issue
- But when running PVT - create record am facing following issue.
API Details:
curl --location 'https://osdu-ship.msft-osdu-test.org/api/rafs-ddms/v1/pvtreports' \
--header 'Authorization: Bearer QoZDDuafw' \
--header 'data-partition-id: opendes' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"data": {
"Parameters": [
{
"Title": "206_12a-5_DST_archive Reservoir Fluid Analysis",
"ParameterKindID": "opendes:reference-data--ParameterKind:parameter_kind_id:"
}
],
"Datasets": [
"opendes:dataset--File.Generic:AutoTest_999571141143:",
"opendes:dataset--File.Generic:AutoTest_999571141143"
],
"FluidSampleID": "opendes:master-data--FluidSample:BP206-Sample-2587-EA:",
"AnalysisDate": "2015-06-25",
"LabSampleIdentifier": "2587-EA",
"LaboratoryName": "Core Laboratories (UK)",
"PVTTests": {}
},
"kind": "rafsddms:wks:work-product-component--PVT:1.0.0",
"acl": {
"viewers": [
"data.default.viewers@opendes.contoso.com"
],
"owners": [
"data.default.owners@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-RAFS-Legal-Tag-Test999571141143"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"tags": {
"tag1": "CCE Report for PVT",
"tag2": "Compositional Analysis",
"tag3": "Differential Liberation",
"tag4": "Multistage Separator"
},
"id": "opendes:work-product-component--PVT:Test"
},
{
"data": {
"Parameters": [
{
"Title": "Title",
"ParameterKindID": "opendes:reference-data--ParameterKind:parameter_kind_id:"
}
],
"Datasets": [
"opendes:dataset--File.Generic:AutoTest_999571141143:"
],
"FluidSampleID": "opendes:master-data--FluidSample:RFL-20858575:",
"AnalysisDate": "2012-06-25",
"LabSampleIdentifier": "RFL-20858575",
"LaboratoryName": "Core Laboratories (UK)",
"PVTTests": {}
},
"kind": "rafsddms:wks:work-product-component--PVT:1.0.0",
"acl": {
"viewers": [
"data.default.viewers@opendes.contoso.com"
],
"owners": [
"data.default.owners@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-RAFS-Legal-Tag-Test999571141143"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"tags": {
"tag1": "Transport Test - Viscosity",
"tag2": "tag2"
},
"id": "opendes:work-product-component--PVT:TestRFL-20858575"
}
]'
Response:
{
"code": 422,
"reason": "Validation failed for rafsddms:wks:work-product-component--PVT:1.0.0. Skipped records [{'id': 'opendes:work-product-component--PVT:Test', 'reason': ValidationError(model='PVT', errors=[{'loc': ('data', 'Datasets', 1), 'msg': 'string does not match regex \"^[\\\\w\\\\-\\\\.]+:dataset\\\\-\\\\-[\\\\w\\\\-\\\\.]+:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*\"', 'type': 'value_error.str.regex', 'ctx': {'pattern': '^[\\w\\-\\.]+:dataset\\-\\-[\\w\\-\\.]+:[\\w\\-\\.\\:\\\%]+:[0-9]*
'}}])}]"
}