---
title: "Parse a GCS CSV file into JSON headers and rows"
method: GET
path: "/file/read"
tags: ["File Storage Resource"]
---

# Parse a GCS CSV file into JSON headers and rows

`GET /file/read`

Retrieves a CSV file from the configured Google Cloud Storage bucket by its object path, parses it with the server-side CSV parser, and returns a FileParserResponse. The response has two fields: headers, an ordered array of column-name strings, and rows, an array of objects keyed by column name whose values are strings or null. Empty cells in the source CSV are normalized to null. Use this endpoint when you need the CSV as machine-readable structured data, such as rendering rows in a table or validating column presence before processing; use GET /file/download instead when you need the raw file bytes. Supply the path query parameter with the GCS object name (for example, imports/my-file.csv) and a valid JWT. On success returns HTTP 200 with the parsed JSON body.

## Query parameters

- `path` string

## Headers

- `tenant-id` string, required

## Response `200`

The parsed CSV as a FileParserResponse containing headers (ordered column names) and rows (per-row objects keyed by column name, with empty cells represented as null).

- FileParserResponse
  - `headers` string[]
  - `rows` object[]

## Other responses

- `401` — Authentication failed. Supply a valid JWT bearer token.
- `404` — The file could not be retrieved or parsed. The server currently maps any failure while fetching or parsing the object — including a missing object, an unreadable path, or empty file content — to this status, so a 404 does not necessarily mean the object is absent.
- `500` — An unexpected server error occurred while parsing the file. The exact response body is not guaranteed by the endpoint's own error handling; it may be produced by the underlying framework's default error handler. Retry; if the problem persists, contact support.

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
