Skip to main content
Resource Center/Hardware/Primary Storage Operations
PUTPrimary Storage OperationsSince 4.8.0SynchronousAuth Required

CleanUpStorageTrashOnPrimaryStorage

CleanUpStorageTrashOnPrimaryStorage

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Request Inputs

Path Parameters

  • uuidStringRequired

    The primary storage UUID.

Body Fields

  • cleanupstoragetrashonprimarystorageObjectRequired

    cleanupstoragetrashonprimarystorage request body object.

    • forceboolean

      Whether or not to force the primary storage to be cleaned.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • resultMapRequired

    The collection of successfully cleaned primary storage.

  • totalIntegerRequired

    The number of successfully cleaned primary storage.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

Endpoint

PUT/zstack/v1/primary-storage/{uuid}/storagetrash/actions

/zstack/v1/primary-storage/{uuid}/storagetrash/actions

Operation ID

CleanUpStorageTrashOnPrimaryStorage

Permalink

Request Example

curl -X PUT 'http://{host}/zstack/v1/primary-storage/{uuid}/storagetrash/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"cleanupstoragetrashonprimarystorage":{"force":true},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "result": { "pool-2": [ "E92501AC0F30486282317C3412E27307", "876D1F78BB35405DBBFEC61226B13FDA" ], "pool-1": [ "09f35ca96dfa4f7d8171a6583bbcc4fe", "7ae6b23ab27e48b7b7abd25c22f1f91a" ] }, "total": 4 }

Change History

This API has no change history records yet.

View all change history