API details
Hi!
I want to automate company creation but I need more info.
According to KB this should work:
GET http://192.168.123.123/company/DOL/users?ApiKey=yNU5vxA…qopKw==
… but it does not – Postman receives the login page.
When setting header “Accept” to “application/json” I get HTTP 406.
What am I missing?
Ok, seems to be caused by entering the wrong IP as filter (NAT against test machine).
I now get results but how do I know which params I can set for the API? Is this documented or do I need to sniff POST-data using a browser plugin to reverse engineer?
@syfy323 The API isn’t documented very well right now. You will need to look at the post data using the tools built into the browser to see what CloudPanel passes. We are working on moving from the Nancy framework to WebAPI which will allow us to document the API much easier and in detail.
Â
@jdixon Thank you. Please keep the old API available in new releases along the new one for some time to migrate. I need to integrate the CP now but will depend on it once it is finished. I’m fine with a migration to the new one later but that has to work side by side for a flawless migration.
I don’t know much about IIS/ASP/.NET but it should be possible to have at least one migration release featuring both APIs, right?
I will now try to integrate some API calls I captured today into my application. It will be open source and is located here:
https://bitbucket.org/code-orange/django-ucstack-backend
This project is new but it’s part of a large ISP suite, that we develop at Dolphin IT. Development has started two years ago and a lot of datacenters in Germany run our code (and some of them run your CP 🙂 ).
Thats why we need a stable API.
Â
@syfy323 The current API will remain for multiple versions once we move to the new platform. We are a little ways away from that though. I’ll keep checking out the project and if you need anything or run into problems you send us an email to chat offline.
Â
Btw the Mailprotector API will be changing sooner than later because their API changed.
I’ve got some updates.
Some of the APIs are already implemented in:
https://bitbucket.org/code-orange/django-directory-backend
It mixes CloudPanel APIs with LDAP, as we implemented some features by utilizing new AD/LDAP attributes.
Next will be Exchange specific support using CP/LDAP in:
https://bitbucket.org/code-orange/django-ucstack-backend
The APIs that are made available are being used by our frontend (which got the same name like yours):
https://bitbucket.org/code-orange/django-cloud-panel
We are not using Mailprotector btw. We got a lot of other products that need to be unified in one single frontend for the customer.
@syfy323 Great! I would be interested in seeing the front end if you want to connect sometime. Also if you run into any issues with the API, just let me know and we can work together on it.
- 5 Forums
- 716 Topics
- 3,649 Posts
- 1 Online
- 258 Members