Save Trunk Assignments

Saves the trunk assignment configuration. Only Admin can perform this operation.

Request URL

PUT {base_url}/uc-cconfig/api/v1/trunks/{trunkId}/assignments

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

Path parameters
Parameter Required Type Description
trunkId Yes String The ID of the trunk. You can obtain the ID using the Search Trunks interface.
Body parameters
Parameter Required Type Description
assignedToMyTenant No Boolean

Whether to assign the trunk to My Tenant.

Valid value:

  • true: Assigned.
  • false: Not assigned.
resellerAssignments No Array<Reseller_Assignment_Input> The list of reseller assignments to save.
Reseller_Assignment_Input
Parameter Required Type Description
resellerId Yes String The ID of the reseller.
inboundLimit No Integer The concurrent inbound call limit. The value -1 indicates that it inherits the trunk limit. If not specified, -1 is used.
outboundLimit No Integer The concurrent outbound call limit. The value -1 indicates that it inherits the trunk limit. If not specified, -1 is used.
totalLimit No Integer The total concurrent call limit. The value -1 indicates that it inherits the trunk limit. If not specified, -1 is used.
didIds No Object<DID_IDs_Wrapper> The wrapper of the DID ID list. An empty array clears all DIDs for this reseller.
DID_IDs_Wrapper
Parameter Required Type Description
didIds No Array<String> The list of DID IDs. Each value must be greater than 0. An empty array clears all DIDs for this reseller.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Trunk_Assignments_Result> The saved trunk assignment configuration.
Trunk_Assignments_Result
Parameter Type Description
trunkId String The ID of the trunk.
assignedToMyTenant Boolean

Whether the trunk is assigned to My Tenant.

  • true: Assigned.
  • false: Not assigned.
resellerAssignments Array<Reseller_Assignment> The list of reseller assignments for this trunk.
Reseller_Assignment
Parameter Type Description
id String The ID of the assignment record.
resellerId String The ID of the reseller.
resellerName String The display name of the reseller.
inboundLimit Integer The concurrent inbound call limit. The value -1 indicates that it inherits the trunk limit.
outboundLimit Integer The concurrent outbound call limit. The value -1 indicates that it inherits the trunk limit.
totalLimit Integer The total concurrent call limit. The value -1 indicates that it inherits the trunk limit.
createdAt String The time when the assignment was created, in Unix timestamp format (milliseconds).
updatedAt String The time when the assignment was last updated, in Unix timestamp format (milliseconds).
didIds Array<String> The list of DID IDs that are assigned to this reseller and bound to this trunk.
dids Array<Trunk_Assignment_DID> The DID summary list, in the same order as didIds.
Trunk_Assignment_DID
Parameter Type Description
didId String The ID of the DID.
didDisplay String The DID number in default display format.
didName String The name of the DID.

Example

Request example

PUT /uc-cconfig/api/v1/trunks/367177966216302592/assignments HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzYxODgyMCwiaWF0IjoxNzkzNTk3MjIwLCJqdGkiOiIyYjQ2Mzc0Ni1mNWZiLTRiMzAtOWU4YS0xYTU2Nzg4YTJhZmMiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.TDat2yYryCWfinbBcjwK3oMGzSvzUyUGCD9gtiWhFqIc9Q7T-DRzfoh2RonMc6p2r3dLGzAW5oxPYLtPeM321fAusHImlpStweEEifjUeKMnfYERWPEm0WX4rr81sCP9ve-0jmQFklwLIxqmM_g_on-yYBvYfAYcPBEmaS7Xrhu_dLaX39egjVZPs6yzrRpNv_6ufm5RSrSMaukiHHI8lHwwIW2Sgd0TnzK8Maqd-oDE18157tu-P_jZfzwUjsbtH6GI3ZKWIffTU_YSIjniWZgXcjz5RxlsYKYmyxO6l9E8vf8oz2XHrsjkvKhsokN01Sv0IaLdizWgx2wjSo3doQ
Content-Type: application/json
{
  "assignedToMyTenant": true,
  "resellerAssignments": []
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "3af3f14fca246f61bcfd848c70ae6c78",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "trunkId": "367177966216302592",
    "assignedToMyTenant": true,
    "resellerAssignments": []
  }
}