All your real estate under one roof
Learn how to start the Real Estate Real Data API, and create users and properties. These instructions are for Windows.
http://localhost hostname. Therefore, the service doesn’t work with the web-version of Postman.Open the fork in Command Prompt. In GitHub Desktop, switch to the fork. Go to Repositories > Open in Command Prompt.
In Command Prompt, change directory to API.
cd api
In the API directory, open the database file.
json-server -w property-manager.json
The json server starts on a local port. Note the index. This is your base URL.
Example response
Index:
http://localhost:3000/
Endpoints:
http://localhost:3000/properties
http://localhost:3000/users
The service is now started.
Create an owner or manager user and assign them read-only or CRUD permissions.
POST request.
{base_url}/users/
In the Headers section, ensure content-type is application/json.
In the Body section, select raw.
In the Body text field, enter the properties and values for the manager user. See Users.
Note: All properties are required.
Click Send. The manager user is created, and it appears in the Response Body section.
owner user.http://localhost:3000/users
{
"id": "4",
"username": "patrick.johnson",
"role": "manager",
"permissions": "crud"
}
{
"id": "4",
"username": "patrick.johnson",
"role": "manager",
"permissions": "crud"
}
Add a property to your portfolio.
POST request.
{base_url}/properties/
In the Headers section, ensure content-type is application/json.
In the Body section, select raw.
In the Body text field, enter the property details. See Properties.
Click Send. A property is created and it appears in the Response Body section.
http://localhost:3000/properties
{
"building_name": "Ocean View Condos",
"address_line_1": "789 Ocean View Dr",
"address_line_2": "Suite 305",
"address_line_3": "Atlanta, GA 35034",
"id": 9,
"owner_id": 7,
"manager_id": 8
}
{
"building_name": "Ocean View Condos",
"address_line_1": "789 Ocean View Dr",
"address_line_2": "Suite 305",
"address_line_3": "Atlanta, GA 35034",
"id": 9,
"owner_id": 7,
"manager_id": 8
}