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

Compare with Current View Page History

« Previous Version 3 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 script (if delete is permitted). You cannot delete the Default 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
Example Response
GETn collection/locationsReturns a list of locations.locations_collection.json
GETy read/locations/{id}Returns a location's details.locations_read.json
PATCHy update/locations/{id}Update an attribute of a locations entry.locations_patch.json
POSTn create/locationsInsert a new locations entry.locations_create.json
DELETEy delete/locations/{id}Delete a locations entry.locations_delete.json

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