---
title: "为node添加label"
method: POST
path: "/v2/nodes/{node}/label"
tags: ["v2"]
---

# 为node添加label

`POST /v2/nodes/{node}/label`

## Request

- The document declares no server URL.
- Auth: none declared

add label to node

## Path parameters

- `node` string, required

## Request body

- object
  - `labels` string[], required: label值列表 in: body

## Response `200`

{"code":200,"msg":"success","msgcn":"成功","body":nil}

## Changes

- **2017-11-07** `5e3ca7f5dfc5`: 1 info
  - api operation id `AddLabel` removed and replaced with `labels`
- **2017-11-07** `7b547fba71aa`: 1 info
  - api operation id `labels` removed and replaced with `AddLabel`

[Operation history](https://skmtc.dev/goodrain/apis/goodrain-cmd-api/changes/v2/nodes/:node/label/post.md)

---

[API](https://skmtc.dev/goodrain/apis/goodrain-cmd-api.md) - [All operations](https://skmtc.dev/goodrain/apis/goodrain-cmd-api/llms.txt) - [OpenAPI document](https://skmtc.dev/goodrain/apis/goodrain-cmd-api/revisions/8c773e222448?raw)
