api:sbc:rule:list
Table of Contents
API : SBC Rules List
Introduction
This request will return a list of all the outbound routing rules that exists.
Request
| URL | https://api.telecomx.dk/sbc/rule | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER_ADMIN, ADMIN. | |
| Query | type | [optional] Type of rules to return: PREFIX - Prefix rules e.g. +462 ANUMBER - Callers number in E.164 format CUSTOMER - Id of calling customer DKCPS - CPS code of destination service operator |
| condition | [optional] Only rules whose condition contains this text. Only letters, digits and + are used - send + URL-encoded as %2B. |
|
Query examples
https://api.telecomx.dk/sbc/rule https://api.telecomx.dk/sbc/rule?type=PREFIX https://api.telecomx.dk/sbc/rule?type=PREFIX&condition=%2B46
Response
The response is an array of rules.
| Rule object (JSON) | ||
|---|---|---|
| _id | Id | Id of the rule. |
| type | String | Type of rule: PREFIX, ANUMBER, CUSTOMER, DKCPS. |
| condition | String | Condition to be met for rule to be applied: PREFIX - Prefix of full E.164 number, e.g. +462 ANUMBER - Callers number in E.164 format, e.g. +4570305050 CUSTOMER - Id of calling customer, a lowercase 24-character hex string, e.g. 650000000000000000000201 DKCPS - CPS code of destination service operator, e.g. 01011 |
| peer | String | Id of the peer to send outbound calls to if the rule is matched. |
| note | String | Note about the rule. |
| conditionName | String | Display name of the condition: the customer name for CUSTOMER, the service operator name for DKCPS, and the name of the customer owning the number for ANUMBER. Absent for PREFIX rules and when no name is found. |
Note that properties holding no value may be omitted from the object.
Response example
[ { "_id": "650000000000000000000101", "type": "PREFIX", "condition": "+462", "peer": "SUPERTEL", "note": null }, { "_id": "650000000000000000000102", "type": "ANUMBER", "condition": "+4500000001", "peer": "TELENOR2", "note": "Custom routing for customer X", "conditionName": "Example Customer A/S" }, { "_id": "650000000000000000000103", "type": "CUSTOMER", "condition": "650000000000000000000201", "peer": "TELENOR", "note": null, "conditionName": "Example Customer A/S" }, { "_id": "650000000000000000000104", "type": "DKCPS", "condition": "01011", "peer": "TDC", "note": null, "conditionName": "Example Operator A/S" } ]
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | <property> | Invalid input for the named property - the request body, query or URL parameter failed validation |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sbc/rule/list.txt · Last modified: by Mikkel Meerwaldt Jørgensen