Object Management
All operations require authentication.
List objectsProduction
Returns the objects of the container, at most 500 per page. Filter by key prefix, and page with the marker: the key of the last object of the previous page.
Path parameters
Container ID
Project ID
Query parameters
Maximum number of objects to return. Defaults to 500. At most 500.
Only return objects whose keys sort after this one. Pass the key of the last object of the previous page to get the next page.
Only return objects whose keys begin with this prefix
Headers
Pagination cursor
Pagination size
Response
MIME type of the object content (Content-Type header), for example image/png
Entity tag of the object: the MD5 hash of its content, or a hash of the segment hashes for a large object
Object key, which is its full path within the container, for example documents/report.pdf
Last modification timestamp of the object
Seconds to wait before the object becomes readable, only set while retrievalState is UNSEALING
Retrieval state of the object, only meaningful in an archive container: SEALED objects must be unsealed before download, UNSEALING objects are being retrieved, UNSEALED objects can be downloaded. Absent in a standard container.
SEALEDUNSEALEDUNSEALINGObject size in bytes
Example uses containerId = string, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ swift/ container/ {containerId}/ object \
-H "authorization: Bearer $OVH_TOKEN"[ { "contentType": "string", "etag": "string", "key": "string", "lastModifiedAt": "2024-01-01T12:00:00Z", "retrievalDelay": 0, "retrievalState": "SEALED", "size": 0 }]
Get object metadataProduction
Returns the object metadata, without its content.
Path parameters
Container ID
Key
Project ID
Response
MIME type of the object content (Content-Type header), for example image/png
Entity tag of the object: the MD5 hash of its content, or a hash of the segment hashes for a large object
Object key, which is its full path within the container, for example documents/report.pdf
Last modification timestamp of the object
Seconds to wait before the object becomes readable, only set while retrievalState is UNSEALING
Retrieval state of the object, only meaningful in an archive container: SEALED objects must be unsealed before download, UNSEALING objects are being retrieved, UNSEALED objects can be downloaded. Absent in a standard container.
SEALEDUNSEALEDUNSEALINGObject size in bytes
Example uses containerId = string, key = string, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ swift/ container/ {containerId}/ object/ {key} \
-H "authorization: Bearer $OVH_TOKEN"{ "contentType": "string", "etag": "string", "key": "string", "lastModifiedAt": "2024-01-01T12:00:00Z", "retrievalDelay": 0, "retrievalState": "SEALED", "size": 0}
Delete an objectProduction
Deletes the object from the container.
Path parameters
Container ID
Key
Project ID
Response
Example uses containerId = string, key = string, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ swift/ container/ {containerId}/ object/ {key} \
-H "authorization: Bearer $OVH_TOKEN"Create a presigned URLProduction
Creates a temporary URL to download one object without credentials. The URL expires after the given time, one hour by default and seven days at most.
Path parameters
Container ID
Project ID
Request body (required)
Lifetime of the URL in seconds. Defaults to 3600 (one hour). At most 604800 (seven days).
Key of the object to grant access to, as its full path within the container, for example documents/report.pdf. The object does not need to exist yet.
Response
Timestamp after which the URL is refused
Key of the object the URL gives access to, as its full path within the container
HTTP method the URL is valid for. Always GET.
GETTemporary URL that downloads the object with a GET request, without credentials, until expiresAt
Example uses containerId = string, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ swift/ container/ {containerId}/ presign \
-H "authorization: Bearer $OVH_TOKEN"{ "expiresAt": "2024-01-01T12:00:00Z", "key": "string", "method": "GET", "url": "string"}