Get information about a project template

Return a JSON representation of a project template

Request

GET https://{hostname}:{port}
  /build/rest2/templates/{id}
Table 1. URL parameters
Parameter Type Required Description
id string true The identifier to use when looking up a project template. This can be the name or ID of the project template
This command takes a JSON request string or file. Use the following template for the request:
{
  "active": "Whether or not the project template is 
  active.",
  "build-pre-process": [{
    "name": "The name of the Build Pre-Processing property
  (quiet-period, merge-period, label-values, stamp-values, 
  agent-pool, shouldCleanup, pre-condition-script, agent-
  pool-prop).",
    "value": "The value of the Build Pre-Processing 
  property"
  }],
  "description": "The project template description",
  "id": "The ID of the project template",
  "location": "The URL that can be used to get the JSON 
  representation of the project template",
  "name": "The name of the project template",
  "properties": [{
    "agentPool": "The agent pool of the property",
    "allowed-values": "The values users are allowed to 
  select for this property. Separate each value by entering 
  it on its own line, if property display-type is Multi-
  Select or Select",
    "allowedValues": "The values users are allowed to 
  select for this property. Separate each value by entering 
  it on its own line, if property display-type is Multi-
  Select or Select",
    "allowedValuesScript": "The beanshell script to 
  determine the allowed values to be selected from, if 
  property display-type is Multi-Select or Select",
    "default-value": "The default value of this property.",
    "defaultAgentPool": "The default agent pool of the 
  property",
    "defaultValueCheckbox": "The default value for the 
  property when the property's display-type is Checkbox",
    "defaultValueText": "The default value for the 
  property when the property's display-type is Text Area",
    "defaultValueTextArea": "The default value of the 
  property when the property's display-type is Text Area",
    "defaultValues": "The default value of the property.",
    "description": "The description of the property",
    "display-type": "The display type of the property 
  (Text, Select, Checkbox, Multi-Select, Text Area, Text 
  (secure), Integration Plugin, Agent Pool)",
    "isNew": "whether or not this is a new property",
    "job": "The id of the job",
    "label": "A label for this property shown when 
  prompting users for value. (Leave blank to use the name as 
  the Label)",
    "name": "The name of the property",
    "oldName": "The name of the property if this is an 
  existing property",
    "pluginType": "The plugin type of the property",
    "required": "whether or not the value of the property 
  is required when creating a project using this template.",
    "scripted": "whether or not the value type of the 
  property is scripted",
    "valueType": "The value type of the property 
  (scripted, defined, jobExecution)"
  }],
  "resourceId": "The security resource ID of the project 
  template"
}