---
title: "安装agent"
method: POST
path: "/api/v2/agent/install/installCmd"
tags: ["agent"]
---

# 安装agent

`POST /api/v2/agent/install/installCmd`

install agent by cmd

## Query parameters

- `type` string, required
- `clusterId` string, required
- `role` string, required

## Response `200`

curl -s 'http://172.16.82.176:8889/api/v1/deploy/sidecar/install/shell?TargetPath=/opt/dtstack/easymanager/easyagent&CallBack=aHR0cDovLzE3Mi4xNi44Mi4xNzY6ODg2NC9hcGkvdjIvYWdlbnQvaW5zdGFsbC9jYWxsYmFjaz9haWQ9LTE=&Type=hosts&ClusterId=1&Roles=Etcd,Control,Worker' | sh

- string

---

[API](https://skmtc.dev/dtstack/apis/maxtrix.md) · [All operations](https://skmtc.dev/dtstack/apis/maxtrix/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dtstack/maxtrix/revisions/c389ef3ba143/schema)
