CyberHosting

Turn API on for every new user

edited November 5 in General Discussion
Is it possible to turn API on for every new user?

I am using CURL api to create new website as below.



curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"adminUser\": \"admin\",
\"adminPass\": \"1234567\",
\"domainName\": \"cyberpanel.net\",
\"ownerEmail\": \"[email protected]\",
\"packageName\": \"Default\",
\"websiteOwner\": \"newowner\",
\"ownerPassword\": \"password\"
}" \
'https://talkshosting.com:8090/api/createWebsite'

Comments

  • I can add the option in this API, you can control the API switch with that option. Would that be fine?
  • @CyberPanel I just realised it already comes with API switched "on" if I create a new website with using your API already thank you.

    It would be very useful if you could add ACL selection in to API so we could also automate reseller creations or special ACL's etc.

    Thank you
  • I've added additional option to same API end point. You can pass acl

    If you don't pass this value it will default to user. (This will come in v1.9.2). It will be like
    --data-binary "{
    \"adminUser\": \"admin\",
    \"adminPass\": \"1234567\",
    \"domainName\": \"cyberpanel.net\",
    \"ownerEmail\": \"[email protected]\",
    \"packageName\": \"Default\",
    \"websiteOwner\": \"newowner\",
    \"ownerPassword\": \"password\"
    \"acl\": \"reseller\"
    }" \
  • Excellent thank you!
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!