# URI\_TO\_ASSET

**The function URI\_TO\_ASSET takes an asset URI in the form of a string and returns the Asset.**

This function takes as input a [String](../../variable-data-types/the-text-variable-data-type) representing a valid asset URI. It returns the [Asset](../../variable-data-types/the-asset-data-type) associated with the given asset URI.&#x20;

#### Declaration

```javascript
URI_TO_ASSET(asset_uri) -> asset
```

&#x20;

#### Parameters

**asset\_uri** (required, type: _string_) A string containing a valid asset URI.

#### Return Values

**asset** (type: _Asset_) The Asset that the given asset URI points to. If it cannot parse the URI, it throws an error.

#### Examples

Assume we know there is an asset associated with the asset URI "asset://global:15a00ea3-6980-48ea-8e8c-651ddff1f0bf:f1919287-7659-459e-a975-4d057762cc17:46dc543e-e960-4d38-8dd0-ec51dfdd19d1:0". The following example returns the Asset associated with the asset URI:

```javascript
URI_TO_ASSET("asset://global:15a00ea3-6980-48ea-8e8c-651ddff1f0bf:f1919287-7659-459e-a975-4d057762cc17:46dc543e-e960-4d38-8dd0-ec51dfdd19d1:0") -> {  
 "organizationId": "15a00ea3-6980-48ea-8e8c-651ddff1f0bf",  
 "assetKey": "f1919287-7659-459e-a975-4d057762cc17",  
 "id": "46dc543e-e960-4d38-8dd0-ec51dfdd19d1",  
 "version": 0,  
 "visibility": "GLOBAL"  
}
```

The following example attempts to find the Asset that associated with the URI "This is a string". "This is a string" is not a valid URI, and so URI\_TO\_ASSET throws an error.&#x20;

```javascript
URI_TO_ASSET("This is a string") -> ERROR
```

&#x20;

#### Discussion

For a deeper dive into the use cases of URI\_TO\_ASSET, check out [The Fetch Asset Details Data Operation](../../data-operations/data-operation-overview/the-fetch-asset-details-data-operation) or [Working with existing PDFs](../../building-apps/pdfs/working-with-existing-pdfs).
