> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/release-notes/cloudeka-api/ai-rafay/execute-an-action-on-a-virtual-machine-instance.md).

# Execute an action on a virtual machine instance

```json
{"openapi":"3.1.1","info":{"title":"Cloudeka AI - API Documentation","version":"1.0.0"},"tags":[{"name":"AI Rafay","description":"API endpoints for AI Rafay (base: /rafay)"}],"servers":[{"url":"https://ai.cloudeka.id/"}],"paths":{"/rafay/v1/virtualmachine/instance/action":{"post":{"tags":["AI Rafay","Virtual Machine"],"summary":"Execute an action on a virtual machine instance","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai_rafay__response.Response"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai_rafay__response.Response"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai_rafay__response.Response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai_rafay__request.RafayVirtualMachineAction"}}},"description":"Request body","required":true}}}},"components":{"schemas":{"ai_rafay__response.Response":{"type":"object","properties":{"data":{},"error":{},"message":{"type":"string"},"upstream":{}}},"ai_rafay__request.RafayVirtualMachineAction":{"type":"object","required":["action","name","project_id"],"properties":{"action":{"type":"string"},"action_value":{"type":"string"},"action_variable":{"type":"string"},"name":{"type":"string"},"project_id":{"type":"string"}}}}}}
```
