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

Run single command from template

POST
http://localhost:3000/mop/RunCommandTemplateSingleCommand
POST
/mop/RunCommandTemplateSingleCommand
$curl -X POST http://localhost:3000/mop/RunCommandTemplateSingleCommand \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{}'
1{
2 "raw": "show version",
3 "all_pass_flag": true,
4 "evaluated": "show version",
5 "parameters": {},
6 "rules": [
7 {
8 "rule": "show version",
9 "eval": "contains",
10 "raw": "show version",
11 "result": true
12 }
13 ],
14 "device": "Nokia SR-OS",
15 "response": "version: 10.0.0",
16 "result": true
17}
Runs a single command from a template on a devices.
Was this page helpful?
Previous

Update a command template

Next
Built with

Authentication

AuthorizationBasic

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

Request

request body
templateIdstringOptional
commandIndexintegerOptional
variablesobjectOptional
deviceslist of stringsOptional

Response

Result of the Command Template run.
rawstring
all_pass_flagboolean
evaluatedstring
parametersobject
ruleslist of objects
devicestring
responsestring
resultboolean

Errors

500
Internal Server Error