# Edit

To make changes to a dataset, you'll need to start by retrieving the asset's [Decentralized Data Object](/developers/ddo-specification.md) (DDO).

## Retrieve DDO

Obtaining the DDO of an asset is a straightforward process. You can accomplish this task by executing the following command:

```bash
npm run cli getDDO 'assetDID'
```

<figure><img src="/files/fz8Wjm21vhtsfUJDALdO" alt=""><figcaption><p>Retrieve DDO</p></figcaption></figure>

## Edit the Dataset

After retrieving the asset's DDO and saving it as a JSON file, you can proceed to edit the metadata as needed. Once you've made the necessary changes, you can utilize the following command to apply the updated metadata:

```bash
npm run cli editAsset 'DATASET_DID' 'PATH_TO_UPDATED_FILE`

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oceanprotocol.com/developers/ocean-cli/edit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
