Summary
Get a smart template by ID
Description
Get a Smart Template using its ID
Route
GET /smart_template/id/:id
Roles
admin
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
id |
string |
yes |
Database ID for smart template |
Copied to Clipboard
{
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
smart_template |
object |
Smart Template Entity |
Copied to Clipboard
{
"_id": "de854935-3667-e868-c16e-8c5843e81357",
"form": {
"name": "Form 123",
"children": [
{
"properties": {
"type": "leafref",
"path": "/ncs:devices/ncs:device/ncs:name",
"min": "1",
"max": null,
"minLength": "1",
"maxLength": null,
"default": true,
"direction": "vertical",
"required": true,
"enforce": true,
"hidden": false
},
"id": "nostrud ad mollit exercitation",
"type": "container",
"element": "{\"type\":\"service_model\",\"id\":{\"name\":\"/ncs:services/devices:stringified_json\"}",
"name": "vlan_id_123",
"display_name": "vlan",
"source_type": "service_model",
"source": "/ncs:services/abc_devices:ios.device",
"key": "service.vlanid"
},
{
"properties": {
"type": "leafref",
"path": "/ncs:devices/ncs:device/ncs:name",
"min": "1",
"max": null,
"minLength": null,
"maxLength": "4",
"default": "non nisi ullamco irure",
"direction": "vertical",
"required": false,
"enforce": false,
"hidden": false
},
"id": "ut officia",
"type": "container",
"element": "{\"type\":\"service_model\",\"id\":{\"name\":\"/ncs:services/devices:stringified_json\"}",
"name": "vlan_id_123",
"display_name": "vlan",
"source_type": "service_model",
"source": "/ncs:services/abc_devices:ios.device",
"key": "service.vlanid"
}
],
"elements": [
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
},
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
},
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
}
],
"_id": "f0bb4e50-e468-438e-5a58-66bde882218a",
"groups": [
"337a8f720089ffe440d7ccf1",
"06cc35db005e59ec2ff0d41d",
"a0d2076a50e1bb025ef0ea83",
"0e8e7fdd5cd5ba0275bf98f4"
],
"created": "1971-11-28T17:29:36.96Z",
"created_by": "94d9a80b0833907ad26111c8",
"last_updated": "1946-10-11T15:32:22.485Z",
"last_updated_by": "e3b50bd9284d62ffbcd4afdb",
"tags": [
"aute eiusmod",
"aliqua",
"eiusmod aliquip adipisicing veniam in",
"amet mollit ea aliquip eu",
"magna ut occaecat mollit ex"
]
},
"faml": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "cant",
"severity": "error"
}
},
"name": "yPlssm",
"native": "interface GigabitEthernet 1",
"os": "cisco-ios, cisco-iosxr",
"created": "1446433291974",
"create_by": "mSLRDie"
}
Copied to Clipboard
{
"type": "object",
"properties": {
"_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
},
"form": {
"$ref": "formDocument"
},
"faml": {
"oneOf": [
{
"$ref": "famlObject#/definitions/famlLeaf"
},
{
"$ref": "famlObject#/definitions/famlContainer"
},
{
"$ref": "famlObject#/definitions/famlList"
}
]
},
"name": {
"type": "string",
"pattern": "[A-Za-z]+"
},
"native": {
"type": "string",
"enum": [
"hostname itential",
"interface GigabitEthernet 1"
]
},
"os": {
"type": "string",
"enum": [
"cisco-ios, cisco-iosxr",
"eos",
"junos"
]
},
"create_by": {
"type": "string",
"pattern": "[A-Za-z]+"
},
"created": {
"type": "string",
"pattern": "1[1-9]{12}"
}
},
"required": [
"_id",
"form",
"faml",
"name",
"native",
"os",
"created_by",
"created"
]
}