Refactoring 'RetrievalInstructionsResponse' model
Summary
For '/retrievalInstructions' api request may contains recordIDs that belong the different provider [ eg: AWS_S3, TGS] of 'ConnectedSource' kind. The Current response model 'RetrievalInstructionsResponse' has singular field for provider Key and its associated with entire dataset in the request. As per the old GetRetrievalInstructionsResponse, the providerKey was associated with individual dataset records.
For request with datasetRegistryIds that belong to different providerKey scenario, need to refactor the 'RetrievalInstructionsResponse' model. Related Issue: eds-dms response model changes
Current RetrievalInstructionsResponse:
{
"providerKey": "AWS_S3",
"datasets": [
{
"datasetRegistryId": "osdu:dataset--File.Generic:6d0a547cf0153202feeec449816f5ad26df21317ed48260a31ffb56be5cc1090",
"retrievalProperties": {
"unsignedUrl": "s3://osduaws-preship-artifacts-ue2/r1/data/provided/trajectories/7586.csv",
"signedUrl": "test",
"createdAt": "2022-12-22T05:50:05.565Z",
"connectionString": "test",
"credentials": {
"accessKeyId": "test",
"secretAccessKey": "test",
"sessionToken": "test",
"expiration": "2022-12-22T06:50:05.000+00:00"
},
"region": "us-east-2",
"signedUrlExpiration": "2022-12-29T05:50:05.342+00:00",
"fileName": "7586.csv"
}
}
]
}
Proposed RetrievalInstructionsResponse:
{
"datasets": [
{
"datasetRegistryId": "osdu:dataset--File.Generic:6d0a547cf0153202feeec449816f5ad26df21317ed48260a31ffb56be5cc1090",
"retrievalProperties": {
"unsignedUrl": "s3://osduaws-preship-artifacts-ue2/r1/data/provided/trajectories/7586.csv",
"signedUrl": "test",
"createdAt": "2022-12-22T05:50:05.565Z",
"connectionString": "test",
"credentials": {
"accessKeyId": "test",
"secretAccessKey": "test",
"sessionToken": "test",
"expiration": "2022-12-22T06:50:05.000+00:00"
},
"region": "us-east-2",
"signedUrlExpiration": "2022-12-29T05:50:05.342+00:00",
"fileName": "7586.csv"
}
"providerKey": "AWS_S3"
}
]
}
Solution:
These are the changes required:
Reg. Refactoring 'RetrievalInstructionsResponse' model #48 (closed) changes are to be made at
- os-core-common ( for RetrievalInstructionsResponse model change) osdu/platform/system/lib/core/os-core-common!190 (merged)
- dataset ( refer latest os-core-common and update the changes in /retrievalInstructions api )
- eds-dms (refer latest dataset and update the changes in/retrievalInstructios api)