Does https://github.com/marklogic/RunDMC/blob/docapp/install-apidoc.sh help?
The interesting stuff starts around line 55. It builds a zip from the contents of https://github.com/marklogic/RunDMC/tree/docapp/apidoc/package then uploads that with a curl request, and finally applies it with another curl request. The -e flag is set, so if anything goes wrong the script exits. However it's also logging curl output using tee, so after each of those statements it has to check PIPESTATUS. -- Mike On 30 May 2014, at 09:15 , Whitby, Rob <[email protected]> wrote: > Hi, > > I’m trying to use the packaging API, but I’m missing the big picture of how > it works. The GUI doesn’t seem to map directly to the REST API. In the GUI I > can import a package, and apply it successfully. But I’m not sure how to do > that with the API. > > Here’s how far I’ve got: > > 1. Upload the package: POST package.zip to > /manage/v2/packages?pkgname=somepackage > —> status 200 Created somepackage > > 2. Install the package: POST (with empty body) to > /manage/v2/packages/somepackage/install > --> status 200 "success=true" but no changes are applied. The ticket has > nothing under “install-list”, unlike when the same package is applied in the > GUI. > > Clearly I don’t understand how the API is meant to be used – any pointers to > examples or documentation? > > Thanks > Rob > > > > > > > > > > > > > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
