---
title: "Update Dataset Metadata"
method: PATCH
path: "/projects/{projectId}/datasets/{name}"
tags: ["Dataset Management"]
---

# Update Dataset Metadata

`PATCH /projects/{projectId}/datasets/{name}`

You can use this endpoint to update `approvalRequired` and `ownerOnly`. However, you cannot update other properties, such as `name`.

The `approvalRequired` flag controls the Entity creation flow. If it is `true`, then the Submission must be approved before an Entity can be created from it. If it is `false`, then an Entity is created as soon as the Submission is received by ODK Central. By default, `approvalRequired` is `false` for Datasets created after v2023.3. Datasets created prior to that will have `approvalRequired` set to `true`.

The `ownerOnly` flag determines which Entities in the Dataset are included for download to an OpenRosa client. More specifically, it determines which Entities are included in a Form Attachment that has been linked to the Dataset. If `ownerOnly` is `true`, and the Actor using the OpenRosa client only has access to the Dataset CSV file via linked Form Attachments, then only Entities created by the Actor will be included. This is true of App Users, Web Users with a role of Data Collector, and Public Access Links. If `ownerOnly` is `false`, or if the Actor has direct access to the Dataset CSV file, then all Entities will be included. By default, `ownerOnly` is `false`.

## Path parameters

- `projectId` number, required
- `name` string, required

## Request body

- object
  - `approvalRequired` boolean — Control whether a Submission should be approved before an Entity is created from it.
  - `ownerOnly` boolean — If `ownerOnly` is `true`, and an Actor only has access to the Dataset CSV file via linked Form Attachments, then only Entities created by the Actor will be downloaded to the OpenRosa client. If `ownerOnly` is `false`, or if an Actor has direct access to the Dataset CSV file, then all Entities will be downloaded.

## Response `200`

OK

- DatasetMetadata
  - `name` string, required — The name of the Dataset
  - `createdAt` string, required — ISO date format.
  - `projectId` number, required — The numerical ID of the Project that the Dataset belongs to.
  - `approvalRequired` boolean — Control whether a Submission should be approved before an Entity is created from it.
  - `ownerOnly` boolean — If `ownerOnly` is `true`, and an Actor only has access to the Dataset CSV file via linked Form Attachments, then only Entities created by the Actor will be downloaded to the OpenRosa client. If `ownerOnly` is `false`, or if an Actor has direct access to the Dataset CSV file, then all Entities will be downloaded.
  - `lastUpdate` string — ISO date format. The timestamp of the most recent change to the dataset or its entities
  - `linkedForms` FormKeyValue[] — Forms that consume data from the Dataset
    - `xmlFormId` string — The `id` of this form as given in its XForms XML definition
    - `name` string — The friendly name of this form. It is given by the `<title>` in the XForms XML definition. Returns `xmlFormId` if there is no title in the form definition.
  - `sourceForms` FormKeyValue[] — Forms that create Entities in the Dataset
    - `xmlFormId` string — The `id` of this form as given in its XForms XML definition
    - `name` string — The friendly name of this form. It is given by the `<title>` in the XForms XML definition. Returns `xmlFormId` if there is no title in the form definition.
  - `properties` PropertyDetailed[] — All properties of the Dataset
    - `name` string, required — The name of the Property.
    - `odataName` string — The name of the property as it will appear in OData. OData property names can only contain alphanumeric characters and underscores.
    - `publishedAt` string, required — Publishing timestamp of the form that defined this property for the first time.
    - `forms` FormKeyValue[] — List of forms that create the property
      - `xmlFormId` string — The `id` of this form as given in its XForms XML definition
      - `name` string — The friendly name of this form. It is given by the `<title>` in the XForms XML definition. Returns `xmlFormId` if there is no title in the form definition.

## Other responses

- `403` — Forbidden

## Changes

- **2025-06-09** `182b41228477` — 2 info
  - added the new optional request property `ownerOnly`
  - added the optional property `allOf[#/components/schemas/Dataset]/ownerOnly` to the response with the `200` status
- **2025-03-13** `e8c2858fd4eb` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/getodk/apis/odk-central-api/changes/projects/:projectId/datasets/:name/patch.md)

---

[API](https://skmtc.dev/getodk/apis/odk-central-api.md) · [All operations](https://skmtc.dev/getodk/apis/odk-central-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getodk/odk-central-api/revisions/fc2f2c8bd6a4/schema)
