Aqara Studio API

Studio statistics query API

Operations 1

GET /studio/statistics Get Studio Statistics #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/aqara:aqara-studio-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

aqara-studio-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Aqara Studio API
  version: v1
  termsOfService: https://domain.com/terms
  x-internal: true
  description: 'Operations tagged Studio across 2 of this provider''s published API definitions: data-export-api-en.yaml, data-export-api-zh.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: '{host}/open/api/v1'
  description: Data Export API endpoint
  variables:
    host:
      description: 'Please enter your Aqara Studio service address. This can be a local LAN address (http) or a remote access address (https).

        For example:

        - http://10.11.50.56

        - https://xxx.edge-xxx.aqara.com/

        '
      default: <Aqara_Studio_URL>
security:
- BearerAuth: []
tags:
- name: Studio
  description: Studio statistics query API
paths:
  /studio/statistics:
    get:
      tags:
      - Studio
      summary: Get Studio Statistics
      description: Get Studio statistics, such as the number of devices, automations, spaces, scenes, etc.
      operationId: getStudioStatistics
      x-skill-intent: studio.statistics.get
      x-idempotent: true
      x-retryable: true
      x-side-effects: none
      parameters:
      - name: dimensions
        in: query
        description: 'List of statistical dimensions. Supported values: deviceCount (number of devices), linkageCount (number of automations), spaceCount (number of spaces), sceneCount (number of scenes). Example URL: dimensions=deviceCount,linkageCount,spaceCount,sceneCount or dimensions=deviceCount&dimensions=linkageCount'
        required: true
        schema:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/StudioStatisticsDimension'
        style: form
        explode: true
        example:
        - deviceCount
        - linkageCount
        - spaceCount
        - sceneCount
      responses:
        '200':
          description: Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StudioStatisticsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
    servers:
    - url: '{host}/open/api/v1'
      description: Data Export API endpoint
      variables:
        host:
          description: 'Please enter your Aqara Studio service address. This can be a local LAN address (http) or a remote access address (https).

            For example:

            - http://10.11.50.56

            - https://xxx.edge-xxx.aqara.com/

            '
          default: <Aqara_Studio_URL>
components:
  schemas:
    ErrorResponse:
      description: Error response. Read code and message for details.
      allOf:
      - $ref: '#/components/schemas/BaseResponse'
    BaseResponse:
      type: object
      required:
      - type
      - version
      - msgId
      - code
      properties:
        type:
          type: string
          description: Message type
        version:
          type: string
          description: API version
          example: v1
        msgId:
          type: string
          description: Message ID
        code:
          type: integer
          description: Business status code, 0 indicates success
        message:
          type: string
          description: Message
    StudioStatisticsData:
      type: object
      description: Studio statistics; returns only the statistical fields requested in dimensions
      properties:
        deviceCount:
          type: integer
          description: Number of devices
          example: 128
        linkageCount:
          type: integer
          description: Number of automations
          example: 24
        spaceCount:
          type: integer
          description: Number of spaces
          example: 16
        sceneCount:
          type: integer
          description: Number of scenes
          example: 12
    StudioStatisticsResponse:
      allOf:
      - $ref: '#/components/schemas/BaseResponse'
      - type: object
        properties:
          data:
            $ref: '#/components/schemas/StudioStatisticsData'
      example:
        type: StudioStatisticsResponse
        version: v1
        msgId: a1b2c3d4-e5f6-7890-abcd-000000000021
        code: 0
        message: success
        data:
          deviceCount: 128
          linkageCount: 24
          spaceCount: 16
          sceneCount: 12
    StudioStatisticsDimension:
      type: string
      description: Studio statistics dimension
      enum:
      - deviceCount
      - linkageCount
      - spaceCount
      - sceneCount
    ErrorResponse_2:
      description: 错误响应,错误信息通过 code 与 message 提供
      allOf:
      - $ref: '#/components/schemas/BaseResponse_2'
    BaseResponse_2:
      type: object
      required:
      - type
      - version
      - msgId
      - code
      properties:
        type:
          type: string
          description: 消息类型
        version:
          type: string
          description: 接口版本
          example: v1
        msgId:
          type: string
          description: 消息 ID
        code:
          type: integer
          description: 业务状态码,0 表示成功
        message:
          type: string
          description: 提示信息
    StudioStatisticsData_2:
      type: object
      description: Studio 统计信息;仅返回 dimensions 请求的统计字段
      properties:
        deviceCount:
          type: integer
          description: 设备数量
          example: 128
        linkageCount:
          type: integer
          description: 自动化数量
          example: 24
        spaceCount:
          type: integer
          description: 空间数量
          example: 16
        sceneCount:
          type: integer
          description: 场景数量
          example: 12
    StudioStatisticsDimension_2:
      type: string
      description: Studio 统计维度
      enum:
      - deviceCount
      - linkageCount
      - spaceCount
      - sceneCount
  responses:
    InternalServerErrorResponse:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000006
              code: 500
              message: Internal server error
    UnauthorizedResponse:
      description: Unauthorized or authentication expired
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000002
              code: 401
              message: Token expired. Please generate a new token
    TooManyRequestsResponse:
      description: Request frequency too high
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000005
              code: 429
              message: Request frequency too high
    NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000004
              code: 404
              message: Resource not found
    ForbiddenResponse:
      description: No permission to access
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000003
              code: 403
              message: No permission to access this resource
    BadRequestResponse:
      description: Request parameter error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000001
              code: 400
              message: Parameter xxx is required
    InternalServerErrorResponse_2:
      description: 服务内部错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse_2'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000006
              code: 500
              message: 服务内部异常
    UnauthorizedResponse_2:
      description: 未认证或认证失效
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse_2'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000002
              code: 401
              message: token 已过期,请重新生成 token
    TooManyRequestsResponse_2:
      description: 请求频率过高
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse_2'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000005
              code: 429
              message: 请求频率过高
    NotFoundResponse_2:
      description: 资源不存在
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse_2'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000004
              code: 404
              message: 资源不存在
    ForbiddenResponse_2:
      description: 无权限访问
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse_2'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000003
              code: 403
              message: 无权限访问该资源
    BadRequestResponse_2:
      description: 请求参数错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse_2'
            example:
              type: ErrorMessage
              version: v1
              msgId: a1b2c3d4-e5f6-7890-abcd-err000000001
              code: 400
              message: 参数 xxx 不能为空
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer token'
x-refined-from:
- data-export-api-en.yaml
- data-export-api-zh.yaml