The Touch Grass service includes several profiles for common features certain types of visitors are typically interested in. This list can be expanded or contracted to accommodate new visitor profiles with different interests for different parks. This tutorial adds a new profile to the existing list.
The Touch Grass service contains information about state and national parks in California. In order to access the information, see Get Started.
The service currently requires a local JSON server to make API calls. The server runs in a Git Bash instance, but API calls must be performed in a separate window or program.
Open Git Bash.
Navigate to the cloned folder.
Navigate to the /api
folder.
Enter json-server -w touch-grass-db-source.json
.
Open Postman.
Set the method to POST.
http://localhost:3000/visitors
NOTE: The default domain is localhost:3000
, but it can be changed. To verify the domain, check the JSON server introductory text when it was started.
{
"visitor_id": "9",
"visitor_type": "Whale Watcher",
"habitat": "coastal and marine",
"travel_season": "summer",
"activities": "whale watching"
}