---
title: "PATCH /shares/{name}"
method: PATCH
path: "/shares/{name}"
tags: ["SharesService"]
---

# PATCH /shares/{name}

`PATCH /shares/{name}`

Update a share.

## Path parameters

- `name` string, required

## Request body

- UpdateShareRequest — Update a share. The caller must be a metastore admin or have the UPDATE_SHARE privilege on the metastore.
  - `name` string, required — Name of the share.
  - `updates` DataObjectUpdate[] — Array of shared data object updates.
    - `action` integer, required — Name of the share.
    - `dataObject` DataObject, required
      - `name` string — A fully qualified name that uniquely identifies a data object. For example, a table's fully qualified name is in the format of <catalog>.<schema>.<table>,
      - `dataObjectType` integer — Type of the data object.
      - `addedAt` string — The time when this data object is added to the share, in epoch milliseconds.
      - `addedBy` string — Username of the sharer.
      - `comment` string — A user-provided comment when adding the data object to the share.
      - `sharedAs` string — A user-provided new name for the data object within the share. If this new name is not provided, the object's original name will be used as the shared_as name. The shared_as name must be unique within a share. For tables, the new name must follow the format of <schema>.<table>.
      - `partitions` string[] — Array of partitions for the shared data.
      - `enableCdf` boolean — Whether to enable cdf or indicate if cdf is enabled on the shared object.
      - `historyDataSharingStatus` integer — Whether to enable or disable sharing of data history. If not specified, the default is DISABLED.
      - `startVersion` string — The start version associated with the object. This allows data providers to control the lowest object version that is accessible by clients. If specified, clients can query snapshots or changes for versions >= start_version. If not specified, clients can only query starting from the version of the object at the time it was added to the share. NOTE: The start_version should be <= the current version of the object.
  - `newName` string — A new name for the share.
  - `owner` string — Owner of the share.
  - `comment` string — User-provided free-form text description.

## Response `200`

OK

- ShareInfo
  - `id` string — Unique ID of the recipient.
  - `name` string — Name of the share.
  - `owner` string — Username of current owner of share.
  - `comment` string — User-provided free-form text description.
  - `dataObjects` DataObject[] — A list of shared data objects within the share.
    - `name` string — A fully qualified name that uniquely identifies a data object. For example, a table's fully qualified name is in the format of <catalog>.<schema>.<table>,
    - `dataObjectType` integer — Type of the data object.
    - `addedAt` string — The time when this data object is added to the share, in epoch milliseconds.
    - `addedBy` string — Username of the sharer.
    - `comment` string — A user-provided comment when adding the data object to the share.
    - `sharedAs` string — A user-provided new name for the data object within the share. If this new name is not provided, the object's original name will be used as the shared_as name. The shared_as name must be unique within a share. For tables, the new name must follow the format of <schema>.<table>.
    - `partitions` string[] — Array of partitions for the shared data.
    - `enableCdf` boolean — Whether to enable cdf or indicate if cdf is enabled on the shared object.
    - `historyDataSharingStatus` integer — Whether to enable or disable sharing of data history. If not specified, the default is DISABLED.
    - `startVersion` string — The start version associated with the object. This allows data providers to control the lowest object version that is accessible by clients. If specified, clients can query snapshots or changes for versions >= start_version. If not specified, clients can only query starting from the version of the object at the time it was added to the share. NOTE: The start_version should be <= the current version of the object.
  - `createdAt` string — Time at which this share was created, in epoch milliseconds.
  - `createdBy` string — Username of the creator of the share.
  - `updatedAt` string — Time at which this share was updated, in epoch milliseconds.
  - `updatedBy` string — Username of share updater.

## Other responses

- `default` — Default error response

---

[API](https://skmtc.net/delta-incubator/apis/delta-sharing-api.md) · [All operations](https://skmtc.net/delta-incubator/apis/delta-sharing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/delta-incubator/delta-sharing-api/revisions/a47a0389fffc/schema)
