调用ListDepartments获取部门列表
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListDepartments |
系统规定参数。取值:ListDepartments。 |
Name | String | 否 | 部门名称 |
部门名称 |
PageIndex | Integer | 否 | 1 |
页码 |
PageSize | Integer | 否 | 10 |
页大小 |
UserId | String | 否 | 59b0bbfe-929b-4a8c-9833-3ce70b4bad38 |
用户id |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Code | String | OK | |
Data | Struct |
– |
|
Items | Array of Items |
数据项 |
|
Administrators | Array of Administrators |
管理员列表 |
|
Id | String | 59b0bbfe-929b-4a8c-9833-3ce70b4bad38 |
用户id |
Name | String | user |
用户姓名 |
CreatedAt | String | 2020-07-14T14:01:41.000+08:00 |
创建日期 |
Description | String | 描述 |
描述 |
Id | String | 59b0bbfe-929b-4a8c-9833-3ce70b4bad38 |
id |
Name | String | 名称 |
名称 |
UpdatedAt | String | 2020-07-14T14:01:41.000+08:00 |
更新日期 |
TotalElements | Long | 1 |
总条目数 |
TotalPages | Integer | 11 |
总页数 |
Message | String | – | |
RequestId | String | 59b0bbfe-929b-4a8c-9833-3ce70b4bad38 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListDepartments
&<公共请求参数>
正常返回示例
XML
格式
<Message>-</Message>
<RequestId>59b0bbfe-929b-4a8c-9833-3ce70b4bad38</RequestId>
<Data>
<TotalElements>1</TotalElements>
<TotalPages>11</TotalPages>
<Items>
<Description>描述</Description>
<CreatedAt>2020-07-14T14:01:41.000+08:00</CreatedAt>
<Id>59b0bbfe-929b-4a8c-9833-3ce70b4bad38</Id>
<UpdatedAt>2020-07-14T14:01:41.000+08:00</UpdatedAt>
<Name>名称</Name>
</Items>
<Items>
<Administrators>
<Id>59b0bbfe-929b-4a8c-9833-3ce70b4bad38</Id>
<Name>user</Name>
</Administrators>
</Items>
</Data>
<Code>OK</Code>
JSON
格式
{
"Message": "-",
"RequestId": "59b0bbfe-929b-4a8c-9833-3ce70b4bad38",
"Data": {
"TotalElements": 1,
"TotalPages": 11,
"Items": [
{
"Description": "描述",
"CreatedAt": "2020-07-14T14:01:41.000+08:00",
"Id": "59b0bbfe-929b-4a8c-9833-3ce70b4bad38",
"UpdatedAt": "2020-07-14T14:01:41.000+08:00",
"Name": "名称"
},
{
"Administrators": {
"Id": "59b0bbfe-929b-4a8c-9833-3ce70b4bad38",
"Name": "user"
}
}
]
},
"Code": "OK"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | Forbidden | Access to this resource on the server is denied. | 没有权限访问该资源 |
500 | InternalServerError | An internal server error occurred. | 服务器内部出错 |
400 | InvalidRequest | The request is invalid. | 无效的请求 |
404 | ResourceNotFound | The specified resource does not exist. | 找不到指定的资源 |
401 | Unauthorized | The request requires user authentication. | 该请求需要进行身份认证 |
访问错误中心查看更多错误码。
访问错误中心查看更多错误码。