Help Center/ Server Migration Service/ API Reference/ API/ Task Management/ Setting Migration Rate Limiting Rules for a Migration Task
Updated on 2025-09-16 GMT+08:00

Setting Migration Rate Limiting Rules for a Migration Task

Function

This API is used to set migration rate limiting rules for a migration task.

Calling Method

For details, see Calling APIs.

URI

POST /v3/tasks/{task_id}/speed-limit

Table 1 Path parameter

Parameter

Mandatory

Type

Description

task_id

Yes

String

The migration task ID.

Minimum length: 0 characters

Maximum length: 255 characters

Request

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

X-Auth-Token

The user token.

The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Minimum length: 1 character

Maximum length: 16,384 characters

Table 3 Request body parameter

Parameter

Mandatory

Type

Description

speed_limit

Yes

Array of SpeedLimitlJson objects

The information about the time period-based rate limiting rules.

Array length: 0 to 65,535

Table 4 SpeedLimitlJson field description

Parameter

Mandatory

Type

Description

start

Yes

String

The start time of a period. The format is XX:XX.

Minimum length: 0 characters

Maximum length: 255 characters

end

Yes

String

The end time of a period. The format is XX:XX.

Minimum length: 0 characters

Maximum length: 255 characters

speed

Yes

Integer

The migration rate limit for the specified period. The value is an integer ranging from 0 to 1000. The unit is Mbit/s.

Minimum value: 0

Maximum value: 10000

Response

Status code: 200

OK

None

Example Request

  • This example sets migration rate limits for a task.

    POST https://{endpoint}/v3/tasks/7a9a9540-ff28-4869-b9e4-855fbe12e83b/speed-limit
    
    {
      "speed_limit" : [ {
        "start" : "00:00",
        "end" : "23:59",
        "speed" : 0
      } ]
    }
  • This example updates migration rate limits for the task with ID a45a300b-86b5-4b13-8802-52274fa43016.

    POST https://{endpoint}/v3/tasks/a45a300b-86b5-4b13-8802-52274fa43016/speed-limit
    
    {
      "speed_limit" : [ {
        "start" : "0:00",
        "end" : "8:00",
        "speed" : 20
      }, {
        "start" : "8:00",
        "end" : "15:00",
        "speed" : 50
      }, {
        "start" : "15:00",
        "end" : "23:59",
        "speed" : 25
      } ]
    }

Example Response

None

Status Codes

Status Code

Description

200

OK

Error Codes

For details, see Error Codes.