# REST-API (media resource) - description

**URL:** https://forum.shopware.com/t/rest-api-media-resource-description/99482
**Category:** Shopware 5
**Created:** [27. April 2023 um 09:52 UTC](https://forum.shopware.com/t/rest-api-media-resource-description/99482 "2023-04-27T09:52:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Frank\_2812](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Frank\_2812](https://forum.shopware.com/u/Frank_2812)
#### Post date: [27. April 2023 um 09:52 UTC](https://forum.shopware.com/t/rest-api-media-resource-description/99482/1 "2023-04-27T09:52:29Z")

</div>

Hallo,

wenn man auf der „media“ Resource ein neues Element anlegt, muss man das Feld „description“ mit belegen (ist ein Plichtfeld, [Shopware-Dokumentation zur REST-API](https://developers.shopware.com/developers-guide/rest-api/api-resource-media/)) .

Soweit, so gut. Allerdings scheint es nicht zu gehen, bei einem Update das Feld „description“ zu aktualisieren. Folgender Aufruf führt nicht zur Datenänderung, obwohl der call ein „success“ zurückgibt:

```auto
$shopware_media_id=156;

$updateMedia = [
    'file' => 'https://mein-shop.de/api/dokument.pdf',
    'description' => 'meine neue description.'
];

$update_media_res = $client->put('media/'.$shopware_media_id, $updateMedia);
print_r($update_media_res);

```

Hat jemand einen Tipp, warum es nicht funktioniert? Wo taucht das Feld „description“ eigentlich im Shopware-Backend auf?

Viele Grüße, Frank

---

<div class="post-metadata">

### Author: ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)
#### Post date: [27. April 2023 um 10:35 UTC](https://forum.shopware.com/t/rest-api-media-resource-description/99482/2 "2023-04-27T10:35:04Z")

</div>

PUT ist Update, da muss man keine Descriptionen mit übergeben.

---

<div class="post-metadata">

### Author: ![Frank\_2812](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Frank\_2812](https://forum.shopware.com/u/Frank_2812)
#### Post date: [27. April 2023 um 10:41 UTC](https://forum.shopware.com/t/rest-api-media-resource-description/99482/3 "2023-04-27T10:41:32Z")

</div>

Hallo,

ich möchte ja ein UPDATE machen. Es funktioniert nur nicht bei „description“. Ist es nicht vorgesehen, oder mache ich etwas falsch?

Viele Grüße, Frank

---

<div class="post-metadata">

### Author: ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)
#### Post date: [27. April 2023 um 11:16 UTC](https://forum.shopware.com/t/rest-api-media-resource-description/99482/4 "2023-04-27T11:16:36Z")

</div>

> [@Frank\_2812](#):
>
> ich möchte ja ein UPDATE machen

Ok, dann habe ich dein Eingangspost falsch verstanden. Laut Doku ist bei Update nur „files“ pflicht. Descriptionen ebenfalls zu updaten habe ich bisher noch nie ausprobiert.

---

<div class="post-metadata">

### Author: ![Frank\_2812](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@Frank\_2812](https://forum.shopware.com/u/Frank_2812)
#### Post date: [27. April 2023 um 11:20 UTC](https://forum.shopware.com/t/rest-api-media-resource-description/99482/5 "2023-04-27T11:20:16Z")

</div>

> [@R4M](#):
>
> Descriptionen ebenfalls zu updaten habe ich bisher noch nie ausprobiert.

Ich schon, mit dem Ergebnis, dass es offenbar nicht funktioniert. Ich wollte eigentlich nur herausbekommen, ob es grundsätzlich nicht geht, oder ich nur etwas falsch mache 😏.

Viele Grüße, Frank
