Esta é uma API para cadastro de ramais.
Esta API é autenticada usando OAuth2, ver documentação de autenticação
API para listagem de ramais
GET /api/v1/cdm/extens HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
{
"cursor": {
"previous": "",
"current": "0",
"next": "",
"count": 2
},
"extens": [
{
"id": "AzHpFafAgjjzA5EREeyJc",
"number": "123999101",
"name": "Ramal01",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"type": "sip",
"password": "zFwa9Z"
},
{
"id": "AzHpFaqzTXHnzhny631ER",
"number": "123999102",
"name": "Ramal03",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"type": "sip",
"password": "bRrJDQy"
}
]
}
id
API para buscar um ramal
GET /api/v1/cdm/extens/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"number": "123999102",
"name": "Ramal03",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"type": "sip",
"password": "bRrJDQy"
}
API para criação de um ramal
POST /api/v1/cdm/extens HTTP/1.1
Host: cdm.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"number": "123919394",
"name": "Ramal09",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"type": "sip",
"password": "bRrJDQy"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"number": "123919394",
"name": "Ramal09",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"type": "sip",
"password": "bRrJDQy"
}
id
API para atualização de um ramal
PUT /api/v1/cdm/extens/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"name": "Ramal01"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"number": "123919394",
"name": "Ramal01",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"type": "sip",
"password": "bRrJDQy"
}
id
API de remoção de um ramal
DELETE /api/v1/cdm/extens/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json