v1

latestOpenAPI 3.0.0(C) Copyright IBM Corp. 2016 All Rights Reserved.2026-07-144737155.4 KB
Volumes

Share a volume with another space

This endpoint provisions an existing volume that was created in one space to another space within the same organization. Single containers and container groups in each space can read and write to the shared volume. The volume remains owned by the original space it was created in, including management and billing. For example, the volume can be deleted from the original space only.

post/volumes/{name}

Path parameters

namestring required

The name of the volume that you want to share with another space in your organization.

Headers

X-Auth-Tokenstring required

The Bluemix JSON web token that you receive when logging into Bluemix. Run cf oauth-token to retrieve your access token.

X-Auth-Project-Idstring required

The unique ID of your organization space where you want to create or work with your containers. Run cf space <space_name> --guid, where <space_name> is the name of your space, to retrieve your space ID.

Request body

addSpacesstring[]

The name or ID of the space where you want to provision your existing volume. Run cf spaces to retrieve the name, or cf space <space_name> --guid to retrieve the space ID.

removeSpacesstring[]

The name or ID of the space from which you want to unprovision your existing volume. Run cf spaces to retrieve the name, or cf space <space_name> --guid to retrieve the space ID.

Response

Ok. A list with detailed information about the volume is returned. Review the changes in the otherSpaceVisibility property.

fsIDstring

Unique identifier representing the file share on which the volume is hosted.

hostPathstring

Full path to the mounted volume inside the container.

otherSpaceVisibilitystring[]

List of space IDs in which the volume is visible and can be used by all the single containers and container groups.

spaceGuidstring

Unique identifier representing the space where the volume got created.

volNamestring

The name of the volume.