pepijn Posted September 16, 2013 Report Posted September 16, 2013 So the Service.add API doesn't mention if it will provison the service or not. Sometimes I want this and sometimes I don't because I'm adding a service for an already provisioned service. If that API call does not provision the service, how do I do that?
Michael Posted September 16, 2013 Report Posted September 16, 2013 You tick a box on the order form to get it setup manually, or you use the tick box on the add service to use the module.
pepijn Posted September 16, 2013 Author Report Posted September 16, 2013 Thanks, but I'm using the API, not the order form. I saw the box in the order form.
pepijn Posted September 16, 2013 Author Report Posted September 16, 2013 $ curl -u user:key -X POST -v "http://blestadomain.tk/blesta/index.php/api/services/add.json" -d "pricing_id=1&client_id=2&status=active&DomainName=fu.ga&use_module=false" {"message":"An unexpected error occured.","response":"Internal error: Failed to retrieve the default value"} I tried adding a service using the Namecheap module, but I get this error. [edit] ok, I had to use a nested array like vars[password]. Am I correct that use_module decides if the domain is provisioned or not?
nexu56 Posted November 14, 2013 Report Posted November 14, 2013 (edited) On 9/16/2013 at 11:21 AM, pepijn said: ok, I had to use a nested array like vars[password]. Any chance you could possibly elaborate on this? A working curl POST command would be great. I can GET data fine, but I'm having great difficulty POST'ing, getting either "failed to retrieve default value" or just an empty HTTP 500 response EDIT I figured it out, you just do something like $ curl -u user:key -X POST -v "http://blesta.acme.com/users/add.json" -d "vars[username]=test&vars[new_password]=test12&vars[confirm_password]=test12" Edited November 14, 2013 by nexu56
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now