你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Organizations - Create
在应用程序中创建组织
PUT https://{subdomain}.{baseDomain}/api/organizations/{organizationId}?api-version=2022-07-31
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
base
|
path | True |
string |
所有 Azure IoT Central 服务请求的基域。 |
organization
|
path | True |
string |
组织的唯一 ID。 Regex pattern: |
subdomain
|
path | True |
string |
应用程序子域。 |
api-version
|
query | True |
string |
正在调用的 API 的版本。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
displayName |
string |
组织的显示名称。 |
parent |
string |
组织父级的 ID。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功 |
|
Other Status Codes |
从 IoT Central 服务收到的错误响应。 Headers x-ms-error-code: string |
安全性
azure_auth
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Add or update organization
Sample Request
PUT https://appsubdomain.azureiotcentral.com/api/organizations/seattle?api-version=2022-07-31
{
"displayName": "Seattle",
"parent": "washington"
}
Sample Response
{
"id": "seattle",
"displayName": "Seattle",
"parent": "washington"
}
定义
名称 | 说明 |
---|---|
Error |
响应错误定义。 |
Error |
错误的详细信息。 |
Organization |
组织定义。 |
Error
响应错误定义。
名称 | 类型 | 说明 |
---|---|---|
error |
当前请求的错误详细信息。 |
ErrorDetails
错误的详细信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
message |
string |
错误消息详细信息。 |
requestId |
string |
当前请求的相关 ID。 |
time |
string |
错误请求失败的时间。 |
Organization
组织定义。
名称 | 类型 | 说明 |
---|---|---|
displayName |
string |
组织的显示名称。 |
id |
string |
组织的唯一 ID。 |
parent |
string |
组织父级的 ID。 |