-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from synergylabs/develop
Updates the changes to BDv3.2.9 Documentation.
- Loading branch information
Showing
45 changed files
with
763 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/building.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/buildingtemplate.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/dataservice.doctree
Binary file not shown.
Binary file modified
BIN
+59 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/index.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/oauth.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/permission.doctree
Binary file not shown.
Binary file added
BIN
+29.9 KB
buildingdepot/Documentation/build/doctrees/api/CentralService/permissionRequests.doctree
Binary file not shown.
Binary file modified
BIN
-5 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/sensor.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/sensorgroup.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/tagtype.doctree
Binary file not shown.
Binary file modified
BIN
-13 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/user.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/CentralService/usergroup.doctree
Binary file not shown.
Binary file modified
BIN
+3 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/DataService/index.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/DataService/oauth.doctree
Binary file not shown.
Binary file modified
BIN
-5 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/DataService/pubsub.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/api/DataService/sensordata.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/centralservice.doctree
Binary file not shown.
Binary file modified
BIN
+4 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/dataservice.doctree
Binary file not shown.
Binary file modified
BIN
+966 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+526 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/install.doctree
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
buildingdepot/Documentation/build/doctrees/source/index.doctree
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 49b10210519526625d27371a2e8b6a48 | ||
config: c6a7958682c2949e04c6169ca87cceed | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
...Documentation/build/html/_sources/api/CentralService/permissionRequests.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
.. CentralService API Documentation | ||
Permission Requests | ||
################### | ||
|
||
A Permission Request can be sent to obtain access to a particular sensor entity owned by a user of BuildingDepot. | ||
Once the permission request is sent to the user, on approval the Permission APIs should be used to create a permission | ||
pair between the user and the sensor resources. | ||
The Permissions are created between SensorGroups and UserGroups in Building Depot which come together to form the access control lists. | ||
Here we select a User Group and a Sensor Group and a permission value with which we want to associate these both. | ||
There are three levels of permission defined in BuildingDepot which are ‘d/r’ (deny read) ,’r’ (read), ‘r/w’ (read write) and 'r/w/p' (read write permission). | ||
If there are multiple permission mappings between a user and a sensor then the one that is most restrictive is chosen. | ||
Permissions can be defined in the CentralService at http://www.example.com:81/api/permission. | ||
Note: Firebase or RabbitMQ needs to be installed during the BD installation for this to work. | ||
|
||
Create Permission Requests | ||
************************** | ||
|
||
This request creates a new Permission Request for a sensor entity owned by a user. | ||
|
||
.. http:post:: /api/permission/request | ||
:JSON Parameters: | ||
* **data** `(dictionary)` -- Contains the permission value for sensorgroup and usergroup | ||
* **target_sensors** `(string)` -- List of Targeted sensors | ||
* **timestamp** `(string)` -- Name of the user_group | ||
* **permission** `(string)` -- Permission level | ||
* **r** `(string)` -- Read - Will give read only access to the sensors | ||
* **rw** `(string)` -- Read-Write - Will give read and write access to the sensors | ||
* **dr** `(string)` -- Deny-read - Will deny any access to the sensors | ||
* **rwp** `(string)` -- Read-Write-Permission - Highest level of permission that can be assigned. Will give read and write access to the sensors. In addition to this the user will be able to add/remove tags from the sensor. | ||
|
||
:returns: | ||
* **success** `(string)` -- Returns 'True' if data is posted successfully otherwise 'False' | ||
* **error** `(string)` -- An additional value that will be present only if the request fails specifying the cause for failure | ||
|
||
:status 200: Success | ||
:status 401: Unauthorized Credentials | ||
|
||
.. compound:: | ||
|
||
**Example request**: | ||
|
||
.. sourcecode:: http | ||
|
||
POST /api/permission/request HTTP/1.1 | ||
Accept: application/json; charset=utf-8 | ||
|
||
{ | ||
"data":{ | ||
"target_sensors":[6cf53d24-e3a3-41bd-b2b5-8f109694f628, 6cf53d24-e3a3-41bd-b2b5-8f109694f629], | ||
"timestamp":"1626105964", | ||
"permission":"r" | ||
} | ||
} | ||
|
||
**Example response** (for success): | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"success": "True" | ||
} | ||
|
||
**Example response** (for failure): | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"success": "False", | ||
"error": " Missing Parameters" | ||
} | ||
|
||
{ | ||
"success": "False", | ||
"error": " Sensor does not exist" | ||
} | ||
|
||
{ | ||
"success": "False", | ||
"error": " Permission value does not exist" | ||
} | ||
|
||
Read Permission Requests | ||
************************ | ||
|
||
This request retrieves Permission Request for a user. | ||
|
||
.. http:get:: /api/permission/request | ||
:returns: | ||
* **success** `(string)` -- Returns 'True' if a permission exists between the sensor and user group otherwise 'False' | ||
* **permission_requests** `(string)` -- Contains the permission level that are attached to this SensorGroup and UserGroup | ||
|
||
:status 200: Success | ||
:status 401: Unauthorized Credentials | ||
|
||
.. compound:: | ||
|
||
**Example request**: | ||
|
||
.. sourcecode:: http | ||
|
||
GET /api/permission/request HTTP/1.1 | ||
Accept: application/json; charset=utf-8 | ||
|
||
**Example response**: | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"success": "True" | ||
"permission_requests": [{ "requester_name": Admin, "requester_email": [email protected], "requested_sensors": [6cf53d24-e3a3-41bd-b2b5-8f109694f628, 6cf53d24-e3a3-41bd-b2b5-8f109694f629] }] | ||
} | ||
|
||
**Example response** (for failure): | ||
|
||
.. sourcecode:: http | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"success": "False", | ||
"error": " Permission Requests does not exist" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.