Job Templates and the API

The Use of Templates with our API

The vWork website promotes the use of templates for web users to create and manage their jobs.

This makes it easy for web users to create the same job type over and over again.

The use of templates is not supported via the API. You define what a job looks like when you send the job XML to the API, so you send the entire job and do not refer to a template.

However, In vWork, template name is used for reporting and search filters so it can be handy to add this to all jobs created via the API.  There is a field in the API called "template_name", you can use this as a free text field to describe the job, it will be prominently displayed on both the website and the mobile app.

If you enter a template name that exists on the website, we will attempt to include this job in any alerts or reports that are run for that template.

This may or may not be possible, for example if a user has setup an alert for a step or custom field that exists in the web template but not in your API created job.

Best practice would be to create the job template in vWork, run a GET command to pull out the XML for the template, then strip out all of the unwanted detail and then use this XML as the basis for creating jobs via the API.



Need more information? ask us hereHave more questions? Submit a request