Web API for Munki

248 views
Skip to first unread message

Gregory Neagle

unread,
Feb 16, 2016, 5:16:37 PM2/16/16
to munk...@googlegroups.com, munki-w...@googlegroups.com
Inspired by this: http://ape-docs.groob.io

I’ve started work on what is planned to be a compatible API as part of MunkiWebAdmin2.


manifests and pkgsinfo endpoints are supported. GET, POST, PUT, PATCH and DELETE are supported.

Some examples of interacting with the API (where the server is running at http://localhost:8080):

GET:


POST:
curl -H "Content-Type: application/json" -X POST --data '{ "filename": "fakepkg-1.0.plist", "name": "fakepkg", "catalogs": [“testing"],"display_name": "Example pkg"}' http://localhost:8080/api/pkgsinfo

PUT:
curl -H "Content-Type: application/json" -X PUT --data '{ "filename": "fakepkg-1.0.plist", "name": "fakepkg", "catalogs": [“production"], "display_name": "Example pkg"}' http://localhost:8080/api/pkgsinfo/fakepkg-1.0.plist

PATCH:
curl -H "Content-Type: application/json" -X PATCH --data '{ "version": "1.0" }' http://localhost:8080/api/pkgsinfo/fakepkg-1.0.plist

DELETE:

The API is rough and had ZERO authentication or authorization around it yet, so for the love of all that is holy do not point it at a live production repo.

-Greg

Victor Vrantchan

unread,
Feb 16, 2016, 6:59:20 PM2/16/16
to munki-dev, munki-w...@googlegroups.com
Thanks for creating the thread Greg, 

I'm updating the docs to reflect the latest changes. 
Here's the source of the current server - github.com/groob/ape
I'm hosting a temporary server at http://munki.groob.io/api/ with the repo accessible at http://munki.groob.io/repo

If anyone else is interested in an API and has suggestions for what the interface should look like or how the server should handle authentication/authorization, please reply. 
It'd be great to have a common spec/API interface even if the implementations are slightly different.  
Reply all
Reply to author
Forward
0 new messages