Creating / Updating User Packages via the API.

Manon

New member
Joined
Aug 13, 2019
Messages
1
Hey,

I am trying to create or update a user package using the API (through the infamous HTTPSocket class).

Request:
POST /CMD_API_MANAGE_USER_PACKAGES HTTP/1.0

Body:
add=save&aftp=OFF&cgi=ON&dns=OFF&dnscontrol=ON&bandwidth=25600&domainptr=0&ftp=unlimited&ips=0&mysql=unlimited&nemailf=unlimited&nemailml=unlimited&nemailr=unlimited&nemails=unlimited&nsubdomains=unlimited&quota=2048&serverip=ON&ssh=OFF&userssh=OFF&ssl=ON&vdomains=unlimited&packagename=apicreatedpackage

The response:
["result_body"]=>
string(28) "error=0&text=Saved&details=&"

As such I would assume DirectAdmin is happy with my request and has completed the request without issues. However, when I log into the DirectAdmin and check the packages list the 'created' package is nowhere to be found. Since I get any response and no errors at all, I would assume creating the socket and actually doing the request should be all right?

I am obviously missing something and the documentation on this item seem to be a little lacking: https://www.directadmin.com/features.php?id=583

Thanks for any hints in the right direction.

Cheers from The Netherlands,
Manon
 
Hi
My two cents: what happen if run DA on debug mode?
Currently, I am using that php class on my own CI crm.
 
Back
Top