Updated on 2025-11-13 GMT+08:00

Interface for Querying the Organization List

Scenario Description

Querying the organization list.

Interface Method

GET

Interface URL

https://domain name/apiaccess/CC-Management/openapi/queryorgs?offset=0&limit=100&orgType=D&status=1. For example, service.besclouds.com

Request Description

Table 1 Query parameters

No.

Parameter

Parameter Type

Mandatory or Not

Description

1

status

String

False

Organization status.

  • 1: activated
  • 2: disabled
  • 3: prohibited
  • all: Query all organizations.

If this parameter is not specified, information about organizations that are not prohibited is queried by default.

2

orgType

String

False

Organization type.

  • P: partner
  • C: channel
  • D: department
  • T: team
  • O: others

3

offset

Int

False

Offset query.

4

limit

Int

False

Number of accessible organizations that can be queried on each page.

The value is [0,999]. If this parameter is not set, the value is 100.

Table 2 Request header parameters

No.

Parameter

Parameter Type

Mandatory or Not

Description

1

X-APP-Key

string

True

appKey field, which is the user ID

2

Authorization

string

True

Authentication field. The format is Bearer (space){Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

Response Description

  • Status code: 200
    Table 3 Response body parameters

    No.

    Parameter

    Parameter Type

    Mandatory or Not

    Description

    1

    orgs

    Object

    True

    Query result list.

    1.1

    orgId

    String

    True

    Organization ID.

    1.2

    orgCode

    String

    True

    Organization code.

    1.3

    orgName

    String

    True

    Organization name.

    1.4

    parentOrgId

    Int

    True

    Parent organization ID.

    1.5

    orgType

    String

    True

    Organization type.

    • P: partner
    • C: channel
    • D: department
    • T: team
    • O: others

    1.6

    description

    String

    True

    Organization description.

    2

    total

    Int

    True

    Total number of organizations.

    3

    returnCode

    String

    True

    Response code.

    • 0: success
    • -1: failed.

    4

    description

    String

    True

    Response result description.

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Message Example

Request header:

x-app-key:9******************************3  
Authorization:Bearer e******************************e  
Content-Type:application/json

Response parameters:

{
    "orgs": [
        {
            "orgId": "1743229000370058604",
            "orgCode": "1013693697055-D3C",
            "orgName": "default organization",
            "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
}