---
updatedAt: 2026-09-08T20:26:09.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# Export a worksheet

Export data used by a worksheet.

Results are limited to a maximum of 100,000 rows.

Results can be returned as CSV or NDJSON.
* Set Accept header to `text/csv` or `application/x-ndjson`
* Default: CSV

  Either two of `startTime`, `endTime`, and `interval` or `interval` alone can be specified to set the time interval. The `startTime` parameter is inclusive and the `endTime` parameter is exclusive, to prevent overlap from subsequent windows.

* `interval`: An interval relative to now
* `startTime` + `endTime`: The specified time interval
* `startTime` **or** `endTime` + `interval`: The specified time interval relative to the provided start or end time


# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Observe by Snowflake API",
    "description": "# Overview\nWelcome to the Observe API Docs!\n\nThe Observe API is a RESTful API. POST bodies and responses are typically JSON-encoded.\n\n## Authentication\nRequests to the Observe API are authenticated with an API token. The token can be supplied using HTTP Bearer authentication:\n```\n// passing token as bearer token\ncurl -H \"Authorization: Bearer <customerid> <token>\" https://<customerid>.<observe-domain>.com/v1/...\n```\n",
    "version": "1.0.230307"
  },
  "servers": [
    {
      "url": "https://{customerid}.observeinc.com",
      "description": "US west server",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        }
      }
    },
    {
      "url": "https://{customerid}.{cluster}.observeinc.com",
      "description": "Specific regional cluster (prod)",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        },
        "cluster": {
          "enum": [
            "eu-1",
            "ap-1"
          ],
          "default": "eu-1",
          "description": "For regional clusters, choose one."
        }
      }
    },
    {
      "url": "https://{customerid}.{domain}.com",
      "description": "Specific Observe server",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        },
        "domain": {
          "default": "OBSERVE_DOMAIN",
          "description": "The Observe domain for your instance."
        }
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Export",
      "description": "Export query results from Observe.\n"
    }
  ],
  "paths": {
    "/v1/meta/export/worksheet/{worksheetId}": {
      "post": {
        "summary": "Export a worksheet",
        "operationId": "exportWorksheet",
        "tags": [
          "Export"
        ],
        "description": "Export data used by a worksheet.\n\nResults are limited to a maximum of 100,000 rows.\n\nResults can be returned as CSV or NDJSON.\n* Set Accept header to `text/csv` or `application/x-ndjson`\n* Default: CSV\n\n  Either two of `startTime`, `endTime`, and `interval` or `interval` alone can be specified to set the time interval. The `startTime` parameter is inclusive and the `endTime` parameter is exclusive, to prevent overlap from subsequent windows.\n\n* `interval`: An interval relative to now\n* `startTime` + `endTime`: The specified time interval\n* `startTime` **or** `endTime` + `interval`: The specified time interval relative to the provided start or end time\n",
        "parameters": [
          {
            "name": "worksheetId",
            "description": "ID of the worksheet to export.",
            "in": "path",
            "schema": {
              "type": "integer"
            },
            "required": true,
            "examples": {
              "A worksheet ID": {
                "value": "123456789"
              }
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "description": "Beginning of time window (inclusive) as ISO time.",
            "schema": {
              "type": "string"
            },
            "required": false,
            "examples": {
              "A start time": {
                "value": "2023-04-20T16:20:00Z"
              }
            }
          },
          {
            "name": "endTime",
            "in": "query",
            "description": "End of time window (exclusive) as ISO time. Defaults to now if just `interval` is specified.",
            "schema": {
              "type": "string"
            },
            "required": false,
            "examples": {
              "An end time": {
                "value": "2023-04-20T16:30:00Z"
              }
            }
          },
          {
            "name": "interval",
            "in": "query",
            "description": "Length of time window (if start or end is missing).",
            "schema": {
              "type": "string"
            },
            "required": false,
            "examples": {
              "An interval": {
                "value": "10m",
                "summary": "A duration in h / m / s units"
              }
            }
          },
          {
            "name": "stage",
            "in": "query",
            "description": "Which stage to get the data from. Defaults to last stage.",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "## Description of result data formats\n\n### Content-type: application/x-ndjson\nThe results are returned with each row represented as distinct json objects separated by newlines.\nThe contents of the json object representing each row is keys representing each column in the output, with values representing the value of that that column for that row.\n\n### Content-type: text/csv\nThe results are returned in csv format, the first row in csv is a header row with the names of the columns.\n",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                },
                "example": "{\"BUNDLE_ID\":\"3729\",\"BUNDLE_TIMESTAMP\":\"1695924000540747582\",\"DATASTREAM_ID\":\"41000006\",\"DATASTREAM_TOKEN_ID\":\"ds1thSTHMTVac5mLzmLv\",\"EXTRA\":{\"clusterUid\":\"bd89af7a-2ab9-42de-97da-0d5894354da6\",\"path\":\"/data/logs\"},\"FIELDS\":{\"field1\":\"value1\",\"field2\":\"value2\"},\"OBSERVATION_INDEX\":\"7\",\"OBSERVATION_KIND\":\"http\",\"_ob_datastream_token_id\":\"ds1thSTHMTVac5mLzmLv\"}\n{\"BUNDLE_ID\":\"3729\",\"BUNDLE_TIMESTAMP\":\"1695924000540747582\",\"DATASTREAM_ID\":\"41000006\",\"DATASTREAM_TOKEN_ID\":\"ds1thSTHMTVac5mLzmLv\",\"EXTRA\":{\"clusterUid\":\"bd89af7a-2ab9-42de-97da-0d5894354da6\",\"path\":\"/data/logs\"},\"FIELDS\":{\"field1\":\"value3\",\"field2\":\"value4\"},\"OBSERVATION_INDEX\":\"1\",\"OBSERVATION_KIND\":\"http\",\"_ob_datastream_token_id\":\"ds1thSTHMTVac5mLzmLv\"}\n"
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                },
                "example": "\"BUNDLE_TIMESTAMP\",\"OBSERVATION_KIND\",\"FIELDS\",\"EXTRA\",\"BUNDLE_ID\",\"OBSERVATION_INDEX\",\"DATASTREAM_ID\",\"DATASTREAM_TOKEN_ID\",\"_ob_datastream_token_id\"\n\"1695924000540747582\",\"http\",\"{\"\"field1\"\":\"\"value1\"\",\"\"field2\"\":\"\"value2\"\"}\",\"{\"\"clusterUid\"\":\"\"bd89af7a-2ab9-42de-97da-0d5894354da6\"\",\"\"path\"\":\"\"/data/logs\"\"}\",\"3729\",\"7\",\"41000006\",\"ds1thSTHMTVac5mLzmLv\",\"ds1thSTHMTVac5mLzmLv\"\n\"1695924000540747582\",\"http\",\"{\"\"field1\"\":\"\"value3\"\",\"\"field2\"\":\"\"value4\"\"}\",\"{\"\"clusterUid\"\":\"\"bd89af7a-2ab9-42de-97da-0d5894354da6\"\",\"\"path\"\":\"\"/data/logs\"\"}\",\"3729\",\"1\",\"41000006\",\"ds1thSTHMTVac5mLzmLv\",\"ds1thSTHMTVac5mLzmLv\"\n"
              }
            }
          },
          "400": {
            "description": "Invalid request."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Authorization: Bearer <customerid> <apitoken>\n"
      }
    }
  }
}
````