Skip to content

Rename item

Update item

It is possible to update an item name or quantity (EUM Item and EUM Unit).

Note there is no concurency handling for this operation as of May 2021. This can potentially lead to problems when you try to update an item while there is a running Transfer to the same dataset. Also any new transfers like updates or appends must take an updated name into account.

The request payload must include all properties even if you are not updating them. So even if you want to change only name, you need to fetch the multidimensional dataset and populate also unit and item of the ItemDefinitionUpdate contract.

  PATCH /api/md/dataset/{id}/item/{index}
  body:
  {
    "name": "Updated name",
    "unit": "eumUmeter",
    "item": "eumIWaterLevel"
  }
  IMultidimensionalClient _mdClient ; // see SDK how to get the client
  var dataset = await mdClient.GetDatasetV3Async(datasetId);
  var item = dataset.Items.First();

  var itemUpdate = new ItemDefinitionUpdate
  {
    Name = "Updated item",
    Item = item.Quantity.Item,
    Unit = item.Quantity.Unit
  };

  var result = await _mdClient.UpdateItem(projectId, datasetId, 0, itemUpdate);