API details
 
Notifications
Clear all

API details

8 Posts
2 Users
0 Reactions
1,826 Views
Posts: 0
Topic starter
Joined: 1 second ago

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?

Topic Tags
7 Replies
Posts: 0
Topic starter
Joined: 1 second ago

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?

Reply
3 Replies
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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.

 

Reply
Joined: 1 second ago

Posts: 0

@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.

 

Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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.

 

Reply
Posts: 1600
Admin
Noble Member
Joined: 10 years ago

Btw the Mailprotector API will be changing sooner than later because their API changed.

Reply
Posts: 0
Topic starter
Joined: 1 second ago

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.

Reply
1 Reply
Admin
Joined: 10 years ago

Noble Member
Posts: 1600

@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.

Reply
Share: