1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00
docs/developers/ocean-cli/edit.md

23 lines
762 B
Markdown
Raw Normal View History

2024-06-17 14:51:47 +02:00
# Edit
To make changes to a dataset, you'll need to start by retrieving the asset's [Decentralized Data Object](../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'
```
2024-06-17 14:51:47 +02:00
<figure><img src="../../.gitbook/assets/getAsset.png" alt=""><figcaption><p>Retrieve DDO</p></figcaption></figure>
2024-06-17 14:51:47 +02:00
## Edit the Dataset
2023-10-03 13:18:40 +02:00
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`
```