GET /api/templates/1007981803/template_inputs
200
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [
{
"template_id": 1007981803,
"fact_name": null,
"variable_name": null,
"puppet_parameter_name": null,
"puppet_class_name": null,
"description": null,
"required": false,
"id": 2,
"name": "Template input 2",
"input_type": "user",
"options": null
}
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
template_id required |
Validations:
|
|
search optional |
filter results Validations:
|
|
order optional |
Sort and order by a searchable field, e.g. '<field> DESC' Validations:
|
|
page optional |
Page number, starting at 1 Validations:
|
|
per_page optional |
Number of results per page to return, 'all' to return all results Validations:
|
| Field name | Type | Possible values |
|---|---|---|
| id | integer | |
| input_type | string | |
| name | string |
GET /api/templates/1007981803-report_template3/template_inputs/2
200
{
"template_id": 1007981803,
"fact_name": null,
"variable_name": null,
"puppet_parameter_name": null,
"puppet_class_name": null,
"description": null,
"required": false,
"id": 2,
"name": "Template input 3",
"input_type": "user",
"options": null
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
template_id required |
Validations:
|
|
id required |
Validations:
|
POST /api/templates/1007981803-report_template4/template_inputs
{
"template_input": {
"name": "is_potato",
"input_type": "user",
"options": [
"true",
"false"
]
}
}
201
{
"template_id": 1007981803,
"fact_name": null,
"variable_name": null,
"puppet_parameter_name": null,
"puppet_class_name": null,
"description": null,
"required": false,
"id": 3,
"name": "is_potato",
"input_type": "user",
"options": [
"true",
"false"
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request 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 value Validations:
|
|
template_input[variable_name] optional , nil allowed |
Variable name, used when input type is Variable Validations:
|
|
template_input[options] optional , nil allowed |
Selectable values for user inputs Validations:
|
|
template_input[default] optional , nil allowed |
Default value for user input Validations:
|
|
template_input[hidden_value] optional , nil allowed |
The value contains sensitive information and shouldn not be normally visible, useful e.g. for passwords 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/1007981803-report_template6/template_inputs/2
{
"template_input": {}
}
200
{
"id": 2,
"name": "Template input 6",
"required": false,
"input_type": "user",
"fact_name": null,
"variable_name": null,
"puppet_class_name": null,
"puppet_parameter_name": null,
"description": null,
"template_id": 1007981803,
"created_at": "2018-11-16T10:03:32.381Z",
"updated_at": "2018-11-16T10:03:32.381Z",
"options": null,
"advanced": false
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
template_id required |
Validations:
|
|
id required |
Validations:
|
PUT /api/templates/1007981803-report_template1/template_inputs/2
{
"template_input": {
"name": "blah"
}
}
200
{
"id": 2,
"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": 1007981803,
"created_at": "2018-11-16T10:03:32.275Z",
"updated_at": "2018-11-16T10:03:32.293Z",
"options": null,
"advanced": false
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request 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 value Validations:
|
|
template_input[variable_name] optional , nil allowed |
Variable name, used when input type is Variable Validations:
|
|
template_input[options] optional , nil allowed |
Selectable values for user inputs Validations:
|
|
template_input[default] optional , nil allowed |
Default value for user input Validations:
|
|
template_input[hidden_value] optional , nil allowed |
The value contains sensitive information and shouldn not be normally visible, useful e.g. for passwords 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:
|