This content has been marked as final.
Show 1 reply
-
1. Re: invoking deploy via http-json api?
an0nym0us Dec 23, 2013 4:36 AM (in response to dbschofield)I know this is an old thread but it might help other people who are looking for the same thing.
Have you found a solution to deploy or undeploy via http-json api? If not maybe you can try the following http calls to get the deployment details and deploy/undeploy.
** Standalone ***
curl --digest -D - http://<username>:<password>@localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"read-resource","deployment":"xyz.war","json.pretty":1}' curl --digest -D - http://<username>:<password>@localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"deploy", "address":[{"deployment":"xyz.war"}],"json.pretty":1}' curl --digest -D - http://<username>:<password>@localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"undeploy", "address":[{"deployment":"xyz.war"}],"json.pretty":1}'
*** Managed Domain ***
curl --digest -D - http://<username>:<password>@localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"read-resource", "address":[{"host":"master"},{"server":"<server-name>"},{"deployment":"xyz.war"}],"json.pretty":1}' curl --digest -D - http://<username>:<password>@localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"deploy", "address":[{"host":"master"},{"server":"<server-name>"},{"deployment":"xyz.war"}],"json.pretty":1}' curl --digest -D - http://<username>:<password>@localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"undeploy", "address":[{"host":"master"},{"server":"<server-name>"},{"deployment":"xyz.war"}],"json.pretty":1}'
However, if you have a different solution can you share it with us?
Note: Those http calls work on JBoss 7.1 and I believe it should work too on 7.2