This article is old, you should use this new article in the Technical Blog. It shows you how to install endpoint plugins and uses the most up-to-date UI from Postman
You can use POSTMAN to talk to the Jomres API.
Postman is an excellent tool that allows you to send API queries to your Jomres installation. If you'd like to test functionality that already exists, or if you've added new functionality, then this is a great way to test the code without having to build an entire app. Once you've confirmed it's working, then you'll be ready to build your application later on.
We'll start with a simple example, getting a user's favourites.
GET
Here you can see the basic panel in Postman. The method to get the user's favourites is /favourites/ ( trailing slash is important ), so to call Jomres from my localhost, and get the favourites for the user who created this API key set, you would set the method to GET, and the url to http://localhost/quickstart/jomres/api/favourites/
Before we can the favourites, we first need to get an access token, so if you need to click on the Authorization tab, and choose OAuth2 from the dropdown.
Click "Get New Access Token", you'll see a popup like this. Give the token a name, set the url ( trailing slash! ) and enter the Client ID and Client Secret you created earlier. Next set the Grant Type to "Client Credentials". Finally, click "Request Token".
Now you'll see that the token has been pulled from the server and is available in the Authorization tab. I'll click "Localhost" and the token's details will appear to the right.
These are the token's details, complete with the scope that it supports. in "Add token to" change the dropdown to "Header" and then click "Use Token".
Ok, we're ready to get the user's favourites. Click "Send".
In the panel down below, you'll see the response, which is exactly as we expected.
POST
Ok, that was a good first step. Let's now go ahead and test posting data to our server. We'll change the method to POST, so to send a new favourite property uid we'll first change the method to POST, and then add the id of the property we want to the end of the url, like this :
Again, you will need a token, so if you haven't already done that, get and use your token.
Ok, here are some of my favourites already. The "Some Camping Area" property is the property with id 7.
So now, when I click Send, this is the response I'll see in Postman.
And when I reload the page, here you can see that "Some Camping Area" has been added to my favourites.