---
title: "Return the datafile for the given environment. If you need strict consistency, you can pass the datafile to other Optimizely instances. so that all initialize from exactly the same datafile version (rather than each fetching the datafile separately from the Optimizely CDN)."
method: GET
path: "/v1/datafile"
---

# Return the datafile for the given environment. If you need strict consistency, you can pass the datafile to other Optimizely instances. so that all initialize from exactly the same datafile version (rather than each fetching the datafile separately from the Optimizely CDN).

`GET /v1/datafile`

Returns the json datafile for the given environment.

## Response `200`

Valid response

- object — Optimizely Datafile

## Other responses

- `401` — Unauthorized, invalid JWT
- `403` — You do not have necessary permissions for the resource

## Changes

- **2023-05-22** `b03cfe30eb69` — 2 breaking, 1 info
  - the response body contentMediaType changed from `` to `application/json` for the status `200`
  - the response's body type/format changed from ``/`` to `object`/`` for status `403`
  - added the media type `application/json` for the response with the status `401`
- **2021-01-19** `e1b4e434a454` — 1 info
  - endpoint added
- **2019-08-29** `6933bf16666a` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/optimizely/apis/optimizely-agent-api/changes/v1/datafile/get.md)

---

[API](https://skmtc.dev/optimizely/apis/optimizely-agent-api.md) · [All operations](https://skmtc.dev/optimizely/apis/optimizely-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimizely/optimizely-agent-api/revisions/8aa6750d4b77/schema)
