Introduction
How Does it Work?
Creating a Network
To make another location go to menu -> Admin -> Locations -> Create Location.
View Location Details
Go to menu -> Admin -> Locations -> List Locations.
You will see a list of available locations. You can view a network by clicking on the it's ID (in green). You can also edit or delete the location.
You will also see a list of the devices in that particular location.
Locations are stored in the database in the "oa_location" table. A typical entry will look as below.
id: 4
name: The Cunninghams
type: House
room:
suite:
level:
address: 565 North Clinton Drive
suburb:
city: Milwaukee
district:
region:
area:
state: Wisconsin
postcode: 4000
country: America
tags:
phone:
picture:
latitude: 42.556568
longitude: -88.874382
geo:
comments:
icon:
group_id: 0
API / Web Access?
You can access the /locations collection using the normal Open-AudIT JSON based API. Just like any other collection. Please see the API documentation for further details.
API Routes
Request Method | ID | Action | Resulting Function | URL Example | Notes |
---|---|---|---|---|---|
GET | n | collection | /locations | Returns a list of locations. | |
GET | y | read | /locations/{id} | Returns a location's details. | |
PATCH | y | update | /locations/{id} | Update an attribute of a locations entry. | |
POST | n | create | /locations | Insert a new locations entry. | |
DELETE | y | delete | /locations/{id} | Delete a locations entry. |
Web Application Routes
Request Method | ID | Action | Resulting Function | URL Example | Notes |
---|---|---|---|---|---|
GET | n | create | create_form | /locations/create | Displays a standard web form for submission to POST /locations. |
GET | y | update | update_form | /locations/{id}/update | Show the networks details with the option to update attributes using PATCH to /locations/{id} |