Skip to main content
A newer release of this product is available.

Create a new token to reserve the split load

Contributors

POST /storage/file/clone/tokens

Introduced In: 9.10

Creates a new token to reserve the split load.

Required Properties

  • node.uuid

  • reserve-size

Optional Propeties

  • expiry_time.limit

  • expiry_time.left

  • volume file clone token create

Learn More

  • [DOC /storage/file/clone]

Creating clone tokens to reserve space for clone creation on the node

There is a limit on the amount of clone data that can undergo a split at a point of time on the node (clone split load). Clone tokens are used to reserve space from clone split load for clone creation. The POST operation is used to create clone tokens with reserve-size and expiry-time.limit in the body.<br>

# The API
/api/storage/file/clone/tokens

# The call
curl -X POST "https://<mgmt_ip>/api/storage/file/clone/tokens" -H "accept: application/hal+json" -d '{"node": {"uuid": "97255711-a1ad-11eb-92b2-0050568eb2ca"}, "reserve_size": "40M", "expiry_time": { "limit": "4200"} }'

# The response
{
"num_records": 1,
"records": [
  {
    "node": {
      "name": "node1"
    },
    "uuid": "286f6ae4-c94d-11eb-adb5-005056bbeb0b",
    "reserve_size": 41943040,
    "_links": {
      "self": {
        "href": "/api/storage/file/clone/tokens/97255711-a1ad-11eb-92b2-0050568eb2ca"
      }
    }
  }
]
}

Parameters

Name Type In Required Description

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

  • Default value:

Request Body

Name Type Description

_links

self_link

expiry_time

expiry_time

node

node_reference

reserve_size

integer

Specifies the available reserve in the file clone split load for the given token.

uuid

string

Token UUID.

Response

Status: 201, Created
Name Type Description

_links

collection_links

num_records

integer

Number of records.

records

array[token]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "records": [
    {
    }
  ]
}

Error

Status: Default, Error
Name Type Description

error

error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

self

href

expiry_time

Name Type Description

left

string

Specifies the time remaining before the given token expires in ISO-8601 format.

limit

string

Specifies when the given token expires in ISO-8601 format.

Name Type Description

self

href

node_reference

Name Type Description

_links

_links

name

string

uuid

string

token

token

Name Type Description

_links

self_link

expiry_time

expiry_time

node

node_reference

reserve_size

integer

Specifies the available reserve in the file clone split load for the given token.

uuid

string

Token UUID.

Name Type Description

next

href

self

href

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.