---
title: "POST /api/v1/scripts/run"
method: POST
path: "/api/v1/scripts/run"
tags: ["Scripts"]
---

# POST /api/v1/scripts/run

`POST /api/v1/scripts/run`

## Request

- Base URL: `https://api.immy.bot` (the document declares no server; this is the origin it was published from)
- URL: `https://api.immy.bot/api/v1/scripts/run`
- Auth: none declared

## Request body

- RunScriptRequestBody
  - `script` RunScriptRequestBodyScript, required
    - `id` integer, required
    - `name` string, nullable, required
    - `action` string, nullable, required
    - `databaseType` 'Global' | 'Local', required: The string or integer value may be used. Global = 0, Local = 1
    - `filterScriptMode` 'Legacy' | 'Optimized', required: The string or integer value may be used. Legacy = 0, Optimized = 1
    - `outputType` 'Object' | 'Table', required: The string or integer value may be used. Object = 0, Table = 1
    - `scriptCategory` 'SoftwareDetection' | 'SoftwareVersionAction' | 'MaintenanceTaskSetter' | 'MetascriptDeploymentTarget' | 'FilterScriptDeploymentTarget' | 'DeviceInventory' | 'Function' | 'ImmySystem' | 'DynamicVersions' | 'DownloadInstaller' | 'Module' | 'Preflight' | 'Integration', required: The string or integer value may be used. SoftwareDetection = 0, SoftwareVersionAction = 2, MaintenanceTaskSetter = 3, MetascriptDeploymentTarget = 4, FilterScriptDeploymentTarget = 5, DeviceInventory = 6, Function = 7, ImmySystem = 8, DynamicVersions = 9, DownloadInstaller = 10, Module = 11, Preflight = 12, Integration = 13
    - `scriptLanguage` 'CommandLine' | 'PowerShell', required: The string or integer value may be used. CommandLine = 1, PowerShell = 2
    - `scriptExecutionContext` 'System' | 'CurrentUser' | 'Metascript' | 'CloudScript', required: The string or integer value may be used. System = 0, CurrentUser = 1, Metascript = 2, CloudScript = 4
    - `timeout` integer, nullable
    - `parameterOverrides` object, nullable, required
    - `variables` object, nullable, required
  - `cancellationId` string, uuid
  - `terminalId` string, uuid, nullable
  - `maintenanceSessionId` integer, nullable
  - `maintenanceActionId` integer, nullable
  - `sessionLogId` integer, nullable
  - `computerId` integer, nullable
  - `tenantId` integer, nullable
  - `maintenanceTaskId` integer, nullable
  - `maintenanceTaskType` 'Global' | 'Local': The string or integer value may be used. Global = 0, Local = 1
  - `agentConnectionWaitTimeoutSeconds` integer, nullable

## Response `200`

OK

---

[API](https://skmtc.dev/immy/apis/immy-bot-api-2.md) · [All operations](https://skmtc.dev/immy/apis/immy-bot-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/immy/apis/immy-bot-api-2/revisions/75b50268fa51?raw)
