> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.12/api-integrations/data-catalog-data-lineage-and-grants-apis/reference-data.md).

# Reference Data

## Get reference dataset

> Retrieves a specific reference dataset by ID, including its data rows and headers (up to the configured limit).\
> \
> Requires the \*\*'View structures'\*\* permission on all domains associated with the dataset.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/reference_data/{id}":{"get":{"description":"Retrieves a specific reference dataset by ID, including its data rows and headers (up to the configured limit).\n\nRequires the **'View structures'** permission on all domains associated with the dataset.\n","operationId":"TdDdWeb.ReferenceDataController.show","parameters":[{"description":"Reference dataset ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceDataShowResponse"}}},"description":"Reference dataset retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get reference dataset","tags":["Reference Data"]}}},"components":{"schemas":{"ReferenceDataShowResponse":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"domain_ids":{"items":{"type":"integer"},"type":"array"},"headers":{"items":{"type":"string"},"nullable":true,"type":"array"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"type":"string"},"row_count":{"type":"integer"},"rows":{"items":{"items":{"type":"string"},"type":"array"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","name","domain_ids","row_count"],"type":"object"}},"required":["data"],"title":"ReferenceDataShowResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Update reference dataset

> Updates an existing reference dataset with a new file, name, or domain assignments. Only provided fields are updated. The dataset remains available during the update process.\
> \
> \*\*Only administrators\*\* can update reference datasets.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/reference_data/{id}":{"put":{"description":"Updates an existing reference dataset with a new file, name, or domain assignments. Only provided fields are updated. The dataset remains available during the update process.\n\n**Only administrators** can update reference datasets.\n","operationId":"TdDdWeb.ReferenceDataController.update","parameters":[{"description":"Reference dataset ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReferenceDataUpdateRequest"}}},"description":"Reference dataset payload","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceDataUpdateResponse"}}},"description":"Reference dataset updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Update reference dataset","tags":["Reference Data"]}}},"components":{"schemas":{"ReferenceDataUpdateRequest":{"additionalProperties":false,"properties":{"dataset":{"description":"CSV file content","format":"binary","nullable":true,"type":"string"},"domain_ids":{"description":"Domain IDs to associate with the dataset","items":{"type":"integer"},"nullable":true,"type":"array"},"name":{"description":"Dataset name","nullable":true,"type":"string"}},"title":"ReferenceDataUpdateRequest","type":"object"},"ReferenceDataUpdateResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/ReferenceDataResource"}},"required":["data"],"title":"ReferenceDataUpdateResponse","type":"object"},"ReferenceDataResource":{"additionalProperties":false,"properties":{"domain_ids":{"description":"Domain IDs","items":{"type":"integer"},"type":"array"},"headers":{"description":"CSV headers","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"Reference dataset ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"description":"Dataset name","type":"string"},"row_count":{"description":"Number of rows in the dataset","type":"integer"},"rows":{"description":"Dataset rows as arrays of strings","items":{"items":{"type":"string"},"type":"array"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","name","row_count"],"title":"ReferenceDataResource","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Delete reference dataset

> Permanently deletes a reference dataset by its ID. The dataset is immediately removed from the database, including all associated data rows and metadata.\
> \
> \*\*Only administrators\*\* can delete reference datasets.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/reference_data/{id}":{"delete":{"description":"Permanently deletes a reference dataset by its ID. The dataset is immediately removed from the database, including all associated data rows and metadata.\n\n**Only administrators** can delete reference datasets.\n","operationId":"TdDdWeb.ReferenceDataController.delete","parameters":[{"description":"Reference dataset ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Reference dataset deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Delete reference dataset","tags":["Reference Data"]}}},"components":{"schemas":{"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Update reference dataset

> Updates an existing reference dataset with a new file, name, or domain assignments. Only provided fields are updated. The dataset remains available during the update process.\
> \
> \*\*Only administrators\*\* can update reference datasets.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/reference_data/{id}":{"patch":{"description":"Updates an existing reference dataset with a new file, name, or domain assignments. Only provided fields are updated. The dataset remains available during the update process.\n\n**Only administrators** can update reference datasets.\n","operationId":"TdDdWeb.ReferenceDataController.update (2)","parameters":[{"description":"Reference dataset ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReferenceDataUpdateRequest"}}},"description":"Reference dataset payload","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceDataUpdateResponse"}}},"description":"Reference dataset updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Update reference dataset","tags":["Reference Data"]}}},"components":{"schemas":{"ReferenceDataUpdateRequest":{"additionalProperties":false,"properties":{"dataset":{"description":"CSV file content","format":"binary","nullable":true,"type":"string"},"domain_ids":{"description":"Domain IDs to associate with the dataset","items":{"type":"integer"},"nullable":true,"type":"array"},"name":{"description":"Dataset name","nullable":true,"type":"string"}},"title":"ReferenceDataUpdateRequest","type":"object"},"ReferenceDataUpdateResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/ReferenceDataResource"}},"required":["data"],"title":"ReferenceDataUpdateResponse","type":"object"},"ReferenceDataResource":{"additionalProperties":false,"properties":{"domain_ids":{"description":"Domain IDs","items":{"type":"integer"},"type":"array"},"headers":{"description":"CSV headers","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"Reference dataset ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"description":"Dataset name","type":"string"},"row_count":{"description":"Number of rows in the dataset","type":"integer"},"rows":{"description":"Dataset rows as arrays of strings","items":{"items":{"type":"string"},"type":"array"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","name","row_count"],"title":"ReferenceDataResource","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## List reference datasets

> Returns a list of reference datasets visible to the current user. The response includes dataset metadata (name, domain IDs, row count) but not the actual data rows.\
> \
> Requires the \*\*'View structures'\*\* permission. The list is automatically filtered to include only datasets belonging to domains the user has access to. Administrators and service accounts see all datasets.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/reference_data":{"get":{"description":"Returns a list of reference datasets visible to the current user. The response includes dataset metadata (name, domain IDs, row count) but not the actual data rows.\n\nRequires the **'View structures'** permission. The list is automatically filtered to include only datasets belonging to domains the user has access to. Administrators and service accounts see all datasets.\n","operationId":"TdDdWeb.ReferenceDataController.index","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceDataIndexResponse"}}},"description":"Reference datasets retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List reference datasets","tags":["Reference Data"]}}},"components":{"schemas":{"ReferenceDataIndexResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of reference datasets","items":{"$ref":"#/components/schemas/ReferenceDataResource"},"type":"array"}},"required":["data"],"title":"ReferenceDataIndexResponse","type":"object"},"ReferenceDataResource":{"additionalProperties":false,"properties":{"domain_ids":{"description":"Domain IDs","items":{"type":"integer"},"type":"array"},"headers":{"description":"CSV headers","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"Reference dataset ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"description":"Dataset name","type":"string"},"row_count":{"description":"Number of rows in the dataset","type":"integer"},"rows":{"description":"Dataset rows as arrays of strings","items":{"items":{"type":"string"},"type":"array"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","name","row_count"],"title":"ReferenceDataResource","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Create reference dataset

> Creates a new reference dataset from an uploaded CSV file and associated metadata.\
> \
> \*\*Only administrators\*\* can create reference datasets.\
> \
> If the CSV format is invalid or required fields are missing, the endpoint returns \`422 Unprocessable Entity\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/reference_data":{"post":{"description":"Creates a new reference dataset from an uploaded CSV file and associated metadata.\n\n**Only administrators** can create reference datasets.\n\nIf the CSV format is invalid or required fields are missing, the endpoint returns `422 Unprocessable Entity`.\n","operationId":"TdDdWeb.ReferenceDataController.create","parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReferenceDataCreateRequest"}}},"description":"Reference dataset payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceDataCreateResponse"}}},"description":"Reference dataset created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create reference dataset","tags":["Reference Data"]}}},"components":{"schemas":{"ReferenceDataCreateRequest":{"additionalProperties":false,"properties":{"dataset":{"description":"CSV file content","format":"binary","type":"string"},"domain_ids":{"description":"Domain IDs to associate with the dataset","items":{"type":"integer"},"type":"array"},"name":{"description":"Dataset name","type":"string"}},"required":["dataset","name","domain_ids"],"title":"ReferenceDataCreateRequest","type":"object"},"ReferenceDataCreateResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/ReferenceDataResource"}},"required":["data"],"title":"ReferenceDataCreateResponse","type":"object"},"ReferenceDataResource":{"additionalProperties":false,"properties":{"domain_ids":{"description":"Domain IDs","items":{"type":"integer"},"type":"array"},"headers":{"description":"CSV headers","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"Reference dataset ID","type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"name":{"description":"Dataset name","type":"string"},"row_count":{"description":"Number of rows in the dataset","type":"integer"},"rows":{"description":"Dataset rows as arrays of strings","items":{"items":{"type":"string"},"type":"array"},"nullable":true,"type":"array"},"updated_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","name","row_count"],"title":"ReferenceDataResource","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Download reference dataset as CSV

> Downloads a reference dataset as a CSV file attachment.\
> The response is a downloadable CSV file with the filename \`ref\_data\_\<id>.csv\`.\
> The file is generated on-the-fly from the stored dataset.\
> The download stream is memory-efficient for large datasets.\
> \
> \*Requires the \*\*'View structures'\*\* permission on all domains associated with the dataset.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.12.2"},"paths":{"/api/reference_data/{reference_data_id}/csv":{"get":{"description":"Downloads a reference dataset as a CSV file attachment.\nThe response is a downloadable CSV file with the filename `ref_data_<id>.csv`.\nThe file is generated on-the-fly from the stored dataset.\nThe download stream is memory-efficient for large datasets.\n\n*Requires the **'View structures'** permission on all domains associated with the dataset.\n","operationId":"TdDdWeb.ReferenceDataDownloadController.show","parameters":[{"description":"Reference dataset ID","in":"path","name":"reference_data_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"CSV file"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Download reference dataset as CSV","tags":["Reference Data"]}}},"components":{"schemas":{"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```
