Skip to main content
Skip table of contents

Templates Data

A Job template contains a complete or partial ROAD job, which may be used repeatedly.

For general understand of ROAD data types and especially ROAD jobs, see Jobs Data.

About Job Templates

Job templates help to prepare future jobs by defining their complete or partial description.

A template's job specification can be copied into a job JSON to build a new job whenever requested. This can be used by specific clients to make their behavior more flexible. Specific differences can be realized later by filling or overwriting some data. By copying a template's data into a job and sending that job to the ROAD Service in a POST request, this job is being created.

Templates can also contain only partial information, e.g. Transitions which may be appended to any job.

The most common usage of templates is the ROAD scheduler, which allows either to define some common features for a recording job (with no need for a template) or - in case any not such common or rather special jobs are required -, this can be defined by a template, which will be referred to in a schedule.

Templates are supported only in an installation with database.

Data Fields

TemplateIdUnique ID of this template. Is exclusively created by the ROAD Service's templates/POST command and is required for all later access to this template object.
NameDescriptive name intended for end user (free text field). Should be appropriate for the end user to select a template inside a given category.
DescriptionOptional descriptive text to help understanding what this template is intended for
Groups

Array of assignments to groups in categories to classify this template.

Typically there is at least one assignment to a group inside the "Job Types" category. See example JSON below. For categories and groups see api/categories.

Job

Data structure or parts of it as described in Jobs Data.

Typically a template's job data is incomplete, only containing parts specific for jobs being created from this template.

Job Template JSON Examples

Note: This example contains some empty lines, which are to be filled before starting a job with this description.

JSON Example - Start Recording

JS
{
  "name": "Recording from ASIO device to file",
  "groups": [
    { "category": "Users", "group": "Sam" },
    { "category": "Job Types", "group": "Recording" }
  ],
  "description": "This template is an example for ASIO recording",
  "job": {
      "transitions": [  
        {  
          "jobDescription": {  
            "pipeSpec": {  
              "InputGraph": [  
                { 
                  "Name": "Input", 
                  "Filter":[  
                    {  
                      "Name": "ASIO Source",
                      "Device": {  
                        
                      },
                      "Format": {  
                        
                      }
                    }
                  ]
                }
              ],
              "OutputGraph": [  
                {
                    "Name": "Output",
                    "Filter": [  
                    {  
                      "Name": "WAVDest",
                      "Clsid": "{79376820-07D0-11CF-A24D-0020AFD79768}",
                      "Title": "Fill in a valid file title when starting as a job!",
                      "WriteRf64": true,
                      "WriteLevlChunk": true
                    },
                    {  
                      "Name": "FileWriter",
                      "Clsid": "{79376820-07D0-11CF-A24D-0020AFD79769}",
                      
                    }
                  ]
                }
              ]
            }
          }
        }
      ]
   }
}
JavaScript errors detected

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

If this problem persists, please contact our support.