This article will walk you through setting up environment to execute examples of MileMaker Web Service API requests in Postman
Requirements:
- MileMaker free trial or paid subscription that can be obtained by filling out Free Trial Form.
- Valid login to MileMaker Web Portal for account management, provided for all customers with valid subscriptions.
- MileMaker API Key (if you wish to utilize the API Key authorization) that can be generated in the MileMaker Web Portal.
Step 1 - Save Collection To Your Postman Account
First, visit MileMaker API Documentation site and select "Run in Postman" button in the top right.
Step 2 - Select Postman Version
Either version is suitable for this, in this example we'll choose "Postman for Web"
Step 3 - Select Postman Workspace
Postman organizes API requests into Collections and Collections into Workspaces. You will need to select a Workspace for MileMaker Postman Collection. In this example, we'll choose "MileMaker Support" workspace. By default you should see "<Your Name>'s Workspace". Once selected, click "Import".
For more information on collections, visit the Postman Documentation.
Step 4 - Configure MileMaker Credentials
The MileMaker Postman Collection uses parameters at the collection level to control request authorization. There is no need to manually set authorization headers on requests.
MileMaker Web Services API support both Bearer Tokens or API Key authorization. For Bearer Tokens, please specify username and password collection variables. For API Key authorization, please specify api-key variable. When both sets of credentials are specified, api-key takes precedence.
Note on Authorization: Batch API requests currently only support Bearer Token authorization, API key authorization will be available in the future.
First - Open collection by clicking on "MileMaker API" in your sidebar
Next - In the right pane, select "Variables" tab
API Keys:
To use API Key Authorization, for all requests other than Batch API, please set api-key variable. To learn how to generate an API key, visit our How to create an API Key article.
In the Current value column next to api-key replace APIKeySecret with your API Key.
Username/Password:
To use Bearer Token Authorization, please set username and password variables and leave api-key value blank.
In the Current value column next to username and password, enter the credentials you use to login to the MileMaker Web Portal.
Step 5 - Save Your Configuration Changes
Before proceeding to the next step, ensure you save your changes. If you do not save your changes, the credentials and/or API Keys provided will not be utilized in your requests.
Any time a change is made in Postman, an orange circle will appear next to the tab, to commit those changes you may either press CTRL+S or click on the Save Icon. This orange circle will disappear once all changes are committed.
Step 6 - Execute Your First Request
Choose a request from your left sidebar. In this example, we'll choose Plan Route request
For the request payload, we'll use the current values provided by the Postman example. To test if the request works, click Send
If request is successful, you should see a '200 OK' response alongside the response in the pane below in JSON format.
Comments
0 comments
Please sign in to leave a comment.