> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ridergy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出组织范围的上限配置文件

> 列出调用方租户的所有组织级限额配置文件，并附带计算后的
状态。

> **尚未启用强制执行**——参见 `POST /organizations/schedules`。




## OpenAPI

````yaml /api-reference/energy-management/openapi.zh.yaml GET /organizations/limits
openapi: 3.1.0
info:
  title: RiDERgy Energy Management API
  version: '1.0'
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
  description: |
    对位置、单个充电桩、组织以及跨位置集群的充电功率限制进行程序化控制。

    ## 身份验证
    除 `GET /health` 外，所有接口都需要 `x-api-key` 请求头。该密钥
    决定了您的租户——租户信息永远不会从请求体或其他任何
    请求头中读取，因此一个租户的密钥无法访问另一个租户的数据。

    您的租户必须已启用 Energy Management API 功能，否则
    请求会返回 `403 FEATURE_NOT_ENABLED` 错误。请联系 RiDERgy 以启用该功能。

    ## 优先级模型
    位置和充电桩的限制通过**带优先级时间窗口的配置文件（profile）**进行控制：

    - 优先级范围为 **0（最低）到 10（最高）**，与 OCPP 协议栈风格一致。
    - 一个目标对象（位置或充电桩连接器）最多可以拥有 11 个配置文件，每个
      优先级一个，每个配置文件都有自己的 `[startTime, endTime)` 时间窗口。
    - 在任意时刻，**生效限制**为当前处于激活状态的配置文件中
      优先级最高者的 `limitKw`。
    - 如果没有配置文件处于激活状态，位置会回退到其 `permanentLimitKw`。
    - 在某个目标对象的某个优先级上已存在配置文件时，再次提交该优先级的配置文件
      将**替换**原有配置文件。
    - 配置文件会在其 `startTime`/`endTime` 自动应用并撤销——配置文件创建后
      无需进行额外的 API 调用。配置文件记录永远不会被删除，因此历史记录
      始终可查询。

    ## 错误
    所有错误均采用以下结构：

    ```json
    {
      "error": {
        "code": "LOCATION_NOT_FOUND",
        "message": "Location 123 was not found for the provided tenant",
        "requestId": "b1f6e6b0-..."
      }
    }
    ```
servers:
  - url: https://api.ridergy.com/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Health
    description: 无需身份验证的服务健康检查。
  - name: Locations
    description: 读取并设置位置级别的功率限制和优先级配置文件。
  - name: Chargers
    description: 在指定时间窗口内将单个充电桩连接器锁定为固定功率限制。
  - name: Organizations
    description: 租户范围内的总量限额配置文件（仅记录——尚未启用强制执行）。
  - name: Clusters
    description: 将多个位置归入一个共享 kW 上限的集群，并对其应用调度计划。
paths:
  /organizations/limits:
    get:
      tags:
        - Organizations
      summary: List organization-wide cap profiles
      description: |
        列出调用方租户的所有组织级限额配置文件，并附带计算后的
        状态。

        > **尚未启用强制执行**——参见 `POST /organizations/schedules`。
      operationId: getOrganizationLimits
      responses:
        '200':
          description: 组织限额配置文件
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgLimitsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/FeatureNotEnabled'
components:
  schemas:
    OrgLimitsResponse:
      type: object
      properties:
        tenantUuid:
          type: string
        profiles:
          type: array
          items:
            $ref: '#/components/schemas/OrgProfileEntry'
        note:
          type: string
          example: >-
            Organization-wide cap enforcement is not yet active; this profile is
            recorded for future use.
    OrgProfileEntry:
      type: object
      properties:
        priority:
          type: integer
          example: 5
        limitKw:
          type: number
          example: 500
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/ProfileStatus'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: LOCATION_NOT_FOUND
            message:
              type: string
              example: Location 123 was not found for the provided tenant
            requestId:
              type: string
              format: uuid
    ProfileStatus:
      type: string
      enum:
        - SCHEDULED
        - ACTIVE
        - EXPIRED
  responses:
    Unauthorized:
      description: 缺少 API 密钥，或密钥无效/已过期
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorized:
              value:
                error:
                  code: UNAUTHORIZED
                  message: Invalid or inactive API key
                  requestId: b1f6e6b0-1234-4abc-9def-000000000000
    FeatureNotEnabled:
      description: 该租户未启用 Energy Management API
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            featureNotEnabled:
              value:
                error:
                  code: FEATURE_NOT_ENABLED
                  message: >-
                    The Energy Management API is not enabled for your account.
                    Contact RiDERgy to enable this feature.
                  requestId: b1f6e6b0-1234-4abc-9def-000000000000
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 按租户分配的 API 密钥。租户信息从密钥中获取——绝不来自请求本身。

````