---
title: "Run a command against devices"
method: POST
path: "/mop/RunCommandDevices"
tags: ["MOP"]
---

# Run a command against devices

`POST /mop/RunCommandDevices`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/mop/RunCommandDevices`
- Auth: none declared

Runs a command against devices.

## Request body

- object
  - `command` string
  - `variables` MopMopTemplateDocVariables
  - `devices` string[]

## Response `200`

Result of the command run.

- MopMopTemplateDocRunCommandRes[]
  - `raw` string
  - `all_pass_flag` boolean
  - `evaluated` string
  - `parameters` MopMopTemplateDocRunCommandResParameters
  - `rules` MopMopTemplateDocRunCommandResRulesItems[]
    - `rule` string, required
    - `eval` string, required
    - `raw` string
    - `result` boolean
  - `device` string
  - `response` string
  - `result` boolean

## Other responses

- `500`: Error response from API

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
