All Products
Search
Document Center

Energy Expert:GetOrgAndFactory

Last Updated:Dec 01, 2025

Queries the organizations and sites that are activated for an account. Sites that are not activated in the console are excluded from the response.

Operation description

  • The operation returns information about the organizations and sites if activated sites exist. Otherwise, the operation returns an empty value.

  • The only supported endpoint is energyexpertexternal.cn-hangzhou.aliyuncs.com for the China (Hangzhou) region.

  • To use this API operation, you must be added to the whitelist. To request access, or contact us.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

energy:GetOrgAndFactory

list

*All Resource

*

None None

Request syntax

GET /api/external/getOrgAndFactory HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

This operation has no request parameters. It directly queries information about activated sites associated with the account.

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

83A5A7DD-8974-5769-952E-590A97BEA34E

data

array<object>

The returned data.

array<object>

The results of the operation.

aliyunPk

string

The ID of the Alibaba Cloud account.

1319XXXXXX64960

organizationId

string

The ID of the organization.

6265f42XXXX2fec150

organizationName

string

The name of the organization.

乐迪工业园

factoryList

array<object>

The list of site information.

object

List of information

factoryId

string

The ID of the site.

pn_95

factoryName

string

The name of the site.

乐迪工业园1

httpCode

integer

The HTTP status code.

200

code

string

The return code.

Success

success

boolean

Indicates whether the request was successful.

true

Examples

Success response

JSON format

{
  "requestId": "83A5A7DD-8974-5769-952E-590A97BEA34E",
  "data": [
    {
      "aliyunPk": "1319XXXXXX64960",
      "organizationId": "6265f42XXXX2fec150",
      "organizationName": "乐迪工业园",
      "factoryList": [
        {
          "factoryId": "pn_95",
          "factoryName": "乐迪工业园1"
        }
      ]
    }
  ],
  "httpCode": 200,
  "code": "Success",
  "success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 invalidParameter Invalid parameter values. Request parameters are incorrect. Please check method entry parameters.
401 notAuthorized No permissions to call API operations. No permissions to call API operations.
500 systemError System error. System error.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.