Resource Center/Hardware/Primary Storage Operations/Local Storage Operations
POSTLocal Storage OperationsSince 0.6SynchronousAuth Required
AddLocalPrimaryStorage
AddLocalPrimaryStorage
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
urlStringRequiredThe URL of the local storage.
nameStringRequiredThe name of the local storage.
descriptionStringOptional. The detailed description of the local storage.
typeStringOptional. The primary storage type: LocalStorage.
zoneUuidStringRequiredThe zone UUID.
resourceUuidStringOptional. The resource UUID. If specified, the local storage will use this field as the UUID.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/primary-storage/local-storage
/zstack/v1/primary-storage/local-storage
Request Example
curl -X POST 'http://{host}/zstack/v1/primary-storage/local-storage' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"url":"<url>","name":"<name>","description":"<description>","type":"<type>","zoneUuid":"<zoneUuid>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "name": "PS1", "url": "/Cloud_ps", "type": "LocalStorage", "state": "Enabled", "status": "Connected", "attachedClusterUuids": [ "562116d368c8467c95c53321757538dc" ] } }Change History
This API has no change history records yet.
