Skip to main content
GET
/
queries
List queries
curl --request GET \
  --url https://api.flipsidecrypto.xyz/public/v3/queries
{
  "queries": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "sql": "<string>",
      "lastSuccessfulRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "lastQueryRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "slug": "<string>",
      "parameters": [
        {
          "name": "<string>",
          "type": "string",
          "description": "<string>",
          "defaultValue": "<string>"
        }
      ],
      "agentRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dataSourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "updatedById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "metadata": null,
      "userAgent": "web",
      "lastSuccessfulRun": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "queryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "resultLocation": "<string>",
        "snowflakeQueryId": "<string>",
        "rowCount": 123,
        "executionTimeMs": 123,
        "columnSchema": [
          null
        ],
        "errorDetails": "<string>",
        "queryHash": "<string>",
        "warehouse": "<string>",
        "dataSourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "startedAt": "2023-11-07T05:31:56Z",
        "completedAt": "2023-11-07T05:31:56Z",
        "userAgent": "web"
      },
      "lastQueryRun": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "queryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "resultLocation": "<string>",
        "snowflakeQueryId": "<string>",
        "rowCount": 123,
        "executionTimeMs": 123,
        "columnSchema": [
          null
        ],
        "errorDetails": "<string>",
        "queryHash": "<string>",
        "warehouse": "<string>",
        "dataSourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "startedAt": "2023-11-07T05:31:56Z",
        "completedAt": "2023-11-07T05:31:56Z",
        "status": "PENDING",
        "userAgent": "web"
      }
    }
  ],
  "total": 1,
  "limit": 2,
  "offset": 1
}

Query Parameters

limit
string

Maximum number of results (default: 50, max: 100)

offset
string

Number of results to skip (default: 0)

Search query (matches name, description, slug)

sortBy
enum<string>

Sort field (default: updated)

Available options:
updated,
created,
name
sortDirection
enum<string>

Sort direction (default: desc)

Available options:
asc,
desc
source
enum<string>

Filter by source (default: all)

Available options:
human,
agent,
all
createdById
string<uuid>

Filter by creator user ID

ownerOrganizationId
string<uuid>

Filter by owning organization ID

flipsideOwned
enum<string>

Filter to queries owned by the Flipside org. Mutually exclusive with ownerOrganizationId.

Available options:
true,
false
includeRuns
enum<string>

Include lastSuccessfulRun and lastQueryRun (default: true). Set to false for picker UIs.

Available options:
true,
false

Response

List of queries

queries
object[]
required
total
integer
required
Required range: x >= 0
limit
integer
required
Required range: x >= 1
offset
integer
required
Required range: x >= 0