Skip to content

Object Management

All operations require authentication.

4 operationsv2/publicCloud/project
Agent setup

List objectsProduction

GET
/v2/publicCloud/project/{projectId}/storage/swift/container/{containerId}/object

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

containerId
required
string

Container ID

projectId
required
string

Project ID

Query parameters

limit
integer

Maximum number of objects to return. Defaults to 500. At most 500.

marker
string

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.

prefix
string

Only return objects whose keys begin with this prefix

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200ContainerObject[]successful operation
contentType
read-only
string

MIME type of the object content (Content-Type header), for example image/png

etag
read-only
string

Entity tag of the object: the MD5 hash of its content, or a hash of the segment hashes for a large object

key
read-only
string

Object key, which is its full path within the container, for example documents/report.pdf

lastModifiedAt
read-only
stringdate-time

Last modification timestamp of the object

retrievalDelay
read-only
integer

Seconds to wait before the object becomes readable, only set while retrievalState is UNSEALING

retrievalState
read-only
ObjectRetrievalStateEnum

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.

ValuesSEALEDUNSEALEDUNSEALING
size
read-only
integer

Object size in bytes

400objectError 400 response
404objectError 404 response

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"
ResponseExample
[ { "contentType": "string", "etag": "string", "key": "string", "lastModifiedAt": "2024-01-01T12:00:00Z", "retrievalDelay": 0, "retrievalState": "SEALED", "size": 0 }]

Get object metadataProduction

GET
/v2/publicCloud/project/{projectId}/storage/swift/container/{containerId}/object/{key}

Returns the object metadata, without its content.

Path parameters

containerId
required
string

Container ID

key
required
string

Key

projectId
required
string

Project ID

Response

200ContainerObjectsuccessful operation
contentType
read-only
string

MIME type of the object content (Content-Type header), for example image/png

etag
read-only
string

Entity tag of the object: the MD5 hash of its content, or a hash of the segment hashes for a large object

key
read-only
string

Object key, which is its full path within the container, for example documents/report.pdf

lastModifiedAt
read-only
stringdate-time

Last modification timestamp of the object

retrievalDelay
read-only
integer

Seconds to wait before the object becomes readable, only set while retrievalState is UNSEALING

retrievalState
read-only
ObjectRetrievalStateEnum

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.

ValuesSEALEDUNSEALEDUNSEALING
size
read-only
integer

Object size in bytes

404objectError 404 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"
ResponseExample
{ "contentType": "string", "etag": "string", "key": "string", "lastModifiedAt": "2024-01-01T12:00:00Z", "retrievalDelay": 0, "retrievalState": "SEALED", "size": 0}

Delete an objectProduction

DELETE
/v2/publicCloud/project/{projectId}/storage/swift/container/{containerId}/object/{key}

Deletes the object from the container.

Path parameters

containerId
required
string

Container ID

key
required
string

Key

projectId
required
string

Project ID

Response

200—successful operation

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

POST
/v2/publicCloud/project/{projectId}/storage/swift/container/{containerId}/presign

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

containerId
required
string

Container ID

projectId
required
string

Project ID

Request body (required)

expiresIn
integer

Lifetime of the URL in seconds. Defaults to 3600 (one hour). At most 604800 (seven days).

key
required
string

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

200ContainerPresignedURLsuccessful operation
expiresAt
read-only
stringdate-time

Timestamp after which the URL is refused

key
read-only
string

Key of the object the URL gives access to, as its full path within the container

method
read-only
ContainerPresignedURLMethodEnum

HTTP method the URL is valid for. Always GET.

ValuesGET
url
read-only
string

Temporary URL that downloads the object with a GET request, without credentials, until expiresAt

400objectError 400 response
404objectError 404 response

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"
ResponseExample
{ "expiresAt": "2024-01-01T12:00:00Z", "key": "string", "method": "GET", "url": "string"}