Data Lake Queries

Panther API search operations

Overview

The Panther API supports the following data lake operations:

  • Listing your data lake databases, tables, and columns

  • Executing a data lake (Data Explorer) query using SQL

  • Executing an Indicator Search query

  • Canceling any currently-running query

  • Fetching the details of any previously executed query

  • Listing all currently running or previously-executed queries with optional filters

You can invoke Panther's API by using your Console's API Playground, or the GraphQL-over-HTTP API. Learn more about these methods on Panther API.

See the sections below for GraphQL queries, mutations, and end-to-end workflow examples around core data lake query operations.

Common Data Lake query operations

Below are some of the most common GraphQL Data Lake query operations in Panther. These examples demonstrate the documents you have to send using a GraphQL client (or curl) to make a call to Panther's GraphQL API.

Database Entities

# `AllDatabaseEntities` is a nickname for the operation
query AllDatabaseEntities {
  dataLakeDatabases {
     name
     description
     tables {
       name
       description
       columns {
         name
         description
         type
       }
     }
   }
 }

Executing queries

Fetching results for a data lake or Indicator Search query

When you execute a data lake or Indicator Search query, it can take a few seconds to a few minutes for results to come back. To confirm that the query has completed, you must check the status of the query (polling).

You can use the following query to check the query status, while also fetching its results if available:

The expected values of status and results depend on the query's status:

  • If the query is still running:

    • status will have a value of running

    • results will have a value of null

  • If the query has failed:

    • status will have a value of failed

    • results will have a value of null and the error message will be available in the message key

  • If the query has completed

    • status will have a value of succeeded

    • results will be populated

All of the above (along with the possible values for status) , along with additional fields you are allowed to request can be found in our Documentation Explorer or GraphQL schema file).

Fetching metadata around a data lake or Indicator Search query

In the example above, we requested the results of a Panther query. It is also possible to request additional metadata around the query.

In the following example, we request these metadata along the first page of results:

Listing data lake and Indicator Search queries

End-to-end examples

Below, we will build on the Common Operations examples to showcase an end-to-end flow.

Execute a data lake (Data Explorer) Query

Execute an Indicator Search query

Last updated

Was this helpful?