# Best way to get assets through API

**URL:** <https://discourse.getcockpit.com/t/best-way-to-get-assets-through-api/3144>\
**Category:** General\
**Created:** [January 24, 2025, 11:37am UTC](https://discourse.getcockpit.com/t/best-way-to-get-assets-through-api/3144 "2025-01-24T11:37:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barcsix](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/barcsix/32/1527_2.png) [@Barcsix](https://discourse.getcockpit.com/u/Barcsix)\
**Post date:** [January 24, 2025, 11:37am UTC](https://discourse.getcockpit.com/t/best-way-to-get-assets-through-api/3144/1 "2025-01-24T11:37:49Z")

</div>

Hello there,

I’m wondering what’s the best way to get assets through API.

Actually, I’m calling API from another website to get a model content. The model (singleton) contains an asset and so I’m getting :

```auto
array (
    'path' => '/2025/01/23/dummy_uid_679684sq6s4ea4f.pdf',
    'title' => 'Dummy',
    'mime' => 'application/pdf',
    'type' => 'document',
    'description' => '',
    'tags' => 
    array (
    ),
    'size' => 13264,
    'colors' => NULL,
    'width' => NULL,
    'height' => NULL,
    '_hash' => 'd6584fs5f1ds5641er541rzedcv',
    '_created' => 1737648728,
    '_modified' => 1737648728,
    '_cby' => 's645615fzs1561651',
    'folder' => '',
    '_id' => 'dsdfs6541651za658',

```

What’s the best way to load the asset with its full url, in an iframe for example ? As the full url is not included in the API response

Thanks
