Custom Assets

Custom assets

Add downloadable custom assets to runs

An application run in Nextmv Console has several default views into the data along with the option to add custom views as desired. However, there may be additional data you want to associate with a run that for whatever reason does not necessitate a custom view.

With the custom assets feature you can add this additional data to the output JSON as non-visual assets and Console will extract the data and present it as user-friendly list of file downloads.

Add downloadable assets

To associate a downloadable asset with a run, add a new top-level assets key to your output JSON. This assets block must be an array of objects with the following properties:

Property Type Description
namestringName for the downloadable asset
content_typejsonDefines the content type of the downloadable asset. For now, only content type json is allowed.
contentJSONThis property should contain the content for the downloadable asset.
descriptionstring(Optional) Any additional information you would like to show to the end user.

For a quick demo, add the example JSON below to your custom app’s run output starting with the assets block (the items above this block are given for context):

{
  "version": {...},
  "options": {...},
  "solutions": [...],
  "statistics": {...},
  "assets": [
    {
      "name": "KPIs",
      "description": "Key performance indicators (KPI) pulled from the solution.",
      "content_type": "json",
      "content": {
        "data": [0, 1, 2]
      }
    },
    {
      "name": "Operator summary",
      "description": "JSON of preferred operator summary statistics.",
      "content_type": "json",
      "content": {
        "data": [0, 1, 2]
      }
    },
    {
      "name": "Data verification",
      "description": "3rd-party support data for further analysis if needed.",
      "content_type": "json",
      "content": {
        "data": [0, 1, 2]
      }
    }
  ]
}
Copy

Once you make a run with this new assets content, a new view should appear in the run details view in Nextmv Console with the label Assets. Click on this tab to view the available downloads for that run. You should see the three demo assets added with the JSON above.

Screenshow showing the UI to download the custom assets

And if you download one of the files it will be a JSON file with the following contents:

{"data":[0,1,2]}
Copy

Limits

There is a 1 MB limit on each custom asset defined in the assets array. There is no limit on the length of the assets array, but the overall size of the output must adhere to account memory limits for each run (view account limits).

Further

Page last updated

Go to on-page nav menu