
# 查询组织列表接口
#### 场景描述
查询组织列表。
#### 接口方法
GET
#### 接口URL
https://域名/apiaccess/CC-Management/openapi/queryorgs?offset=0\&limit=100\&orgType=D\&status=1，例如域名是service.besclouds.com
#### 请求说明
表1查询参数 
| 序号 | 名称      | 参数类型   | 是否必选  | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|:---|:---|
| 1  | status  | String | False | 组织状态。 - 1：激活  - 2：停用  - 3：禁用  - all：查询所有组织   当不填写时，默认查询非禁用态的组织信息。                                                                                                                                                                                                |
| 2  | orgType | String | False | 组织类型。 - P：合作伙伴  - C：渠道  - D：部门  - T：团队  - O：其他   |
| 3  | offset  | Int    | False | 查询偏移量。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 4  | limit   | Int    | False | 每页查询可访问组织数量。 取值范围\[0,999\]，不配置值为100。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
   
表2请求头参数 
| 序号 | 名称            | 参数类型   | 是否必选 | 说明                                                            |
|:---|:---|:---|:---|:---|
| 1  | X-APP-Key     | string | True | appKey字段，用户标识                                                 |
| 2  | Authorization | string | True | 鉴权字段，内容格式为: Bearer +tokenByAKSK接口的返回值中AccessToken（Bearer后有空格） |
   
#### 响应说明
- **响应状态码: 200**
  表3响应体参数 
  | 序号  | 名称          | 参数类型   | 是否必选 | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
  |:---|:---|:---|:---|:---|
  | 1   | orgs        | Object | True | 查询结果列表。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | 1.1 | orgId       | String | True | 组织ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | 1.2 | orgCode     | String | True | 组织编码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | 1.3 | orgName     | String | True | 组织名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | 1.4 | parentOrgId | Int    | True | 父组织ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | 1.5 | orgType     | String | True | 组织类型。 - P：合作伙伴  - C：渠道  - D：部门  - T：团队  - O：其他   |
  | 1.6 | description | String | True | 组织描述。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | 2   | total       | Int    | True | 组织总数。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | 3   | returnCode  | String | True | 响应码。 - 0：成功  - -1：失败。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  | 4   | description | String | True | 响应结果描述。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
     
  

- **响应状态码: 400**
  错误的请求：请检查请求路径及参数。
  
- **响应状态码: 401**
  未授权：1.请确认是否购买了相关服务。2.请联系客服人员检查您账号的当前状态。
  
- **响应状态码: 404**
  请求的内容未找到：请检查请求的路径。
  
- **响应状态码: 500**
  业务失败：请依次确认您请求中各参数的取值。
  
 
#### 报文样例
请求头:
```
x-app-key:9******************************3  
Authorization:Bearer e******************************e  
Content-Type:application/json
```
响应参数:
```
{
    "orgs": [
        {
            "orgId": "1743229000370058604",
            "orgCode": "1013693697055-D3C",
            "orgName": "默认组织",
            "parentOrgId": null,
            "orgType": "D",
            "description": null
        },
        {
            "orgId": "1743411069067247710",
            "orgCode": "1013693697055-D3C7Ui",
            "orgName": "AAA",
            "parentOrgId": "1743229000370058604",
            "orgType": "D",
            "description": ""
        },
        {
            "orgId": "1743411075283007941",
            "orgCode": "1013693697055-D3C1JX",
            "orgName": "BBB",
            "parentOrgId": "1743229000370058604",
            "orgType": "D",
            "description": ""
        },
        {
            "orgId": "1743585653682750400",
            "orgCode": "1013693697055-D3CJRX",
            "orgName": "test1",
            "parentOrgId": "1743229000370058604",
            "orgType": "D",
            "description": ""
        },
        {
            "orgId": "1743585660020155612",
            "orgCode": "1013693697055-D3CJRXx15",
            "orgName": "test11",
            "parentOrgId": "1743585653682750400",
            "orgType": "D",
            "description": ""
        },
        {
            "orgId": "1743590013893503714",
            "orgCode": "1013693697055-D3CIBc",
            "orgName": "test0",
            "parentOrgId": "1743229000370058604",
            "orgType": "D",
            "description": ""
        },
        {
            "orgId": "1743590021250053742",
            "orgCode": "1013693697055-D3CIBcqfc",
            "orgName": "test1",
            "parentOrgId": "1743590013893503714",
            "orgType": "D",
            "description": ""
        },
        {
            "orgId": "1743590027646996708",
            "orgCode": "1013693697055-D3CIBcqfcW2E",
            "orgName": "test11",
            "parentOrgId": "1743590021250053742",
            "orgType": "D",
            "description": ""
        }
    ],
    "total": 8,
    "returnCode": "0",
    "description": null
}
```
