Oracle OCI : Error messages when executing Rest API to get buckets list

132 Views Asked by At

I'm running the following Rest API in order to list our buckets:

https://objectstorage.{{MYREGION}}.oraclecloud.com/20160918/n/{{TENANCY}}/b/{{BUCKETNAME}}/o

I'm getting the following error:

Illegal character in path at index 88: https://objectstorage.{{MYREGION}}.oraclecloud.com/20160918/n/{{TENANCY}}/b/{{BUCKETNAME}}/o

Why is that?

I couldn't find any reference on that on Oracle's documentation

Tried to modify the Rest API with several permutations, All are ending with the same message "Illegal character in path at index"

1

There are 1 best solutions below

2
On

If you want to list the buckets, you have the wrong endpoint. There's no information in the docs indicating the version 20160918 should be passed in the uri.

The correct uri should be

https://objectstorage.{{MYREGION}}.oraclecloud.com/n/{{TENANCY}}/b/?compartmentId={{compartmentId}}

src: https://docs.oracle.com/en-us/iaas/api/#/en/objectstorage/20160918/Bucket/ListBuckets