Introduction
How Does it Work?
Creating a Location
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 script (if delete is permitted). You cannot delete the Default 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 | Required Permission | URL Example | Notes | Example Response |
---|---|---|---|---|---|---|---|
GET | n | collection | locations::read | /locations | Returns a list of locations. | locations_collection.json | |
GET | y | read | locations::read | /locations/{id} | Returns a location's details. | locations_read.json | |
PATCH | y | update | locations::update | /locations/{id} | Update an attribute of a locations entry. | locations_patch.json | |
POST | n | create | locations::create | /locations | Insert a new locations entry. | locations_create.json | |
DELETE | y | delete | locations::delete | /locations/{id} | Delete a locations entry. | locations_delete.json |
Web Application Routes
Request Method | ID | Action | Resulting Function | Required Permission | URL Example | Notes |
---|---|---|---|---|---|---|
GET | n | create | create_form | locations::create | /locations/create | Displays a standard web form for submission to POST /locations. |
GET | y | update | update_form | locations::update | /locations/{id}/update | Show the networks details with the option to update attributes using PATCH to /locations/{id} |