Dashboards

Dashboards are used in projects to visualize the project data.

Methods

List Dashboards

GET https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/dashboards

Returns an array of all dashboards in a project.

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
Headers:See Common Headers.
Status Codes:
  • 200 – Array of dashboards is returned.

See also Common Status Codes.

Returns:

Array of dashboards.

[{
    "search": {
        "query": "Squirro"
    },
    "title": "Squirro",
    "widgets": [{
        "title": "Results",
        "col": 1,
        "row": 1,
        "size_x": 8,
        "size_y": 6,
        "type": "Search",
        "id": 1
    }],
    "type": "result",
    "id": "PSUHQNx8Tie81tfN5d1Nxg",
    "column_count": 16,
    "row_height": 55
}]

Create Dashboard

POST https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/dashboards

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
JSON Data:

Data is passed in as a JSON object.

Valid object keys:

  • title – Title of this dashboard, shown to the user (max. 256 characters).
  • widgets – List of widgets on this dashboard. Each widget is a JSON dictionary.
  • search – Search query which is used by default on the dashboard.
  • type – Dashboard type. The valid values are dashboard and result. The latter is used for the Chart result view.
  • column_count – How many columns are in the dashboard grid. This should generally not be set.
  • row_height – How many pixels an individual row takes in the dashboard grid. This should generally not be set.
Headers:See Common Headers.
Status Codes:
  • 201 – Dashboard created.

See also Common Status Codes.

Returns:

Created dashboard

{
    "search": {
        "query": "Squirro"
    },
    "title": "Squirro",
    "widgets": [{
        "title": "Results",
        "col": 1,
        "row": 1,
        "size_x": 8,
        "size_y": 6,
        "type": "Search",
        "id": 1
    }],
    "type": "result",
    "id": "PSUHQNx8Tie81tfN5d1Nxg",
    "column_count": 16,
    "row_height": 55
}

Get Dashboard

GET https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/dashboards/(id: dashboard_id)

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
  • dashboard_id – Dashboard identifier.
Headers:See Common Headers.
Status Codes:
  • 200 – Dashboard returned.

See also Common Status Codes.

Returns:

Dashboard

{
    "search": {
        "query": "Squirro"
    },
    "title": "Squirro",
    "widgets": [{
        "title": "Results",
        "col": 1,
        "row": 1,
        "size_x": 8,
        "size_y": 6,
        "type": "Search",
        "id": 1
    }],
    "type": "result",
    "id": "PSUHQNx8Tie81tfN5d1Nxg",
    "column_count": 16,
    "row_height": 55
}

Update Dashboard

PUT https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/dashboards/(id: dashboard_id)

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
  • dashboard_id – Dashboard identifier.
JSON Data:

Data is passed in as a JSON object. Takes the same input as the Create Dashboard resource.

Headers:See Common Headers.
Status Codes:
  • 200 – Dashboard returned.

See also Common Status Codes.

Returns:

Updated dashboard

{
    "search": {
        "query": "Squirro"
    },
    "title": "Squirro",
    "widgets": [{
        "title": "Results",
        "col": 1,
        "row": 1,
        "size_x": 8,
        "size_y": 6,
        "type": "Search",
        "id": 1
    }],
    "type": "result",
    "id": "PSUHQNx8Tie81tfN5d1Nxg",
    "column_count": 16,
    "row_height": 55
}

Delete Dashboard

DELETE https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/dashboards/(id: dashboard_id)

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
  • dashboard_id – Dashboard identifier.
Headers:

See Common Headers.

Status Codes:
  • 204 – Dashboard deleted.

See also Common Status Codes.

Move Dashboard

POST https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/dashboards/(id: dashboard_id)/move

Moves a dashboard position in the project. This affects the sorting of the dashboard tabs.

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
  • dashboard_id – Dashboard identifier.
JSON Data:

Data is passed in as a JSON object with the following key:

  • after – Dashboard identifier after which the current dashboard should be moved. If this value is not specified or null, the dashboard is moved to the beginning.
Headers:See Common Headers.
Status Codes:
  • 204 – Dashboard moved.

See also Common Status Codes.