You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications)
Description of data structures
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
Data of a single registration (registration)
Data of all registrations (RegInfo)
|
Examples
For an internal number with ID 3, you need to find out the status of its registrations:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"In the "},{"type":"text","text":"authentication ","marks":[{"type":"strong"}]},{"type":"text","text":"section enter the "},{"type":"text","text":"Application_ID","marks":[{"type":"strong"}]},{"type":"text","text":" and "},{"type":"text","text":"Application_Secret","marks":[{"type":"strong"}]},{"type":"text","text":" values obtained during the application registration in the "},{"type":"text","text":"client_id ","marks":[{"type":"strong"}]},{"type":"text","text":"and "},{"type":"text","text":"client_secret","marks":[{"type":"strong"}]},{"type":"text","text":" fields, then click on the \""},{"type":"text","text":"Try it out!","marks":[{"type":"strong"}]},{"type":"text","text":"\" button. If the application data is correct, an access token ("},{"type":"text","text":"access_token","marks":[{"type":"strong"}]},{"type":"text","text":") will be returned in response. The received access token should be entered into the \""},{"type":"text","text":"Access Token Field","marks":[{"type":"strong"}]},{"type":"text","text":"\" at the top of the page and saved by clicking the \""},{"type":"text","text":"Set Token","marks":[{"type":"strong"}]},{"type":"text","text":"\" button."}]},{"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default"},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Method","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ResourseResource","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Data","marks":[{"type":"strong"}]}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"GET"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"/extension/registration/?extension_id=3"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":" "}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"136d4779-27f1-4840-a0c7-b9bda6c616a9","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"To send requests using the cURL program, set the values of the "},{"type":"text","text":"url ","marks":[{"type":"strong"}]},{"type":"text","text":"and "},{"type":"text","text":"access_token","marks":[{"type":"strong"}]},{"type":"text","text":" variables:"}]},{"type":"paragraph","content":[{"type":"text","text":"export url=\"https://<hostname>/api/ver1.0\"","marks":[{"type":"code"}]},{"type":"text","text":" "},{"type":"hardBreak"},{"type":"text","text":"(where the hostname — is the hostname of the API-server provider of IP-telephony),"}]},{"type":"paragraph","content":[{"type":"text","text":"export access_token=\"8SNsrS0jV35vfmKqKeKtRrHfpbg4UX\"","marks":[{"type":"code"}]},{"type":"text","text":" "},{"type":"hardBreak"},{"type":"text","text":"(the received access token)."}]},{"type":"paragraph","content":[{"type":"text","text":"Send a request:"}]},{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-X GET ${url}/extension/registration/?extension_id=3"}]}]},"id":"8d2929d7-ec4f-4e7b-8a16-155e4470b2c0","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[]}]},"id{"type":"e8a6c641-5600-40b1-82e2-3bdfb245c313text","labeltext":"In Python3",To send requests in Python, set the values of the variables URL and ACCESS_TOKEN:"}]},{"type":"paragraph"tab"}] |
System response:
Code Block | ||
---|---|---|
| ||
{
"registered":true,
"extension_id":3,
"registrations": [
{
"device":"Yealink SIP-T46G 28.72.14.5",
"real_address":"sip:xxx.xxx.xxx.xxx:62338",
"contact_address":"sip:000*002@192.168.5.52:5062",
"expires":699,
"registration_id": "uloc-572b0ffb-6d47-001"
}
]
} |
Now, let's delete the above registration:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":,"content":[{"type":"text","text":"URL = \"https://<hostname>/api/ver1.0\"","marks":[{"type":"code"}]},{"type":"hardBreak"},{"type":"text","text":"(where the hostname — is the hostname of the API-server provider of IP-telephony),"}]},{"type":"paragraph","content":[{"type":"tabletext","attrstext":{"isNumberColumnEnabled":false,"layout":"default"},"content"ACCESS_TOKEN = \"8SNsrS0jV35vfmKqKeKtRrHfpbg4UX\"","marks":[{"type":"tableRowcode","content":[}]},{"type":"tableHeader","attrs":{hardBreak"},"content":[{"type":"paragraphtext","contenttext":[{"type":"text","text":"Method","marks":[{"type":"strong"}]}]"(the received access token)."}]},{"type":"tableHeadercodeBlock","attrs":{},"contentlanguage":[{"type":"paragraph"python"},"content":[{"type":"text","text":"Resource","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Data","marks":[{"type":"strong"}]}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"DELETE"}]}]},{"type":"tableCell","attrs":{}#!/usr/bin/python\n\nimport requests\n\nurl = f\"{URL}/extension/registration/?extension_id=3\"\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}'\n}\nresponse = requests.get(url, headers=headers)\nprint(response.text)"}]}]},"id":"e8a6c641-5600-40b1-82e2-3bdfb245c313","label":"In Python3","type":"tab"}] |
System response:
Code Block | ||
---|---|---|
| ||
{
"registered":true,
"extension_id":3,
"registrations": [
{
"device":"Yealink SIP-T46G 28.72.14.5",
"real_address":"sip:xxx.xxx.xxx.xxx:62338",
"contact_address":"sip:000*002@192.168.5.52:5062",
"expires":699,
"registration_id": "uloc-572b0ffb-6d47-001"
}
]
} |
Now, let's delete the above registration:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"type":"paragraphtable","contentattrs":[{"typeisNumberColumnEnabled":false,"layout":"textdefault"},"textcontent":[{"type":"/extension/3/registration/uloc-572b0ffb-6d47-001"}]}]},tableRow","content":[{"type":"tableCelltableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Method","marks":" "}][{"type":"strong"}]}]}]},{"type":"tableHeader","paragraph","content":[attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Resource","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Data","marks":[{"type":"strong"}]}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"DELETE"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"/extension/3/registration/uloc-572b0ffb-6d47-001"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":" "}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"dd87d80d-e504-45f8-86f4-9d0a6e742ffe","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-X DELETE ${url}/extension/3/registration/uloc-572b0ffb-6d47-001"}]}]},"id":"f901ec6e-0aed-48be-b307-a3d20ca87589","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f\"{URL}/extension/3/registration/uloc-572b0ffb-6d47-001\"\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}'\n}\nresponse = requests.delete(url, headers=headers)\nprint(response.text)"}]}]},"id":"dd87d80d6c70b3cd-e504120d-45f84413-86f48fe0-9d0a6e742ffe5db8ea357965","label":"InteractiveIn API BrowserPython3","type":"tab"}] |
If the client has a lot of internal numbers, it is more convenient to get data about them in blocks:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"type":"codeBlocktable","attrs":{"attrsisNumberColumnEnabled":{false,"languagelayout":"shelldefault"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-X DELETE ${url}/extension/3/registration/uloc-572b0ffb-6d47-001"}]}]},"id":"f901ec6e-0aed-48be-b307-a3d20ca87589","label":"cURL Program","type":"tab"}] |
If the client has a lot of internal numbers, it is more convenient to get data about them in blocks:
Tabs |
---|
[{"content":{"version":1,"type":"doc","tableRow","content":[{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Method","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"tableparagraph","attrscontent":[{"isNumberColumnEnabledtype":false"text","layouttext":"defaultResource"},"contentmarks":[{"type":"tableRow","content":[strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"MethodData","marks":[{"type":"strong"}]}]}]}]},{"type":"tableHeadertableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Resource","marks":[{"type":"strong"GET"}]}]}]},{"type":"tableHeadertableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Data","marks":[{"type":"strong/extension/registration/?extension_id=3&extension_id=2"}]}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"GET "}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"2eb49bdd-1e71-4417-9cf7-3a334f588a54","label":"tableCellInteractive API Browser","attrstype":{"tab"},{"content":[{"typeversion":"paragraph"1,"content":[{"type":"textdoc","text":"/extension/registration/?extension_id=3&extension_id=2"}]}]},content":[{"type":"tableCellcodeBlock","attrs":{},"contentlanguage":[{"type":"paragraph""shell"},"content":[{"type":"text","text":" "}]}]}]}]},{"type":"paragraph","content":[curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-X GET ${url}/extension/registration/?extension_id=3&extension_id=2"}]}]},"id":"2eb49bddcbc3fbaa-1e71352a-4417422a-9cf7a7d8-3a334f588a545b63e5fb694f","label":"InteractivecURL API BrowserProgram","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shellpython"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-X GET ${url#!/usr/bin/python\n\nimport requests\n\nurl = f\"{URL}/extension/registration/?extension_id=3&extension_id=2\"\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}'\n}\nresponse = requests.get(url, headers=headers)\nprint(response.text)"}]}]},"id":"cbc3fbaa461668a6-352acb14-422a421d-a7d8acd4-5b63e5fb694f82e0d840c58c","label":"cURLIn ProgramPython3","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Resources of the "Internal number" section
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
GET /extension/registration/ Get the registration status of all internal numbers Request parameters
Response fields
|
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
GET /extension/{extension_id}/registration/ Get the internal number registration status Request parameters
Response fields
|
Expand | ||||
---|---|---|---|---|
| ||||
DELETE /extension/{extension_id}/registration/ Delete all registrations on the internal number Request parameters
|
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
DELETE /extension/{extension_id}/registration/{registration_id} Delete a specific registration on an internal number Request parameters
|