3cx API /api/SystemStatus

Status
Not open for further replies.

3CXitelium

Silver Partner
Joined
Aug 18, 2015
Messages
15
Reaction score
3
Hello Everyone,

I use some api command to check my 3cx status with api like https://123.ch:5001/api/SystemStatus

I want to update my caller ID with the post request /api/edit/update. Does anyone have any experience in this?

thanks
Vince
 
  • Like
Reactions: VoIPTools
OK and without VoipTools ? any Idea ?
 
You can create your own API with web requests to read and write data. I've also done it and it isn't that hard to do.
 
  • Like
Reactions: Evolute IT
The only way to do it programmatically (today) is with the 3CX Call Control API, or with the VoIPTools REST API. However, the good news is that 3CX has announced their own REST API which is expected later this year. While we do not know exactly what will be possible with their API, I would expect changing your status will be one of the APIs they will provide.
 
  • Like
Reactions: Evolute IT
OK Wesley thanks.

Do you have any experience with post request /api/edit/update ? for change the caller id ?
 
OK Wesley thanks.

Do you have any experience with post request /api/edit/update ? for change the caller id ?
Not yet, I've only read data atm.
 
I want to update my caller ID with the post request /api/edit/update. Does anyone have any experience in this?

We do have it in JEDWare, but this is also a 3. part development.
Feel free to try it out.

1634632389280.png
 
Hi,
OK very nice. It's possible to pay only the caller ID ?

regards
Vincent
 
  • Like
Reactions: jed
Hello,

When I use postman for some post command no problem that's work.

1635413588285.png

But for the post update for caller I don't understand how that's work. Where is the id from the user ?
any idea ?

1635413510413.png

Thanks !
 
I guess this is why object 5 is used.

1635414143189.png
 
I guess this is why object 5 is used.

View attachment 25512
Nevermind about this, from what I see is that the value in "ObjectId" wil reset to 0 for each login session.

Edit : From what i've tested is that the "ObjectId" increases for each post request you try to make. for example:
When I make a post request for the first time in my login session the "ObjectId" value of this post request will be 1 and the second will be 2 and so on.
 
Last edited:
When I login to the 3CX server and I edit extension 100 it wil make the POST call to "api/ExtensionList/set". Inside the response of this call the "Id" is 1.
When I change the "Outbound Caller ID" and click on the "OK" button the update POST call to "api/edit/update" will be made. in my Request Payload I have this json:
{"Path":{"ObjectId":"1","PropertyPath":[{"Name":"OutboundCallerId"}]},"PropertyValue":"12345678910"}
In this Request Payload my ObjectId is also 1. Direct after this call the save Post Call "api/edit/save" will be made is also the Request Payload 1.
 
  • Like
Reactions: 3CXitelium
Ok I found it !
1635422957820.png


I take the id

and use here
1635423108967.png


And save
1635423153713.png

And that's work !
 
  • Like
Reactions: Wesley Telecomlijn
Clad that I could help you! I've also learned from this research :D
 
Yes thanks !

Wesley


Did you know how is with the cookie in the header ?

1635425798825.png
 
Last edited:
  • Like
Reactions: Evolute IT
OK how can I generate this cookie from postman for example ?
 
I think I found something
1635436654330.png

With this post request we have now a valid cookies :)
 
  • Like
Reactions: Wesley Telecomlijn
I think I found something
View attachment 25531

With this post request we have now a valid cookies :)
Hi 3CXitelium,

Look at the attachment in this message. I've created a demo for postman.
Don't forget to change the "url" variable at the collection and the username and password at the body of the Login call. also change the extension ID (not he extension number) in the body at the call "Edit E100"
 

Attachments

Last edited:
Status
Not open for further replies.

Forum statistics

Threads
111,975
Messages
590,084
Members
164,903
Latest member
dross