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 Properties

  • expiry_time.limit

Default values

  • expiry_time.limit - "60"

  • 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

reserve_size

integer

Specifies the available reserve in the file clone split load for the given token. Also note that the minimum value for reserve size is 4KB and any value specified below 4KB will be rounded off to 4KB.

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"
    }
  },
  "num_records": 1,
  "records": [
    {
    }
  ]
}

Headers

Name Description Type

Location

Useful for tracking the resource location

string

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

13565959

Failed to create token for node node.name.

13565964

Reserve size cannot be negative.

Also see the table of common errors in the Response body overview section of this documentation.

Name Type Description

error

returned_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.

node

Name Type Description

name

string

Node name

uuid

string

Node UUID

token

token

Name Type Description

_links

self_link

expiry_time

expiry_time

node

node

reserve_size

integer

Specifies the available reserve in the file clone split load for the given token. Also note that the minimum value for reserve size is 4KB and any value specified below 4KB will be rounded off to 4KB.

uuid

string

Token UUID.

Name Type Description

next

href

self

href

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

returned_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.