brysontyrrell / PatchServer

A self-hosted implementation of an external patch source for Jamf Pro 10.2+
http://patchserver.readthedocs.io/en/latest/
MIT License
67 stars 13 forks source link

FR: Browse API in web #6

Closed krispayne closed 6 years ago

krispayne commented 6 years ago

I've recently been deploying Ansible AWX and have sort of fallen in love with their web view API browser.

Whenever I try to browse the API on Patch Server, I get a lot of 404 Errors, until I type in the full URL (i.e. http://localhost:5000/jamf/v1/patch/Slack)

Would be great to be able to browse the data in the API via, say, http://localhost:5000/jamf/v1/

(I could have also messed up something in my Mac install)

brysontyrrell commented 6 years ago

I think something is wrong with your setup.

http://localhost:5000/jamf/v1/ should give you a 404 because there's nothing served from here.

If "Slack" is the ID of your patch definition, http://localhost:5000/jamf/v1/patch/Slack should show you the JSON.

All of your definitions will be listed in the UI. There is a view icon in blue for each item. Clicking that will bring you to the JSON.

krispayne commented 6 years ago

Right, I can see the JSON for the patch title, but I can't see anything else in the API. Maybe there isn't anything else and I'm just giddy for things?

brysontyrrell commented 6 years ago

I appreciate the excitement!

The /jamf/v1/* endpoints only return JSON. They're the feed for Jamf Pro. Nothing fancy there.

Only the one page for the UI.

The APIs are documented if you haven't checked it out yet: http://patchserver.readthedocs.io/en/latest/apis/ps_api.html

krispayne commented 6 years ago

Thanks @brysontyrrell. I've had it serving software titles for almost a week now and it's really great so far.