Skip to content

Swift Object Storage

All operations require authentication.

5 operationsv2/publicCloud/project
Agent setup

List containersProduction

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

Returns the containers of the project across every region offering Swift object storage.

Path parameters

projectId
required
string

Project ID

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Container[]successful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the container

currentState
read-only
ContainerCurrentState

Current observed state of the container, read from the Swift backend

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the container

id
read-only
string

Container identifier, built as _, for example GRA_my-container. A container name is unique within a region of the project, so the pair identifies it.

resourceStatus
read-only
ResourceStatusEnum

Container readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ContainerTargetSpec

Last target specification of the container

updatedAt
read-only
stringdate-time

Last update date of the container

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/swift/container \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "objectsCount": 0, "objectsSize": 0, "staticUrl": "string", "type": "PRIVATE" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "string", "resourceStatus": "CREATING", "targetSpec": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "type": "PRIVATE" }, "updatedAt": "2024-01-01T12:00:00Z" }]

Create a containerProduction

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

Creates a container in a region. The archive policy, the access type and the CORS origins can be set at creation. Name, region and archive policy cannot be changed afterward.

Path parameters

projectId
required
string

Project ID

Request body (required)

targetSpec
required
ContainerTargetSpec

Desired target specification for the container to create

Response

200Containersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the container

currentState
read-only
ContainerCurrentState

Current observed state of the container, read from the Swift backend

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the container

id
read-only
string

Container identifier, built as _, for example GRA_my-container. A container name is unique within a region of the project, so the pair identifies it.

resourceStatus
read-only
ResourceStatusEnum

Container readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ContainerTargetSpec

Last target specification of the container

updatedAt
read-only
stringdate-time

Last update date of the container

400objectError 400 response
409objectError 409 response

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/swift/container \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "objectsCount": 0, "objectsSize": 0, "staticUrl": "string", "type": "PRIVATE" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "string", "resourceStatus": "CREATING", "targetSpec": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "type": "PRIVATE" }, "updatedAt": "2024-01-01T12:00:00Z"}

Get a containerProduction

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

Returns the container configuration and its current state, including its object count and stored size.

Path parameters

containerId
required
string

Container ID

projectId
required
string

Project ID

Response

200Containersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the container

currentState
read-only
ContainerCurrentState

Current observed state of the container, read from the Swift backend

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the container

id
read-only
string

Container identifier, built as _, for example GRA_my-container. A container name is unique within a region of the project, so the pair identifies it.

resourceStatus
read-only
ResourceStatusEnum

Container readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ContainerTargetSpec

Last target specification of the container

updatedAt
read-only
stringdate-time

Last update date of the container

404objectError 404 response

Example uses containerId = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/swift/container/{containerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "objectsCount": 0, "objectsSize": 0, "staticUrl": "string", "type": "PRIVATE" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "string", "resourceStatus": "CREATING", "targetSpec": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "type": "PRIVATE" }, "updatedAt": "2024-01-01T12:00:00Z"}

Update a containerProduction

PUT
/v2/publicCloud/project/{projectId}/storage/swift/container/{containerId}

Updates the access type and the CORS origins of the container. Send the current checksum to prevent overwriting a concurrent change. Without it, the last write wins.

Path parameters

containerId
required
string

Container ID

projectId
required
string

Project ID

Request body (required)

checksum
string

Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins).

targetSpec
required
ContainerUpdateTargetSpec

Desired target specification for the container

Response

200Containersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the container

currentState
read-only
ContainerCurrentState

Current observed state of the container, read from the Swift backend

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the container

id
read-only
string

Container identifier, built as _, for example GRA_my-container. A container name is unique within a region of the project, so the pair identifies it.

resourceStatus
read-only
ResourceStatusEnum

Container readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ContainerTargetSpec

Last target specification of the container

updatedAt
read-only
stringdate-time

Last update date of the container

400objectError 400 response
404objectError 404 response
409objectError 409 response

Example uses containerId = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/swift/container/{containerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "objectsCount": 0, "objectsSize": 0, "staticUrl": "string", "type": "PRIVATE" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "string", "resourceStatus": "CREATING", "targetSpec": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "type": "PRIVATE" }, "updatedAt": "2024-01-01T12:00:00Z"}

Delete a containerProduction

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

Deletes the container and every object it holds. The deletion is asynchronous: the container stays in DELETING status until it is emptied and removed.

Path parameters

containerId
required
string

Container ID

projectId
required
string

Project ID

Response

200Containersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the container

currentState
read-only
ContainerCurrentState

Current observed state of the container, read from the Swift backend

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the container

id
read-only
string

Container identifier, built as _, for example GRA_my-container. A container name is unique within a region of the project, so the pair identifies it.

resourceStatus
read-only
ResourceStatusEnum

Container readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
ContainerTargetSpec

Last target specification of the container

updatedAt
read-only
stringdate-time

Last update date of the container

404objectError 404 response
409objectError 409 response

Example uses containerId = string, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/swift/container/{containerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "objectsCount": 0, "objectsSize": 0, "staticUrl": "string", "type": "PRIVATE" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "string", "resourceStatus": "CREATING", "targetSpec": { "archive": true, "cors": [ "string" ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string", "type": "PRIVATE" }, "updatedAt": "2024-01-01T12:00:00Z"}