> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST (/ext/unattendedsetup/quickaction)

> POST (/ext/unattendedsetup/quickaction)

# POST (/ext/unattendedsetup/quickaction)

更改分配给某个正面板按钮的脚本，或在目标 XBOX One 开发主机上运行某个正面板脚本。

* [URI 参数](#ID4EX)
* [必需的请求标头](#ID4E5)
* [必需的请求正文](#ID4EFB)
* [可选请求正文](#ID4EZB)
* [响应](#ID4EMB)

## URI 参数

| 参数 | 类型 | 说明 |
| - | - | - |
| ButtonNumber | number | 我们要处理的正面板按钮的可选编号。如果未提供此参数，则表示这是向主机添加新自定义脚本的请求。 |
| Name | base64 编码的字符串 | 可选字符串，指示我们要应用于按钮的脚本名称。如果未提供，则改为运行与 ButtonNumber 关联的当前脚本。 |
| IsBuiltIn | 布尔值 | 可选布尔值，指示我们要应用的脚本是否为系统提供的内置脚本，或者是用户之前添加到主机的自定义脚本。 |

## 必需的请求标头

无。

## 必需的请求正文

无。

## 可选请求正文

如果未提供 ButtonNumber，则调用需要一个符合多部分格式的 HTTP 正文，其中包含要添加到主机的脚本文件。

## 响应

如果调用成功且请求是运行与按钮关联的操作，服务将返回一个具有以下成员的 JSON 对象：

| 成员 | 类型 | 说明 |
| - | - | - |
| Output | string | 运行与所请求按钮关联的脚本的输出。 |

如果调用是将脚本应用于按钮或添加新的自定义脚本，则没有响应正文。

### HTTP 状态代码

服务针对使用此方法对此资源发出的请求返回本节中的一个状态代码。

| 代码 | 说明 |
| - | - |
| 200/204 | 操作成功。 |
| 4XX | 错误代码。 |
| 5XX | 错误代码。 |

## 另请参阅

##### 父级

[/ext/unattendedsetup/quickaction](https://docs.xbox.com/zh-CN/reference/deviceportal/unattendedsetup/uri-extunattendedsetupquickaction.md)


## Related topics

- [/ext/unattendedsetup/quickaction（API 内容）](https://docs.xbox.com/zh-CN/reference/deviceportal/unattendedsetup/uri-extunattendedsetupquickaction.md)
- [GET (/ext/unattendedsetup/quickaction)](https://docs.xbox.com/zh-CN/reference/deviceportal/unattendedsetup/uri-extunattendedsetupquickaction-get.md)
- [POST (/ext/unattendedsetup/test)](https://docs.xbox.com/zh-CN/reference/deviceportal/unattendedsetup/uri-extunattendedsetuptest-post.md)
- [POST (/ext/unattendedsetup/apply)](https://docs.xbox.com/zh-CN/reference/deviceportal/unattendedsetup/uri-extunattendedsetupapply-post.md)
- [POST (/ext/unattendedsetup/configure)](https://docs.xbox.com/zh-CN/reference/deviceportal/unattendedsetup/uri-extunattendedsetupconfigure-post.md)
