Object Management
All operations require authentication.
List objectsAlpha
Returns the objects of the bucket. Filter by key prefix, and group keys with a delimiter.
Path parameters
Bucket name
Project ID
Query parameters
Delimiter for grouping keys into common prefixes. Defaults to /.
Filter objects whose keys begin with this prefix
Include all object versions and delete markers
Headers
Pagination cursor
Pagination size
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the entry is a delete marker or a common prefix.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAIdentifier of the version
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"[ { "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
Returns the object metadata, without its content.
Path parameters
Bucket name
Key
Project ID
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the entry is a delete marker or a common prefix.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAIdentifier of the version
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"{ "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
Sets the retention period or the legal hold of the object. A locked object cannot be deleted or overwritten.
Path parameters
Bucket name
Key
Project ID
Request body (required)
Object legal hold status
OFFONObject lock retention configuration
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the entry is a delete marker or a common prefix.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAIdentifier of the version
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"{ "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
Deletes the object. On a versioned bucket, adds a delete marker instead of removing the object.
Path parameters
Bucket name
Key
Project ID
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the entry is a delete marker or a common prefix.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAIdentifier of the version
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"{ "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
Deletes a list of objects in one request. To delete a large number of objects, use lifecycle rules instead.
Path parameters
Bucket name
Project ID
Request body (required)
Objects to delete
Response
Successfully deleted objects
Failed deletions
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"{ "deleted": [ { "deleteMarkerVersionId": "string", "key": "string", "versionId": "string", "wasADeleteMarker": true } ], "errors": [ { "code": "string", "key": "string", "message": "string", "versionId": "string" } ]}
Create a presigned URLAlpha
Creates a temporary URL to download or upload an object without credentials. The URL expires after the given time.
Path parameters
Bucket name
Project ID
Request body (required)
URL expiration time in seconds. When omitted, one hour (3600).
Object key of new object or existing object to access
HTTP method for the presigned URL
DELETEGETPUTStorage class for PUT uploads
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAIdentifier of the object version
Response
URL expiration timestamp
Object key
Presigned URL method
DELETEGETPUTHeaders you must send with the request, exactly as returned here. The signature covers them, so changing or omitting one makes the request be refused.
Presigned URL for object access
Identifier of the version
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"{ "expiresAt": "2024-01-01T12:00:00Z", "key": "string", "method": "DELETE", "signedHeaders": { "key": "string" }, "url": "string", "versionId": "string"}
Copy an objectAlpha
Copies the object to another key or bucket, optionally in another storage class. The current version is copied unless a versionId is given in the body.
Path parameters
Bucket name
Key
Project ID
Request body (required)
Destination bucket ID, written like the bucket ID in the path (REGION_NAME, for example GRA_my-bucket)
Destination object key
Storage class for the copy
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAVersion of the source object to copy. When omitted, the current version is copied. Leave it absent on a bucket without versioning.
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the entry is a delete marker or a common prefix.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAIdentifier of the version
Example uses bucketName = string, key = string, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ object/ bucket/ {bucketName}/ object/ {key}/ copy \
-H "authorization: Bearer $OVH_TOKEN"{ "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"}
Restore an archived objectAlpha
Makes an archived object readable again for a given number of days. Works whether or not versioning is enabled on the bucket. The current version is restored unless a versionId is given in the body.
Path parameters
Bucket name
Key
Project ID
Request body (required)
Number of days to keep the restored copy
Version of the archived object to restore. When omitted, the current version is restored. Leave it absent on a bucket without versioning.
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the entry is a delete marker or a common prefix.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAIdentifier of the version
Example uses bucketName = string, key = string, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ object/ bucket/ {bucketName}/ object/ {key}/ restore \
-H "authorization: Bearer $OVH_TOKEN"{ "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"}
List object versionsAlpha
Returns all versions of the object. Versioning must be enabled on the bucket at creation.
Path parameters
Bucket name
Key
Project ID
Headers
Pagination cursor
Pagination size
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the version is a delete marker.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAUnique identifier of the version
Example uses bucketName = string, key = string, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ object/ bucket/ {bucketName}/ object/ {key}/ version \
-H "authorization: Bearer $OVH_TOKEN"[ { "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 an object versionAlpha
Returns the metadata of one version of the object.
Path parameters
Bucket name
Key
Project ID
Version ID
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the version is a delete marker.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAUnique identifier of the version
Example uses bucketName = string, key = string, projectId = string, versionId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ object/ bucket/ {bucketName}/ object/ {key}/ version/ {versionId} \
-H "authorization: Bearer $OVH_TOKEN"{ "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 version lock or legal holdAlpha
Sets the retention period or the legal hold of one version of the object.
Path parameters
Bucket name
Key
Project ID
Version ID
Request body (required)
Object legal hold status
OFFONObject lock retention configuration
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the version is a delete marker.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAUnique identifier of the version
Example uses bucketName = string, key = string, projectId = string, versionId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ object/ bucket/ {bucketName}/ object/ {key}/ version/ {versionId} \
-H "authorization: Bearer $OVH_TOKEN"{ "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 object versionAlpha
Permanently deletes one version of the object, without adding a delete marker.
Path parameters
Bucket name
Key
Project ID
Version ID
Response
Entity tag (hash of the object content). The etag is omitted when isDeleteMarker is true.
Whether this entry represents a common prefix (virtual directory)
Whether this version is a delete marker
Whether this is the latest version of the object
Object key (path within the bucket)
Last modification timestamp. Omitted when the entry is a common prefix.
Object legal hold status
OFFONObject lock retention configuration
Replication status of the object
COMPLETEDFAILEDNONEPENDINGREPLICARestore status for archived objects
Object size in bytes
Storage class of the object. Omitted when the version is a delete marker.
DEEP_ARCHIVEGLACIER_IRHIGH_PERFSTANDARDSTANDARD_IAUnique identifier of the version
Example uses bucketName = string, key = string, projectId = string, versionId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ storage/ object/ bucket/ {bucketName}/ object/ {key}/ version/ {versionId} \
-H "authorization: Bearer $OVH_TOKEN"{ "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"}