logo

Automatic Outbound Call to Obtain Trunk Number List

Request Address

  • GET /v1/numbers/key-name

Request Parameters

  • QUERY
ParameterTypeNullableDescription
pageNuminttruePage number
pageSizeinttrueNumber of items per page
keywordStringtrueKeyword

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing identifier
codeStringfalseReturn code
bizCodeStringfalseBusiness code
messageStringfalseReturn message
visiblebooleanfalseVisibility indicator
pagingObjectfalsePagination information
paging.pageNumintfalsePage number, default is 1
paging.pageSizeintfalseNumber of items per page, default is 20
paging.totalLongfalseTotal number of queries
dataArraytrueResult set
data[].idLongfalseTrunk number ID
data[].nameStringfalseTrunk number name

Request Example

$ curl 'https://ip:port/api/v1/numbers/key-name?pageNum=1&pageSize=2&keyword=&AppId={appid}&Timestamp={mytime}&Token={Token}' -i -X GET -H 'Content-Type: application/json'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false,
    "paging": {
        "pageNum": 1,
        "pageSize": 2,
        "total": 2
    },
    "data": [
        {
            "id": 1,
            "name": "Trunk Number 01"
        },
        {
            "id": 2,
            "name": "Trunk Number 02"
        }
    ]
}