Skip to main content
Skip table of contents

Running a Baton QC job with dynamic parameters

Baton allows dynamically changing the parameters of a test plan. This can be useful to for example change the test plans to check that the audio tracks match up with the expectation, without having a separate test plan configured. Dynamic parameters are set as JSON key-value pairs. The key is a dot separated selector, and the value a dynamic restriction.

Let’s say you have the following section in your test plan:

<section category="MXF" label="MXF" name="Common" summary="MXF Features">
  <description>MXF Features</description>
  <item check="true" index="0" label="Audio Track Layout" level="1" log="true" name="Track Layout" severity="Serious">
    <component check="true" enum="TrackLayout" name="Audio Track Layout" restriction="R48 2a" rule="!=" type="enumeration"/>

And we want to change the track layout restriction to be R123 4c. We then construct the following JSON document:

  "MXF.Audio Track Layout.Audio Track Layout": {
    "restriction": "R123 4c",

When we provide this document as a dynamic parameter when starting the task, the changes will be made dynamically to the test plan.

Starting a Baton QC job with dynamic parameters in VidiCore

To use this feature when starting the job through VidiCore, we simply need to provide an additional parameter when we send the request to create the job.

Normally we would starta job with the following request:

POST /API/item/VX-900/shape/VX-1612/analyze?preset=my_baton_test_plan&resourceId=VX-10

This will start the QC job, with the test plan as-is.

If we would like to provide the dynamic parameters above, we need to set some extra job metadata:


As you can see, we added a new query parameter named jobmetadata and we set the value to batonDynamicParameters=%7B%0A%20%20%22MXF.Audio%20Track%20Layout.Audio%20Track%20Layout%22%3A%20%7B%0A%20%20%20%20%22restriction%22%3A%20%22R123%204c%22%2C%0A%20%20%20%20%22rule%22%3A%22is%22%0A%20%20%7D%0A%7D.

As you can see, it looks a lot like a garbled mess! But this is actually the JSON above, it has just been URL encoded. and we need to do this to ensure that the URL is valid. You can use this site, paste the JSON document from above and press “encode”, and you should end up with the same string.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.