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
        • POSTCreate a command template
        • POSTCreate an analytic template
        • POSTDelete a command template
        • POSTDelete an analytic template
        • POSTExport template
        • POSTFind the diff of two config strings
        • GETGet a command template by name
        • GETGet all analytic templates
        • GETGet all command templates
        • GETGet an analytic template by name
        • POSTGet filtered devices
        • GETGet filtered devices
        • GETGet filtered devices with detailed query results
        • POSTImport template
        • POSTMOP diff array
        • POSTMOP get boot flash
        • POSTMOP passthrough
        • POSTRetry a task automatically
        • POSTRun a command against a device
        • POSTRun a command against devices
        • POSTRun an analytics template
        • POSTRun an analytics template for devices
        • POSTRun command template
        • POSTRun single command from template
        • POSTUpdate a command template
        • POSTUpdate an analytic template
LogoLogo
Open sourceSupportFAQsDocs Home
ReferenceMop

Create an analytic template

POST
http://localhost:3000/mop/createAnalyticTemplate
POST
/mop/createAnalyticTemplate
$curl -X POST http://localhost:3000/mop/createAnalyticTemplate \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{}'
1{
2 "result": {
3 "n": 1,
4 "ok": 1
5 },
6 "ops": [
7 {
8 "name": "ASR1K-MOP",
9 "_id": "ASR1K-MOP",
10 "description": "Example description",
11 "namespace": null,
12 "os": "cisco-ios",
13 "passRule": true,
14 "prepostCommands": [
15 {
16 "preRawCommand": "show running-config ip prefix-list",
17 "postRawCommand": "show running-config ip prefix-list",
18 "passRule": true,
19 "rules": [
20 {
21 "type": "regex",
22 "preRegex": "",
23 "postRegex": "",
24 "evaluation": "="
25 }
26 ],
27 "preCommandResHTML": "Test a command or the template to get results here",
28 "postCommandResHTML": "Test a command or the template to get results here"
29 }
30 ],
31 "created": 1508182880981,
32 "createdBy": "exampleUser",
33 "lastUpdated": 1508182880981,
34 "lastUpdatedBy": "exampleUser"
35 }
36 ],
37 "insertedCount": 1,
38 "insertedIds": {
39 "0": "TestAnalysisTemp"
40 }
41}
Creates an Analytic Template.
Was this page helpful?
Previous

Delete a command template

Next
Built with

Authentication

AuthorizationBasic

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

Request

request body
templateobjectOptional
A mop analytic template object

Response

Result of the creation.
resultobject
opslist of objects
insertedCountinteger
insertedIdsobject

Errors

500
Internal Server Error