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

# Run a command against a device

`POST /mop/RunCommand`

## Request

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

Runs a command against a device.

## Request body

- object
  - `command` string
  - `variables` MopMopTemplateDocVariables
  - `device` 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)
