0% found this document useful (0 votes)
38 views6 pages

End Point

The document outlines various API endpoints, methods, payloads, and responses for authenticating with and retrieving information from a PBX system. It includes endpoints for logging in to obtain a token, getting current user information using the token, and retrieving status details on items like SIP, IAX, extensions, trunks, and reloading Asterisk.

Uploaded by

mhjeelmex
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views6 pages

End Point

The document outlines various API endpoints, methods, payloads, and responses for authenticating with and retrieving information from a PBX system. It includes endpoints for logging in to obtain a token, getting current user information using the token, and retrieving status details on items like SIP, IAX, extensions, trunks, and reloading Asterisk.

Uploaded by

mhjeelmex
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

End Point : Method :

https://192.168.1.100/api/v1/pbx/auth/ POST
login
Payload :
{
"username": "admin",
"password": "admin"
}

Response :
{
"code": 0,
"message": "OK",
"data": "Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VyTmFtZSI6ImFkbWluIiwiSUQiOjEs
IlJvbGUiOiJhZG1pbiIsIkV4dGVuc2lvbiI6IiIsImV4cCI6MTcwMzM3MTQ2NH0.G5YND-
nSNLmPZPAQCfI_iOxwhSO0MJhrTBFkWG1LB3I"
}
Note :
Authentication Request
End Point : Method :
https://192.168.1.100/api/v1/pbx/auth/currentuser GET
Payload :

Request Header (Token)

Bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VyTmFtZSI6ImFkbWluIiwiSUQiOjEsIlJv
bGUiOiJhZG1pbiIsIkV4dGVuc2lvbiI6IiIsImV4cCI6MTcwMzM3MTQ2NH0.G5YND-
nSNLmPZPAQCfI_iOxwhSO0MJhrTBFkWG1LB3I

Response :
{
"code": 0,
"message": "OK",
"data": {
"id": 1,
"username": "admin",
"password": "admin",
"role": "admin",
"userExtension": "",
"panelQueueNumber": ""
}
}
Note :
Get User info by bearer token
End Point : Method :
GET
https://192.168.1.100/api/v1/pbx/systeminfo/pjsip
Payload :

Request Header (Token)

Response :
{"code":0,"message":"OK","data":{"available":0,"total":0}}
Note :

End Point : Method :


GET
https://192.168.1.100/api/v1/pbx/systeminfo/
[X]
Payload :

Request Header (Token)

Response :
{"code":0,"message":"OK","data":{"available":0,"total":0}}
Note :

[X] = {pjsip,sip,iax2,analog,digital,cpu,calls,mem,traffic,disk,version, device-info}


End Point : Method :
GET
https://192.168.1.100/api/v1/pbx/systeminfo/
extension-status?_t=1700648470604
Payload :

Request Header (Token)

Response :
{
"code": 0,
"message": "OK",
"data": [
{
"exten": "100",
"name": "100",
"content": {
"newMsg": "",
"dnd": "",
"wakeup": null
},
"roundtripUsec": "",
"addr": "",
"uri": "",
"statusText": "Unavailable"
}
]
}
Note :
End Point : Method :
GET
https://192.168.1.100/api/v1/pbx/systeminfo/trunk-
info

Payload :

Request Header (Token)

Response :
{
"code": 0,
"message": "OK",
"data": {
"analogOut": "1:1:FXO:RED:Idle:001\n2:2:FXO:RED:Idle:002",
"digitalOut": "",
"iaxOut": "",
"sipOut": "test:client:192.168.1.25:nan:Unregistered"
}
}
Note :

End Point : Method :


GET
https://192.168.1.100/api/v1/pbx/system/reload
-asterisk

Payload :

Request Header (Token)

Response :
{"code":0,"message":"OK","data":{"available":0,"total":0}}
Note :
Apply Changes

End Point : Method :

Payload :

Response :

Note :

You might also like