View Dashboard Resource

A view_dashboard resource stores dashboard and dashboard widget information.

The extraData attribute is used to hold specific information for a specific widget type and item selections. It is typically formatted as encoded JSON.


GET view_dashboard/{view_dashboardUid}



Returns a view_dashboard with the specified uid.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible? Yes

Resource URL

http://grovestreams.com/api/view_dashboard/{view_dashboardUid}

Parameters

none


Example Requests

Get an existing dashboard that has two widgets, a line graph and a grid. Each widget is displaying two streams feeds.

/view_dashboard/d9a96f31-e68e-4744-a581-2a7e423e76ff?_dc=1316870883804


Response Body
{
  "message": "",
  "dashboard": {
    "uid": "d9a96f31-e68e-4744-a581-2a7e423e76ff",
    "name": "Server Resources",
    "widget": [
      {
        "uid": "2168c21e-96c0-462c-81b1-843a86e5b8a8",
        "rangeType": "HEARTBEAT",
        "cycle": {
          "uid": "",
          "name": ""
        },
        "heartbeatPolling": 9,
        "extraData": "{\"vaxis\":\"\",\"vmax\":100,\"vmin\":0,\"autoscale\":true}",
        "type": "LINE_CHART",
        "colNum": 0,
        "fixedTimeRange": {
          "startDate": 0,
          "endDate": 0
        },
        "itemSelections": [
          {
            "itemName": "CPU Used",
            "cycleName": "Seconds",
            "cycleUid": "e493ce98-67ad-4747-8436-0b0346c16311",
            "componentName": "Personal Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "{\"scale\":1}",
            "itemUid": "f5f54ceb-47c6-4c4b-baa2-34eb82238f52"
          },
          {
            "itemName": "Percent of Memory Used - bytes",
            "cycleName": "Seconds",
            "cycleUid": "e493ce98-67ad-4747-8436-0b0346c16311",
            "componentName": "Personal Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "{\"scale\":1}",
            "itemUid": "ff0168cc-38bd-4880-a188-540b35d5cf2a"
          }
        ],
        "height": 300,
        "name": "Computer Resources",
        "rowNum": 0,
        "heartbeatDuration": 200
      },
      {
        "uid": "bfd75586-88d2-4db4-840f-b54eeb5c6897",
        "rangeType": "HEARTBEAT",
        "cycle": {
          "uid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
          "name": "Hours"
        },
        "heartbeatPolling": 5,
        "extraData": "{\"colsels\":[\"compName\",\"streamName\",\"cycleName\",\"showChart\",\"last\",\"cavg\",\"cavgPrev\",\"cavgChg\",\"cavgPchg\"]}",
        "type": "GRID_VIEW",
        "colNum": 1,
        "fixedTimeRange": {
          "startDate": 1316870760321,
          "endDate": 1316870760321
        },
        "itemSelections": [
          {
            "itemName": "Percent of Memory Used - bytes",
            "cycleName": "Hours",
            "cycleUid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
            "componentName": "Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "",
            "itemUid": "ff0168cc-38bd-4880-a188-540b35d5cf2a"
          },
          {
            "itemName": "CPU Used",
            "cycleName": "Hours",
            "cycleUid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
            "componentName": "Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "",
            "itemUid": "f5f54ceb-47c6-4c4b-baa2-34eb82238f52"
          }
        ],
        "height": 300,
        "name": "Computer CPU & Memory Averages - Current Hour",
        "rowNum": 0,
        "heartbeatDuration": 100
      }
    ],
    "numCols": 2
  },
  "success": true
}


GET view_dashboard/new



Returns a default view_dashboard with a unique UID. Does not persist the new view_dashboard in the store. It's the callers responsibility to PUT the new view_dashboard and register it.

Another method of creating a view_dashboard and have it automatically placed in a folder is to do a "PUT content_folder?contentType=view_dashboard&parentFolderUid=375936fd-e3fa-4eda-bc10-f413b58bd367&text=new%20Dashboard"
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_dashboard/new

Parameters

none

Example Requests

/view_dashboard/new

Response Body

{
  "message": "",
  "dashboard": {
    "uid": "e90c71ff-1822-444b-8892-574e240dd3fd",
    "name": "new Dashboard",
    "widget": [
     
    ],
    "numCols": 2
  },
  "success": true
}




GET view_widget/new



Returns a default view_widget with a unique UID. Does not persist the new view_dashboard in the store. It's the callers responsibility to add the view_widget to a view_dashboard and save the view_widget with the dashboard.

Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_widget/new

Parameters

none

Example Requests

/view_dashboard/new

Response Body

{
  "message": "",
  "success": true,
  "widget": {
    "uid": "2e46ee7f-4373-47fe-8d7c-57276b2f0f78",
    "rangeType": "HEARTBEAT",
    "cycle": {
      "uid": "",
      "name": ""
    },
    "heartbeatPolling": 5,
    "extraData": "",
    "type": "LINE_CHART",
    "colNum": 0,
    "fixedTimeRange": {
      "startDate": 0,
      "endDate": 0
    },
    "itemSelections": [
     
    ],
    "height": 300,
    "name": "",
    "rowNum": 0,
    "heartbeatDuration": 100
  }
}



PUT view_dashboard



Inserts a new view_dashboard.

The uid of the view_dashboard can be blank. If it is blank a uid will be created on the server and the response body will contain the new uid.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_dashboard

Parameters

none

Example Requests

/view_dashboard

Request Body
{
  "dashboard": {
    "uid": "d9a96f31-e68e-4744-a581-2a7e423e76ff",
    "name": "Server Resources",
    "widget": [
      {
        "uid": "2168c21e-96c0-462c-81b1-843a86e5b8a8",
        "rangeType": "HEARTBEAT",
        "cycle": {
          "uid": "",
          "name": ""
        },
        "heartbeatPolling": 9,
        "extraData": "{\"vaxis\":\"\",\"vmax\":100,\"vmin\":0,\"autoscale\":true}",
        "type": "LINE_CHART",
        "colNum": 0,
        "fixedTimeRange": {
          "startDate": 0,
          "endDate": 0
        },
        "itemSelections": [
          {
            "itemName": "CPU Used",
            "cycleName": "Seconds",
            "cycleUid": "e493ce98-67ad-4747-8436-0b0346c16311",
            "componentName": "Personal Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "{\"scale\":1}",
            "itemUid": "f5f54ceb-47c6-4c4b-baa2-34eb82238f52"
          },
          {
            "itemName": "Percent of Memory Used - bytes",
            "cycleName": "Seconds",
            "cycleUid": "e493ce98-67ad-4747-8436-0b0346c16311",
            "componentName": "Personal Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "{\"scale\":1}",
            "itemUid": "ff0168cc-38bd-4880-a188-540b35d5cf2a"
          }
        ],
        "height": 300,
        "name": "Computer Resources",
        "rowNum": 0,
        "heartbeatDuration": 200
      },
      {
        "uid": "bfd75586-88d2-4db4-840f-b54eeb5c6897",
        "rangeType": "HEARTBEAT",
        "cycle": {
          "uid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
          "name": "Hours"
        },
        "heartbeatPolling": 5,
        "extraData": "{\"colsels\":[\"compName\",\"streamName\",\"cycleName\",\"showChart\",\"last\",\"cavg\",\"cavgPrev\",\"cavgChg\",\"cavgPchg\"]}",
        "type": "GRID_VIEW",
        "colNum": 1,
        "fixedTimeRange": {
          "startDate": 1316870760321,
          "endDate": 1316870760321
        },
        "itemSelections": [
          {
            "itemName": "Percent of Memory Used - bytes",
            "cycleName": "Hours",
            "cycleUid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
            "componentName": "Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "",
            "itemUid": "ff0168cc-38bd-4880-a188-540b35d5cf2a"
          },
          {
            "itemName": "CPU Used",
            "cycleName": "Hours",
            "cycleUid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
            "componentName": "Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "",
            "itemUid": "f5f54ceb-47c6-4c4b-baa2-34eb82238f52"
          }
        ],
        "height": 300,
        "name": "Computer CPU & Memory Averages - Current Hour",
        "rowNum": 0,
        "heartbeatDuration": 100
      }
    ],
    "numCols": 2
  }
}


POST view_dashboard



Used to update an existing view_dashboard.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_dashboard

Parameters

none

Example Requests

/view_dashboard

Request Body
{
  "dashboard": {
    "uid": "d9a96f31-e68e-4744-a581-2a7e423e76ff",
    "name": "Server Resources",
    "widget": [
      {
        "uid": "2168c21e-96c0-462c-81b1-843a86e5b8a8",
        "rangeType": "HEARTBEAT",
        "cycle": {
          "uid": "",
          "name": ""
        },
        "heartbeatPolling": 9,
        "extraData": "{\"vaxis\":\"\",\"vmax\":100,\"vmin\":0,\"autoscale\":true}",
        "type": "LINE_CHART",
        "colNum": 0,
        "fixedTimeRange": {
          "startDate": 0,
          "endDate": 0
        },
        "itemSelections": [
          {
            "itemName": "CPU Used",
            "cycleName": "Seconds",
            "cycleUid": "e493ce98-67ad-4747-8436-0b0346c16311",
            "componentName": "Personal Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "{\"scale\":1}",
            "itemUid": "f5f54ceb-47c6-4c4b-baa2-34eb82238f52"
          },
          {
            "itemName": "Percent of Memory Used - bytes",
            "cycleName": "Seconds",
            "cycleUid": "e493ce98-67ad-4747-8436-0b0346c16311",
            "componentName": "Personal Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "{\"scale\":1}",
            "itemUid": "ff0168cc-38bd-4880-a188-540b35d5cf2a"
          }
        ],
        "height": 300,
        "name": "Computer Resources",
        "rowNum": 0,
        "heartbeatDuration": 200
      },
      {
        "uid": "bfd75586-88d2-4db4-840f-b54eeb5c6897",
        "rangeType": "HEARTBEAT",
        "cycle": {
          "uid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
          "name": "Hours"
        },
        "heartbeatPolling": 5,
        "extraData": "{\"colsels\":[\"compName\",\"streamName\",\"cycleName\",\"showChart\",\"last\",\"cavg\",\"cavgPrev\",\"cavgChg\",\"cavgPchg\"]}",
        "type": "GRID_VIEW",
        "colNum": 1,
        "fixedTimeRange": {
          "startDate": 1316870760321,
          "endDate": 1316870760321
        },
        "itemSelections": [
          {
            "itemName": "Percent of Memory Used - bytes",
            "cycleName": "Hours",
            "cycleUid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
            "componentName": "Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "",
            "itemUid": "ff0168cc-38bd-4880-a188-540b35d5cf2a"
          },
          {
            "itemName": "CPU Used",
            "cycleName": "Hours",
            "cycleUid": "69d71d6d-54d9-4be5-b52e-0ce1432ca0e2",
            "componentName": "Computer",
            "itemType": "stream",
            "componentUid": "59d9d98d-bd17-4b7c-a99a-77b49fbad29b",
            "extraData": "",
            "itemUid": "f5f54ceb-47c6-4c4b-baa2-34eb82238f52"
          }
        ],
        "height": 300,
        "name": "Computer CPU & Memory Averages - Current Hour",
        "rowNum": 0,
        "heartbeatDuration": 100
      }
    ],
    "numCols": 2
  }
}

DELETE view_dashboard/{view_dashboardUid}



Deletes a view_dashboard. Automatically removes it from all folders. A more efficient way of deleting a view map is to do the delete through the content_folder resource.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key token compatible Yes

Resource URL

http://grovestreams.com/api/view_dashboard/{view_dashboardUid}

Parameters

none

Example Requests

/view_dashboard/d251a8f2-f7b9-4df7-886d-b24c7f4929d4

Response Body
{
    "message" : "Deleted view_dashboard with uid 'd251a8f2-f7b9-4df7-886d-b24c7f4929d4
    "success" : true
}