# How can I fetch the media files of the products in Shopware 6 using Rest API?

**URL:** <https://forum.shopware.com/t/how-can-i-fetch-the-media-files-of-the-products-in-shopware-6-using-rest-api/72208>\
**Category:** Programming (EN)\
**Created:** [20. Januar 2021 um 07:00 UTC](https://forum.shopware.com/t/how-can-i-fetch-the-media-files-of-the-products-in-shopware-6-using-rest-api/72208 "2021-01-20T07:00:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zan](https://avatars.discourse-cdn.com/v4/letter/z/48db29/32.png) [@zan](https://forum.shopware.com/u/zan)\
**Post date:** [20. Januar 2021 um 07:00 UTC](https://forum.shopware.com/t/how-can-i-fetch-the-media-files-of-the-products-in-shopware-6-using-rest-api/72208/1 "2021-01-20T07:00:25Z")

</div>

According to the documentation for REST API&nbsp;**[https://docs.shopware.com/en/shopware-platform-dev-en/how-to/working-with-the-api-and-an-http-client](https://docs.shopware.com/en/shopware-platform-dev-en/how-to/working-with-the-api-and-an-http-client)**

I can retrieve product data by calling the&nbsp;`request`&nbsp;function

```
$this->restService->request('GET', 'product');

```

Basically, it makes following request which is returning me product data.

```
private function createShopwareApiRequest(string $method, string $uri, ?string $body = null): RequestInterface
{
    return new Request(
        $method,
        getenv('APP_URL') . '/api/v3/' . $uri,
        [
            'Authorization' => 'Bearer ' . $this->accessToken,
            'Accept' => '*/*'
        ],
        $body
    );
}

```

I couldn’t find the media files related to the product. Can anybody help me how can I fetch products along with the images ?
