{"type":"model","meta":{"id":"/apps/pubhub/media/000-v7-apis/5b3454a4300b838cc17f7b2cdc0690fdd15058d5/c08488fb-7a2d-3d7d-9594-8f650f96122b","info":{"description":"Templates provide a streamlined approach to creating multiple tests (Synthetic/CEA and Endpoint), alert rules, dashboards, labels and other assets within ThousandEyes from a single configuration file.\nTemplates make it easy to configure monitoring for even the most complex monitoring scenarios.\nThe following applies to templates:\n* ThousandEyes provides a pre-defined set of templates for monitoring common services and applications like Office365, Webex, Atlassian, Slack, custom network, HTTP, API, and Web targets.\n* You can easily create tests for monitoring common services and applications such as Office365, Webex, and others using the predefined set of ThousandEyes built-in templates.\n* Users can create their own templates, which are visible to any other users in the account group the template was created in, provided they have the `View Templates Read` permission.\n* Templates support dynamic user inputs, which are values provided by users when a template is deployed. Templates leverage Handlebars templating notation to allow dynamically configuring ThousandEyes resources based on user provided inputs.\n* Templates can be deployed from the UI or the API.\n* Credentials (usernames, passwords, tokens, etc.) may be included in a template only as placeholders whose value is provided by user input when deployed. Creating or updating a template that contains a credentials field in plain text will result in a bad request (ie, HTTP 400).\n* Templates can also use Handlebars temlate notation to reference fields of other assets defined in the template. To support this, assets are created in the order below, which also determines what other assets a given asset can reference\n(ex. Labels cannot reference other assets, Tests can only reference labels, etc.)\n 1. Labels\n 2. Tests\n 3. Endpoint Tests\n 4. Tags\n 5. Alert Rules\n 6. Dashboard Filters\n 7. Dashboards\n\nFor more information about Templates, see the [product documentation](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/test-templates).\n","title":"Templates API","version":"7.0.34"},"security":[{"BearerAuth":[]}],"tags":[{"name":"Templates"}],"openapi":"3.0.0","servers":[{"description":"ThousandEyes API production URL","url":"https://api.thousandeyes.com/v7"}],"securitySchemes":{"BearerAuth":{"description":"Bearer authentication token","scheme":"bearer","type":"http"}}},"spec":{"description":"A user input is a value that the user must provide when deploying a template.\nUser Input values are provided by the user in the UI under the **Global Settings** section.\nWhen deploying via the API, User Inputs values are specified in the payload using the `userInputValues` field.\n","properties":{"name":{"description":"The name of the user input field.","example":"target","type":"string"},"type":{"description":"The type of user input. This defines the value the user can provide as well as the UI component displayed when redering User Inputs.\nThe type is used to validate the user provided value when deploying a template.\n- `string`: User input expects a string value; UI will be rendered as a text box.\n- `number`: User input expects a numeric value; UI will be rendered as a text box.\n- `boolean`: User input expects a boolean value; UI will be rendered as a check box.\n- `string[]`: User input expects an array of string values; UI will be rendered as drop down.\n- `number[]`: User input expects an array of numeric values; UI will be rendered as drop down.\n- `boolean[]`: User input expects an array of boolean values; UI will be rendered as drop down.\n- `agents`: User input expects an array of `agentId`s; UI will be rendered as an Agent Selector (CEA) drop down.\n- `tests`: User input expects an array of `testId`s; UI will be rendered as a Test Selector (CEA) drop down.\n- `any`: For any other user inputs that don't belong to the types listed above. These will be determined based on usage in template.\n","enum":["string","number","boolean","string[]","number[]","boolean[]","agents","tests","any"],"example":"string","type":"string","$$ref":"#/components/schemas/UserInputType"},"title":{"description":"The title of the user input field; may be used by UI.","example":"Test Target","type":"string"},"description":{"description":"Description of the user input field; used by UI.","example":"The target of the Tests","type":"string"},"defaultValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"object"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"items":{"type":"object"},"type":"array"}],"description":"A user input value. The type of object depends on the user input `type` field.","example":"us-west-1","$$ref":"#/components/schemas/UserInputValue"},"allowedValues":{"description":"Allowed values for the User Input. An array of name/value pairs that specify specific values that can be used with the User Input. In the UI, user inputs with `allowedValues` will be displayed as a drop down selector; the `name` will be used as the display text.","items":{"description":"The list of values that the user is allowed to use as inputs.","properties":{"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"object"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"items":{"type":"object"},"type":"array"}],"description":"A user input value. The type of object depends on the user input `type` field.","example":"us-west-1","$$ref":"#/components/schemas/UserInputValue"},"name":{"description":"The name of the value, which will be used for display in the UI and API messages.","example":"West","type":"string"}},"type":"object","$$ref":"#/components/schemas/UserInputAllowedValue"},"type":"array"}},"required":["name","type"],"type":"object","$$ref":"#/components/schemas/UserInput","title":"UserInput"}}