Storage API behavior and the documentation discrepancies observed while testing
Storage API discrepancies
-
Storage - Get kinds using invalid cursor value OR Get all records for a kind with invalid cursor (Storage collection request #02b, #08iii)
GET: https://{{STORAGE_HOST}}/query/kinds?cursor=invalid_cursor&limit=10 or GET: https://{{STORAGE_HOST}}/query/records?cursor=invalid_cursor&limit=10&kind={{data-partition-id}}:osdu:well-master:{{enriched_schema_version}}
The response Body, I get on all platforms is { "code": 400, "reason": "Cursor invalid", "message": "The requested cursor does not exist or is invalid" }
The Return status Code is 400 But the status description that I get on Azure is null where else on AWS, GCP and IBM I get "Bad Request"
The storage API documentation mentions that For query /kind one should get 200(All kinds retrieved successfully.) or 500 (Unknown Error) and there is no mention of 400 For query/records one should get 200(Record Ids retrieved successfully.) or 404 Records or cursor not found and again no mention of 400
-
Storage - Create or update records with Invalid acl group (Storage collection request #13 (closed))
PUT: https://{{STORAGE_HOST}}/records?skipdupes=true
The response Body, I get on all platforms is { "code": 400, "reason": "Validation error.", "message": "createOrUpdateRecords.records[0].acl: Invalid group name '{{New_OwnerDataGroupInvalid}}@opendes.lk'" } The return code is 400 on all platforms But return status description on Azure is null and other platforms is "Bas Request"
The storage API documentation mentions that For PUT records one should get status return code of ( 201 - Records created and/or updated successfully. 400 - Invalid record format. 403 - User not authorized to perform the action. 404 - Invalid acl group. 400 is mentioned but the description does not match
-
Storage - Create or update records without correct permission to access the API (Storage collection request #14 (closed))
PUT: https://{{STORAGE_HOST}}/records?skipdupes=true
The response Body I get on AWS and Azure { "code": 403, "reason": "Access denied", "message": "The user is not authorized to perform this action" }
The response Body I get on GCP and IBM { "code": 401, "reason": "Access denied", "message": "The user is not authorized to perform this action" }
The response on AWS and Azure is matching the Storage API documentation, but the code returned does not match on GCP and IBM
So to resolve or report these kinds of discrepancies, what is the best of way of doing it. Any input will be apprecatied. Thanks. Kamlesh