GET /api/templates/1007981710/template_inputs
200
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [
{
"template_id": 1007981710,
"fact_name": null,
"variable_name": null,
"puppet_parameter_name": null,
"puppet_class_name": null,
"description": null,
"required": false,
"id": 6,
"name": "Template input 17",
"input_type": "user",
"options": null
}
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
|
template_id required |
Validations:
|
|
search optional |
filter results Validations:
|
|
order optional |
Sort field and order, eg. ‘id DESC’ Validations:
|
|
page optional |
Page number, starting at 1 Validations:
|
|
per_page optional |
Number of results per page to return Validations:
|
GET /api/templates/1007981705-report_template136/template_inputs/1
200
{
"template_id": 1007981705,
"fact_name": null,
"variable_name": null,
"puppet_parameter_name": null,
"puppet_class_name": null,
"description": null,
"required": false,
"id": 1,
"name": "Template input 12",
"input_type": "user",
"options": null
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
|
template_id required |
Validations:
|
|
id required |
Validations:
|
POST /api/templates/1007981706-report_template137/template_inputs
{
"template_input": {}
}
422
{
"error": {
"id": null,
"errors": {
"name": [
"can't be blank"
],
"input_type": [
"can't be blank",
"is not included in the list"
]
},
"full_messages": [
"Name can't be blank",
"Input type can't be blank",
"Input type is not included in the list"
]
}
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
|
template_id required |
Validations:
|
|
template_input required |
Validations:
|
|
template_input[name] required |
Input name Validations:
|
|
template_input[description] optional , nil allowed |
Input description Validations:
|
|
template_input[required] optional , nil allowed |
Input is required Validations:
|
|
template_input[advanced] optional , nil allowed |
Input is advanced Validations:
|
|
template_input[input_type] required |
Input type Validations:
|
|
template_input[fact_name] optional , nil allowed |
Fact name, used when input type is fact Validations:
|
|
template_input[variable_name] optional , nil allowed |
Variable name, used when input type is variable Validations:
|
|
template_input[puppet_class_name] optional , nil allowed |
Puppet class name, used when input type is puppet_parameter Validations:
|
|
template_input[puppet_parameter_name] optional , nil allowed |
Puppet parameter name, used when input type is puppet_parameter Validations:
|
|
template_input[options] optional , nil allowed |
Selectable values for user inputs Validations:
|
|
template_input[value_type] optional , nil allowed |
Value type, defaults to plain Validations:
|
|
template_input[resource_type] optional , nil allowed |
For values of type search, this is the resource the value searches in Validations:
|
DELETE /api/templates/1007981707-report_template138/template_inputs/3
{
"template_input": {}
}
200
{
"id": 3,
"name": "Template input 14",
"required": false,
"input_type": "user",
"fact_name": null,
"variable_name": null,
"puppet_class_name": null,
"puppet_parameter_name": null,
"description": null,
"template_id": 1007981707,
"created_at": "2019-09-11T14:53:40.408Z",
"updated_at": "2019-09-11T14:53:40.408Z",
"options": null,
"advanced": false,
"value_type": "plain",
"resource_type": null
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
|
template_id required |
Validations:
|
|
id required |
Validations:
|
PUT /api/templates/1007981708-report_template139/template_inputs/4
{
"template_input": {
"name": "blah"
}
}
200
{
"id": 4,
"name": "blah",
"required": false,
"input_type": "user",
"fact_name": null,
"variable_name": null,
"puppet_class_name": null,
"puppet_parameter_name": null,
"description": null,
"template_id": 1007981708,
"created_at": "2019-09-11T14:53:40.435Z",
"updated_at": "2019-09-11T14:53:40.450Z",
"options": null,
"advanced": false,
"value_type": "plain",
"resource_type": null
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
|
template_id required |
Validations:
|
|
id required |
Validations:
|
|
template_input required |
Validations:
|
|
template_input[name] optional |
Input name Validations:
|
|
template_input[description] optional , nil allowed |
Input description Validations:
|
|
template_input[required] optional , nil allowed |
Input is required Validations:
|
|
template_input[advanced] optional , nil allowed |
Input is advanced Validations:
|
|
template_input[input_type] optional |
Input type Validations:
|
|
template_input[fact_name] optional , nil allowed |
Fact name, used when input type is fact Validations:
|
|
template_input[variable_name] optional , nil allowed |
Variable name, used when input type is variable Validations:
|
|
template_input[puppet_class_name] optional , nil allowed |
Puppet class name, used when input type is puppet_parameter Validations:
|
|
template_input[puppet_parameter_name] optional , nil allowed |
Puppet parameter name, used when input type is puppet_parameter Validations:
|
|
template_input[options] optional , nil allowed |
Selectable values for user inputs Validations:
|
|
template_input[value_type] optional , nil allowed |
Value type, defaults to plain Validations:
|
|
template_input[resource_type] optional , nil allowed |
For values of type search, this is the resource the value searches in Validations:
|