Matrix Version: 5.4.1
In the REST Resource JavaScript asset: I have specified the URL like
https://api-staging.xxxxxxxxx.com/api/v1/credentials/%asset_metadata_cred_id%
The “asset_metadata_xxx” keyword is not resolving ? Does REST Resource asset even support Global keywords ?
I have also tried, %globals_asset_metadata_cred_id%, It works when I print its value in paint layout, but the metadata keyword DOES NOT resolve/work in REST Resource asset.
The API endpoint that I need to query looks like this https://api-staging.xxxxxxxxx.com/api/v1/credentials/{{id}} where “id” is the id of the course.
Then In the paint layout, I am accessing the REST resource using server side JS
<script>
// API call
var course_levels = %globals_asset_contents:33721%; // This is the REST resource
for (var i=0;i<course_levels.length;i++)
{
print(course_levels[i].name); //This gives an ERROR, as the dynamic keywords in REST resource is not resolving properly.
}
</script>