oci raw-request --http-method GET --target-uri https://objectstorage.ap-melbourne-1.oraclecloud.com/n/axatkk9parjt/b --request-body "file:///home/tamiloracl/compartment.json"
{
"data": {
"code": "MissingCompartmentId",
"message": "The 'compartmentId' query parameter was missing"
},
"headers": {
"Content-Length": "91",
"Content-Type": "application/json",
"access-control-allow-credentials": "true",
"access-control-allow-methods": "POST,PUT,GET,HEAD,DELETE,OPTIONS",
"access-control-allow-origin": "*",
"access-control-expose-headers": "access-control-allow-credentials,access-control-allow-methods,access-control-allow-origin,content-length,content-type,date,opc-client-info,opc-request-id,x-api-id",
"date": "Sat, 16 Jul 2022 10:03:23 GMT",
"opc-request-id": "mel-1:Q9lECIeC9_w87ppIOiofT0Ehz1oDvu5fPt97jpo3a4NSapit8w5Y0l-GYEhCy_Uw",
"x-api-id": "native"
},
"status": "400 Bad Request"
}
The compartment.json have the json data of compartmentID
https://docs.oracle.com/en-us/iaas/api/#/en/objectstorage/20160918/Bucket/ListBuckets
The compartmentID parameter needs to mention at query part. Could you please help me how to pass this compartment-id
I am able to confirm that my api user is working by getting the status of the bucket.
oci raw-request --http-method GET --target-uri https://objectstorage.ap-melbourne-1.oraclecloud.com/n/axatkk9parjt/b/test1
{
"data": {
.....
},
"status": "200 OK"
}
But when I try the list bucket api , I am not able to find an example to pass the parameter query part.