curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "query": "query GetDashboards($scope: DashboardScope!) { dashboards(scope: $scope) { nodes { id name createdAt domains { id name } owner { id displayName } accessLevel } } }",
    "variables": {
      "scope": "VIEWER"
    }
  }' \
  https://{ACCOUNT}.askwisdom.ai/graphql
{
  "data": {
    "dashboards": {
      "nodes": [
        {
          "id": "dashboard_123456789",
          "name": "Sales Performance Dashboard",
          "createdAt": "2024-01-15T10:30:00Z",
          "domains": [
            {
              "id": "domain_987654321",
              "name": "Sales Analytics"
            }
          ],
          "owner": {
            "id": "user_456789123",
            "displayName": "John Doe"
          },
          "accessLevel": "EDITOR"
        }
      ]
    }
  }
}
The dashboards query retrieves a list of dashboards accessible to the current user, with optional filtering by domain and owner.

Signature

dashboards(scope: DashboardScope!, domainId: String, ownerId: String): DashboardsResponse!

Arguments

scope
DashboardScope!
required
The access level to filter dashboards by. See DashboardScope.
domainId
String
Optional filter to retrieve only dashboards associated with a specific domain.
ownerId
String
Optional filter to retrieve only dashboards owned by a specific user.

Response

Returns a DashboardsResponse object containing a list of accessible dashboards. See DashboardsResponse for the schema.

Usage Example

This example shows how to retrieve all dashboards with viewer access:
query GetDashboards($scope: DashboardScope!) {
  dashboards(scope: $scope) {
    nodes {
      id
      name
      createdAt
      domains {
        id
        name
      }
      owner {
        id
        displayName
      }
      accessLevel
    }
  }
}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "query": "query GetDashboards($scope: DashboardScope!) { dashboards(scope: $scope) { nodes { id name createdAt domains { id name } owner { id displayName } accessLevel } } }",
    "variables": {
      "scope": "VIEWER"
    }
  }' \
  https://{ACCOUNT}.askwisdom.ai/graphql
{
  "data": {
    "dashboards": {
      "nodes": [
        {
          "id": "dashboard_123456789",
          "name": "Sales Performance Dashboard",
          "createdAt": "2024-01-15T10:30:00Z",
          "domains": [
            {
              "id": "domain_987654321",
              "name": "Sales Analytics"
            }
          ],
          "owner": {
            "id": "user_456789123",
            "displayName": "John Doe"
          },
          "accessLevel": "EDITOR"
        }
      ]
    }
  }
}