Skip to content

Object Management

All operations require authentication.

6 operationsv2/publicCloud/project
Agent setup

List objectsAlpha

GET
/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object

Returns the objects of the bucket. Filter by key prefix, and group keys with a delimiter.

Path parameters

bucketName
required
string

Bucket name

projectId
required
string

Project ID

Query parameters

delimiter
string

Delimiter for grouping keys into common prefixes. Defaults to /.

prefix
string

Filter objects whose keys begin with this prefix

withVersions
boolean

Include all object versions and delete markers

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200S3Object[]successful operation
etag
read-only
string

Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.

isCommonPrefix
read-only
boolean

Whether this entry represents a common prefix (virtual directory)

isDeleteMarker
read-only
boolean

Whether this version is a delete marker

isLatest
read-only
boolean

Whether this is the latest version of the object

key
read-only
string

Object key (path within the bucket)

lastModifiedAt
read-only
stringdate-time

Last modification timestamp. Omitted when the entry is a common prefix.

legalHold
read-only
S3ObjectLegalHoldStatusEnum

Object legal hold status

ValuesOFFON
lock
read-only
S3ObjectLock

Object lock retention configuration

replicationStatus
read-only
S3ObjectReplicationStatusEnum

Replication status of the object

ValuesCOMPLETEDFAILEDNONEPENDINGREPLICA
restoreStatus
read-only
S3ObjectRestoreStatus

Restore status for archived objects

size
read-only
integer

Object size in bytes

storageClass
read-only
StorageClassEnum

Storage class of the object. Omitted when the entry is a delete marker or a common prefix.

ValuesDEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IA
versionId
read-only
string

Identifier of the version

404objectError 404 response

Example uses bucketName = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "etag": "string", "isCommonPrefix": true, "isDeleteMarker": true, "isLatest": true, "key": "string", "lastModifiedAt": "2024-01-01T12:00:00Z", "legalHold": "OFF", "lock": { "mode": "COMPLIANCE", "retainUntil": "2024-01-01T12:00:00Z" }, "replicationStatus": "COMPLETED", "restoreStatus": { "expiresAt": "2024-01-01T12:00:00Z", "inProgress": true }, "size": 0, "storageClass": "DEEP_ARCHIVE", "versionId": "string" }]

Get object metadataAlpha

GET
/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key}

Returns the object metadata, without its content.

Path parameters

bucketName
required
string

Bucket name

key
required
string

Key

projectId
required
string

Project ID

Response

200S3Objectsuccessful operation
etag
read-only
string

Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.

isCommonPrefix
read-only
boolean

Whether this entry represents a common prefix (virtual directory)

isDeleteMarker
read-only
boolean

Whether this version is a delete marker

isLatest
read-only
boolean

Whether this is the latest version of the object

key
read-only
string

Object key (path within the bucket)

lastModifiedAt
read-only
stringdate-time

Last modification timestamp. Omitted when the entry is a common prefix.

legalHold
read-only
S3ObjectLegalHoldStatusEnum

Object legal hold status

ValuesOFFON
lock
read-only
S3ObjectLock

Object lock retention configuration

replicationStatus
read-only
S3ObjectReplicationStatusEnum

Replication status of the object

ValuesCOMPLETEDFAILEDNONEPENDINGREPLICA
restoreStatus
read-only
S3ObjectRestoreStatus

Restore status for archived objects

size
read-only
integer

Object size in bytes

storageClass
read-only
StorageClassEnum

Storage class of the object. Omitted when the entry is a delete marker or a common prefix.

ValuesDEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IA
versionId
read-only
string

Identifier of the version

404objectError 404 response

Example uses bucketName = string, key = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "etag": "string", "isCommonPrefix": true, "isDeleteMarker": true, "isLatest": true, "key": "string", "lastModifiedAt": "2024-01-01T12:00:00Z", "legalHold": "OFF", "lock": { "mode": "COMPLIANCE", "retainUntil": "2024-01-01T12:00:00Z" }, "replicationStatus": "COMPLETED", "restoreStatus": { "expiresAt": "2024-01-01T12:00:00Z", "inProgress": true }, "size": 0, "storageClass": "DEEP_ARCHIVE", "versionId": "string"}

Update object lock or legal holdAlpha

PUT
/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key}

Sets the retention period or the legal hold of the object. A locked object cannot be deleted or overwritten.

Path parameters

bucketName
required
string

Bucket name

key
required
string

Key

projectId
required
string

Project ID

Request body (required)

legalHold
S3ObjectLegalHoldStatusEnum

Object legal hold status

ValuesOFFON
lock
S3ObjectLock

Object lock retention configuration

Response

200S3Objectsuccessful operation
etag
read-only
string

Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.

isCommonPrefix
read-only
boolean

Whether this entry represents a common prefix (virtual directory)

isDeleteMarker
read-only
boolean

Whether this version is a delete marker

isLatest
read-only
boolean

Whether this is the latest version of the object

key
read-only
string

Object key (path within the bucket)

lastModifiedAt
read-only
stringdate-time

Last modification timestamp. Omitted when the entry is a common prefix.

legalHold
read-only
S3ObjectLegalHoldStatusEnum

Object legal hold status

ValuesOFFON
lock
read-only
S3ObjectLock

Object lock retention configuration

replicationStatus
read-only
S3ObjectReplicationStatusEnum

Replication status of the object

ValuesCOMPLETEDFAILEDNONEPENDINGREPLICA
restoreStatus
read-only
S3ObjectRestoreStatus

Restore status for archived objects

size
read-only
integer

Object size in bytes

storageClass
read-only
StorageClassEnum

Storage class of the object. Omitted when the entry is a delete marker or a common prefix.

ValuesDEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IA
versionId
read-only
string

Identifier of the version

404objectError 404 response

Example uses bucketName = string, key = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "etag": "string", "isCommonPrefix": true, "isDeleteMarker": true, "isLatest": true, "key": "string", "lastModifiedAt": "2024-01-01T12:00:00Z", "legalHold": "OFF", "lock": { "mode": "COMPLIANCE", "retainUntil": "2024-01-01T12:00:00Z" }, "replicationStatus": "COMPLETED", "restoreStatus": { "expiresAt": "2024-01-01T12:00:00Z", "inProgress": true }, "size": 0, "storageClass": "DEEP_ARCHIVE", "versionId": "string"}

Delete an objectAlpha

DELETE
/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key}

Deletes the object. On a versioned bucket, adds a delete marker instead of removing the object.

Path parameters

bucketName
required
string

Bucket name

key
required
string

Key

projectId
required
string

Project ID

Response

200S3Objectsuccessful operation
etag
read-only
string

Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.

isCommonPrefix
read-only
boolean

Whether this entry represents a common prefix (virtual directory)

isDeleteMarker
read-only
boolean

Whether this version is a delete marker

isLatest
read-only
boolean

Whether this is the latest version of the object

key
read-only
string

Object key (path within the bucket)

lastModifiedAt
read-only
stringdate-time

Last modification timestamp. Omitted when the entry is a common prefix.

legalHold
read-only
S3ObjectLegalHoldStatusEnum

Object legal hold status

ValuesOFFON
lock
read-only
S3ObjectLock

Object lock retention configuration

replicationStatus
read-only
S3ObjectReplicationStatusEnum

Replication status of the object

ValuesCOMPLETEDFAILEDNONEPENDINGREPLICA
restoreStatus
read-only
S3ObjectRestoreStatus

Restore status for archived objects

size
read-only
integer

Object size in bytes

storageClass
read-only
StorageClassEnum

Storage class of the object. Omitted when the entry is a delete marker or a common prefix.

ValuesDEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IA
versionId
read-only
string

Identifier of the version

404objectError 404 response

Example uses bucketName = string, key = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/object/{key} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "etag": "string", "isCommonPrefix": true, "isDeleteMarker": true, "isLatest": true, "key": "string", "lastModifiedAt": "2024-01-01T12:00:00Z", "legalHold": "OFF", "lock": { "mode": "COMPLIANCE", "retainUntil": "2024-01-01T12:00:00Z" }, "replicationStatus": "COMPLETED", "restoreStatus": { "expiresAt": "2024-01-01T12:00:00Z", "inProgress": true }, "size": 0, "storageClass": "DEEP_ARCHIVE", "versionId": "string"}

Delete several objectsAlpha

POST
/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/bulkDeleteObjects

Deletes a list of objects in one request. To delete a large number of objects, use lifecycle rules instead.

Path parameters

bucketName
required
string

Bucket name

projectId
required
string

Project ID

Request body (required)

objects
required
S3BulkDeleteObjectIdentifier[]

Objects to delete

Response

200S3BulkDeleteResultsuccessful operation
deleted
read-only
S3BulkDeletedObject[]

Successfully deleted objects

errors
read-only
S3BulkDeleteError[]

Failed deletions

404objectError 404 response

Example uses bucketName = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/bulkDeleteObjects \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "deleted": [ { "deleteMarkerVersionId": "string", "key": "string", "versionId": "string", "wasADeleteMarker": true } ], "errors": [ { "code": "string", "key": "string", "message": "string", "versionId": "string" } ]}

Create a presigned URLAlpha

POST
/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/presign

Creates a temporary URL to download or upload an object without credentials. The URL expires after the given time.

Path parameters

bucketName
required
string

Bucket name

projectId
required
string

Project ID

Request body (required)

expiresIn
integer

URL expiration time in seconds. When omitted, one hour (3600).

key
required
string

Object key of new object or existing object to access

method
required
PresignedURLMethodEnum

HTTP method for the presigned URL

ValuesDELETEGETPUT
storageClass
StorageClassEnum

Storage class for PUT uploads

ValuesDEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IA
versionId
string

Identifier of the object version

Response

200S3ObjectPresignedURLsuccessful operation
expiresAt
read-only
stringdate-time

URL expiration timestamp

key
read-only
string

Object key

method
read-only
PresignedURLMethodEnum

Presigned URL method

ValuesDELETEGETPUT
signedHeaders
read-only
object

Headers you must send with the request, exactly as returned here. The signature covers them, so changing or omitting one makes the request be refused.

url
read-only
string

Presigned URL for object access

versionId
read-only
string

Identifier of the version

404objectError 404 response

Example uses bucketName = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/object/bucket/{bucketName}/presign \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "expiresAt": "2024-01-01T12:00:00Z", "key": "string", "method": "DELETE", "signedHeaders": { "key": "string" }, "url": "string", "versionId": "string"}