You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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
GETn collection/locationsReturns a list of locations.
GETy read/locations/{id}Returns a location's details.
PATCHy update/locations/{id}Update an attribute of a locations entry.
POSTn create/locationsInsert a new locations entry.
DELETEy delete/locations/{id}Delete a locations entry.

Web Application Routes

Request Method
ID
Action
Resulting Function
URL Example
Notes
GETncreatecreate_form/locations/createDisplays a standard web form for submission to POST /locations.
GETyupdateupdate_form/locations/{id}/updateShow the networks details with the option to update attributes using PATCH to /locations/{id}

 

 

 

 

 

 

  • No labels