ASSET_TO_URI

The function ASSET_TO_URI takes an asset and produces a URI in the form of a string.

This function takes as input an Asset. It returns a String representing the asset's URI.

Declaration

ASSET_TO_URI(asset) -> asset_uri

Parameters

asset (required, type: Asset)

The Asset to create a URI for.

Return Values

asset_uri (type: string)

The asset's URI.

Examples

An Asset's URI is essentially a concatenation of the various identifiers in the Asset that allow it to be located.

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

Discussion

The function URI_TO_ASSET is the opposite operation of ASSET_TO_URI. However, it is not a perfect symmetry. An asset can contain more information than just its location information. Once serialized to a URI, that information cannot be accessed from the resulting URI.

Last updated