Updated on 2022-08-02 GMT+08:00

Setting the Migration Rate

Function

This API is used to set the migration rate of a migration task.

URI

POST /v1/sms/tasks/{task_id}/speed-limit

For details about the parameters, see Table 1.
Table 1 Parameter description

Parameter

Mandatory

Type

Description

task_id

Yes

String

Specifies the ID of the task for which the speed limit needs to be set.

Request

Request parameters

For details about the request parameter, see Table 2.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

speed_limit

Yes

Integer

Specifies the information about the time segment when the migration rate is limited. For details, see Table 3.

Table 3 speed_limit data structure

Parameter

Mandatory

Type

Description

start

Yes

String

Specifies the start time of a segment. The format is: XX:XX.

end

Yes

String

Specifies the end time of a segment. The format is: XX:XX.

speed

Yes

Integer

Specifies the migration rate in a time segment. The value is an integer ranging from 0 to 1000. Unit: Mbit/s.

Response

N/A

Example

  • Example request

    POST /v1/sms/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": "24:00", 
                "speed": 25 
            } 
        ] 
    }
  • Example response

    None

Status Codes

See Status Codes.