---
updatedAt: 2026-06-12T14:47:33.000Z
agentTools:
  projectIndex: https://docs.formant.io/llms.txt
---

# List new rows

Will Execute Analytics Queries
Resource: organization
Authorized roles: viewer

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "SqlQuery": {
        "properties": {
          "sqlQuery": {
            "type": "string"
          },
          "parameters": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "start": {
            "format": "date-time",
            "type": "string"
          },
          "end": {
            "format": "date-time",
            "type": "string"
          },
          "limit": {
            "type": "number"
          },
          "tableColumns": {
            "items": {},
            "type": "array"
          },
          "aggregateLevel": {
            "nullable": true,
            "type": "string",
            "enum": [
              "minute",
              "hour",
              "date",
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "aggregateType": {
            "type": "string",
            "enum": [
              "avg",
              "sum",
              "count",
              "min",
              "max",
              "median",
              "std_dev"
            ]
          },
          "orderByColumn": {
            "type": "string"
          },
          "orderByDescending": {
            "type": "boolean"
          },
          "groupByDevice": {
            "type": "boolean"
          },
          "timeDimension": {
            "type": "boolean"
          },
          "type": {
            "type": "string"
          },
          "fillGaps": {
            "type": "boolean"
          },
          "unit": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "tags": {
            "title": "MultiTagSets",
            "description": "One or more TagSets (combined with OR logic)",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TagSets"
                }
              },
              {
                "$ref": "#/components/schemas/TagSets"
              }
            ]
          },
          "deviceIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "names": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "types": {
            "items": {
              "type": "string",
              "enum": [
                "bitset",
                "localization",
                "point cloud",
                "location",
                "file",
                "health",
                "transform tree",
                "battery",
                "video",
                "numeric set",
                "json",
                "image",
                "numeric",
                "text"
              ]
            },
            "type": "array"
          },
          "notTags": {},
          "notNames": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "agentIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SqlColumn": {
        "properties": {
          "name": {
            "type": "string"
          },
          "dataType": {
            "type": "string"
          },
          "isNullable": {
            "type": "boolean"
          },
          "tableName": {
            "type": "string"
          },
          "nativeType": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "name",
          "dataType",
          "isNullable",
          "tableName"
        ]
      },
      "SqlResult": {
        "properties": {
          "rows": {
            "type": "array",
            "items": {}
          },
          "columns": {
            "items": {
              "$ref": "#/components/schemas/SqlColumn"
            },
            "type": "array"
          },
          "rowCount": {
            "type": "number"
          },
          "sqlText": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "autoAnalytics": {
            "description": "Auto analytics insights"
          }
        },
        "type": "object",
        "required": [
          "rows",
          "columns",
          "rowCount",
          "sqlText"
        ]
      },
      "TagSets": {
        "title": "TagSets",
        "description": "A map of tag keys to an array of values",
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "info": {
    "title": "Formant query-api",
    "version": "1.357.8"
  },
  "openapi": "3.0.0",
  "paths": {
    "/analytics/rows": {
      "post": {
        "operationId": "AnalyticsController.listNewRows",
        "parameters": [
          {
            "in": "header",
            "name": "app-id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SqlQuery"
              }
            }
          },
          "description": "SqlQuery",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SqlResult"
                }
              }
            },
            "description": ""
          }
        },
        "summary": "List new rows",
        "tags": [
          "Analytics"
        ],
        "description": "Will Execute Analytics Queries\nResource: organization\nAuthorized roles: viewer",
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.formant.io/v1/queries"
    }
  ]
}
```