For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Open sourceSupportFAQsDocs Home
DocumentationAPI ReferenceRelease notes
DocumentationAPI ReferenceRelease notes
  • Introduction
    • Overview
    • Authentication
  • Guides
    • Integration API routes
    • Operations Manager search APIs
    • Search API
    • URL query parameters
    • Use query parameters in API requests
  • Reference
        • POSTAdd one or more components to project
        • POSTCreate a new component group document
        • POSTCreate a new project
        • POSTCreate a new template document
        • POSTCreate a new workflow document
        • DELDelete a component group document
        • DELDelete a project and any components it contains
        • DELDelete a template document
        • POSTDiscover referenced resources
        • GETExport a template document
        • GETExport project as JSON document
        • GETGet a list of all the apps and adapters
        • GETGet a page of component group documents
        • GETGet a page of template documents
        • GETGet a page of workflow documents
        • GETGet a project's thumbnail
        • GETGet component group document
        • GETGet details of a workflow
        • GETGet project
        • GETGet references to a particular document
        • GETGet task details
        • POSTGet task details
        • GETGet template document
        • POSTImport a new component group document
        • POSTImport a new template document
        • POSTImport a new workflow document
        • POSTImport a project document from a JSON document
        • GETList all available rest calls
        • DELRemove a component from a project
        • PUTReplace a component group document
        • PUTReplace a template document
        • PUTReplace a workflow document
        • GETSearch projects
        • PUTSet a project's thumbnail image
        • PATCHUpdate an existing project
        • POSTValidate a workflow
LogoLogo
Open sourceSupportFAQsDocs Home
ReferenceAutomation Studio

Import a new template document

POST
http://localhost:3000/automation-studio/templates/import
POST
/automation-studio/templates/import
$curl -X POST http://localhost:3000/automation-studio/templates/import \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{}'
1{
2 "imported": [
3 {
4 "message": "string",
5 "original": {
6 "_id": "string",
7 "name": "arista_eos_show_clock",
8 "projectId": null,
9 "group": "Arista",
10 "device": "Arista EOS",
11 "command": "show clock",
12 "description": "Arista Show Clock Info",
13 "template": "Value TIME (d+:d+:d+)\nValue TIMEZONE (S+)\nValue DAYWEEK (w+)\nValue MONTH (w+)\nValue DAY (d+)\nValue YEAR (d+)\n\nStart\n ^${DAYWEEK}s+${MONTH}s+${DAY}s+${TIME}s+${YEAR}\n ^[t|T]imezone(:|sis)s+${TIMEZONE} -> Record\n",
14 "data": "Mon Jan 14 18:42:49 2013\ntimezone is US/Central",
15 "text": "Mon Jan 14 18:42:49 2013\ntimezone is US/Central",
16 "type": "textfsm",
17 "createdBy": "string",
18 "created": "2019-11-25T22:51:39.201Z",
19 "lastModifiedBy": "string",
20 "lastUpdated": "2019-11-25T22:51:39.201Z",
21 "version": 1,
22 "tags": [
23 {
24 "_id": "string",
25 "name": "string"
26 }
27 ]
28 },
29 "created": {
30 "name": "arista_eos_show_clock",
31 "group": "Arista",
32 "command": "show clock",
33 "description": "Arista Show Clock Info",
34 "template": "Value TIME (d+:d+:d+)\nValue TIMEZONE (S+)\nValue DAYWEEK (w+)\nValue MONTH (w+)\nValue DAY (d+)\nValue YEAR (d+)\n\nStart\n ^${DAYWEEK}s+${MONTH}s+${DAY}s+${TIME}s+${YEAR}\n ^[t|T]imezone(:|sis)s+${TIMEZONE} -> Record\n",
35 "data": "Mon Jan 14 18:42:49 2013\ntimezone is US/Central",
36 "type": "textfsm",
37 "_id": "string",
38 "namespace": {
39 "type": null,
40 "_id": {},
41 "name": "Juniper JUNOS"
42 },
43 "createdBy": "string",
44 "created": "2019-11-25T22:51:39.201Z",
45 "lastUpdatedBy": "string",
46 "lastUpdated": "2019-11-25T22:51:39.201Z",
47 "version": 1,
48 "tags": [
49 {
50 "_id": "string",
51 "name": "string"
52 }
53 ]
54 },
55 "edit": "string",
56 "success": true
57 }
58 ]
59}
Imports a new template document.
Was this page helpful?
Previous

Import a new workflow document

Next
Built with

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Request

request body
templateslist of anyOptional

Array of template documents to import. If ‘_id’ is provided, it will be replaced with an autogenerated ‘_id’. If a template’s name is already used in the templates collection, it will be renamed with a numeric suffix.

Response

Results from each individual import operation.
importedlist of objects

Errors

500
Internal Server Error