-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbf7ddf
commit 203fbd3
Showing
2 changed files
with
87 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<a name="top"></a> | ||
# Overvis API v0.1.0 :: Visualization API | ||
|
||
- [`GET /v1/vis/:visId/data/` - Get Visualization Data](#Get-Visualization-Data) | ||
- [`GET /v1/vis/:visId/data/save/` - Save Visualization Data](#Save-Visualization-Data) | ||
|
||
## <a name='Get-Visualization-Data'></a> `GET /v1/vis/:visId/data/` - Get Visualization Data | ||
[Back to top](#top) | ||
|
||
Returns the data that the user entered in the visualization. The answer is a "key: value" pair, where key is a string and value is a string. | ||
|
||
``` | ||
GET /v1/vis/:visId/data/ | ||
``` | ||
*Required account permissions:* `demo` | ||
|
||
### Parameters - `Param` | ||
| Name | Type | Description | | ||
|:---------|:-----------|:--------------------------------------| | ||
| `visId` | `Number` | System ID of the visualization. | | ||
|
||
### Examples | ||
|
||
```bash | ||
TOKEN=`curl -s -H "Content-Type: application/json" \ | ||
-d '{"apiKey": "513cf747-eb5c-4d5f-931f-d22c9872c73c", "password": "DCdcSLmkoZkU5zGI9gpInDbo" }' \ | ||
"https://ocp.overvis.com/api/v1/authenticate/" | \ | ||
jq -r ".token"` && \ | ||
curl -s -S -H "Content-Type: application/json" -H "Authorization: token $TOKEN" \ | ||
"https://ocp.overvis.com/api/v1/vis/7/data/" | \ | ||
jq -C | ||
``` | ||
|
||
### Success response example | ||
|
||
```json | ||
{ | ||
"roomName": "Room 1", | ||
"ownerName": "John" | ||
} | ||
``` | ||
|
||
|
||
## <a name='Save-Visualization-Data'></a> `GET /v1/vis/:visId/data/save/` - Save Visualization Data | ||
[Back to top](#top) | ||
|
||
Saves the data entered by the user in the visualization. | ||
|
||
``` | ||
GET /v1/vis/:visId/data/save/ | ||
``` | ||
*Required account permissions:* `manager` | ||
|
||
### Parameters - `Param` | ||
| Name | Type | Description | | ||
|:---------|:-----------|:--------------------------------------| | ||
| `visId` | `Number` | System ID of the visualization. | | ||
|
||
### Parameters - `Body` | ||
| Name | Type | Description | | ||
|:---------|:-----------|:--------------------------------------| | ||
| `code` | `String` | Key for the value. | | ||
| `value` | `String` | Value to be saved. | | ||
|
||
### Examples | ||
|
||
```bash | ||
TOKEN=`curl -s -H "Content-Type: application/json" \ | ||
-d '{"apiKey": "513cf747-eb5c-4d5f-931f-d22c9872c73c", "password": "DCdcSLmkoZkU5zGI9gpInDbo" }' \ | ||
"https://ocp.overvis.com/api/v1/authenticate/" | \ | ||
jq -r ".token"` && \ | ||
curl -s -S -H "Content-Type: application/json" -H "Authorization: token $TOKEN" \ | ||
-d '{ "code": "roomName", "value": "Room 1" }' \ | ||
"https://ocp.overvis.com/api/v1/vis/7/data/save/" | \ | ||
jq -C | ||
``` | ||
|
||
### Success response example | ||
|
||
```json | ||
{} | ||
``` | ||
|
||
|