Templating Sources

Overview

It is possible to create source templates, in order to prompt users to fill specific fields when creating new sources, from the Templated Source Creator widget.

The source templates follow a specific JSON format and can be created using the Source Editor.  When the source template is ready, it can be uploaded in the appropriate JSON format, using the File Uploader.

When the set of JSON objects are uploaded using the file uploader the JSON share  type "templated_source" must be used.  For more information see section File Uploader.

Source Template JSON Format

The JSON format is as follows:

{
	"templates" :[
	{
		//regular source json with substitutions, see below
		"template_per_url_cost" : 0.0015, //(optional extra field showing cost per query if one exists) example shown is $0.0015 per call (e.g. 1000 calls == $1.50))
	 }
	]
}

The following string substitutions are possible, corresponding to the UI elements in the above screenshot:

  • ??search_terms??
  • ??search_depth?? (only applies to pipelines containing "links" elements)
  • ??search_cycle?? (eg for use with harvest.searchCycle_secs)

One source is created for every array element in the template, for each search term for every selected template.