0
votes

I am using openstack to upload an object to a container like explained here: https://docs.openstack.org/openstacksdk/latest//user/guides/object_store.html#uploading-objects

I would like to know if it is possible to programmatically know the public url of the file that I just uploaded.

I am using the python openstack sdk framework but I cannot find a method to have this with any of the endpoints that are available there.

3

3 Answers

1
votes

The Object Storage API supports the standard, non-serialized response format, which is the default, and both JSON and XML serialized response formats.I you are authorized , you can get it like :

/v1/{account}/{container}/{object}
/v1/12345678912345/my_files/mypicture01.jpg

For example, if the endpoint for Object Storage is objects.mycloud.com, the returned URL is "https://objects.openstackmycloud.com/v1/12345678912345/my_files".

To access a container, append the container name to the resource path.

To access an object, append the container and the object name to the path.

1
votes

I guess openstack using swift for object store, in that case you can use the swift python client:

https://docs.openstack.org/python-swiftclient/latest/service-api.html

0
votes

The endpoint is defined in your openstack and you can list the endpoints with

openstack endpoint list