> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 차트 시리즈 데이터 쿼리

> 구성된 시리즈 매개변수를 기반으로 시계열 데이터를 조회합니다



## OpenAPI

````yaml /ko/_specs/hyperdx-openapi.json post /api/v2/charts/series
openapi: 3.0.0
info:
  description: HyperDX 알림 및 대시보드 관리 API
  title: HyperDX External API
  version: 2.0.0
servers:
  - description: 운영 API 서버
    url: https://api.hyperdx.io
  - description: 현재 서버
    url: /
security:
  - BearerAuth: []
tags:
  - description: 대시보드 및 해당 시각화를 관리하는 엔드포인트
    name: Dashboards
  - description: 모니터링 알림을 관리하는 엔드포인트
    name: Alerts
paths:
  /api/v2/charts/series:
    post:
      tags:
        - Charts
      summary: 차트 시리즈 데이터 쿼리
      description: 구성된 시리즈 매개변수를 기반으로 시계열 데이터를 조회합니다
      operationId: queryChartSeries
      requestBody:
        content:
          application/json:
            examples:
              basicTimeSeries:
                summary: 기본 시계열 쿼리
                value:
                  endTime: 1647100800000
                  granularity: 1h
                  series:
                    - aggFn: count
                      groupBy: []
                      sourceId: 65f5e4a3b9e77c001a123456
                      where: SeverityText:error
                  startTime: 1647014400000
              metricSeries:
                summary: 메트릭 데이터 시리즈
                value:
                  endTime: 1647100800000
                  granularity: 5m
                  series:
                    - aggFn: avg
                      groupBy: []
                      metricDataType: gauge
                      metricName: http_requests_total
                      sourceId: 65f5e4a3b9e77c001a789012
                      where: service:api
                  startTime: 1647014400000
              multiSeriesWithGroupBy:
                summary: group by를 사용한 다중 시리즈
                value:
                  endTime: 1647100800000
                  granularity: 15m
                  series:
                    - aggFn: count
                      groupBy:
                        - service
                      sourceId: 65f5e4a3b9e77c001a123456
                      where: SeverityText:error
                    - aggFn: avg
                      field: duration
                      groupBy:
                        - service
                      sourceId: 65f5e4a3b9e77c001a123456
                      where: SeverityText:error
                  startTime: 1647014400000
              multiSourceSeries:
                summary: 여러 소스의 시리즈
                value:
                  endTime: 1647100800000
                  granularity: 5m
                  series:
                    - aggFn: count
                      groupBy: []
                      sourceId: 65f5e4a3b9e77c001a123456
                      where: SeverityText:error
                    - aggFn: avg
                      groupBy: []
                      metricDataType: gauge
                      metricName: http_requests_total
                      sourceId: 65f5e4a3b9e77c001a789012
                      where: service:api
                  startTime: 1647014400000
            schema:
              $ref: '#/components/schemas/SeriesQueryRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                groupedTimeSeriesData:
                  summary: 그룹화된 시계열 데이터
                  value:
                    data:
                      - group:
                          - api
                        series_0.data: 15
                        ts_bucket: 1647014400000
                      - group:
                          - frontend
                        series_0.data: 8
                        ts_bucket: 1647014400000
                      - group:
                          - api
                        series_0.data: 22
                        ts_bucket: 1647018000000
                timeSeriesData:
                  summary: 시계열 데이터 포인트
                  value:
                    data:
                      - series_0.data: 42
                        ts_bucket: 1647014400000
                      - series_0.data: 37
                        ts_bucket: 1647018000000
                      - series_0.data: 53
                        ts_bucket: 1647021600000
              schema:
                $ref: '#/components/schemas/SeriesResponse'
          description: 시계열 데이터를 성공적으로 조회했습니다
        '400':
          content:
            application/json:
              examples:
                invalidParams:
                  value:
                    error: All series must have the same groupBy fields
                invalidTimestamp:
                  value:
                    error: Timestamp must be in milliseconds
              schema:
                properties:
                  error:
                    type: string
                type: object
          description: 잘못된 요청 매개변수
        '403':
          content:
            application/json:
              example:
                error: Team context missing
              schema:
                properties:
                  error:
                    type: string
                type: object
          description: 인증되지 않음
        '404':
          content:
            application/json:
              example:
                error: Source not found
              schema:
                properties:
                  error:
                    type: string
                type: object
          description: 소스를 찾을 수 없습니다
        '500':
          content:
            application/json:
              example:
                error: Internal server error
              schema:
                properties:
                  error:
                    type: string
                type: object
          description: 서버 오류
components:
  schemas:
    SeriesQueryRequest:
      properties:
        endTime:
          description: 밀리초 단위 종료 타임스탬프
          example: 1647100800000
          type: number
        granularity:
          description: 집계용 시간 버킷 크기
          enum:
            - 30s
            - 1m
            - 5m
            - 10m
            - 15m
            - 30m
            - 1h
            - 2h
            - 6h
            - 12h
            - 1d
            - 2d
            - 7d
            - 30d
            - auto
          example: 1h
          type: string
        series:
          description: 시리즈 구성 배열
          items:
            $ref: '#/components/schemas/ChartSeries'
          maxItems: 5
          minItems: 1
          type: array
        seriesReturnType:
          description: 반환 데이터의 포맷
          enum:
            - ratio
            - column
          example: column
          type: string
        startTime:
          description: 밀리초 단위 시작 타임스탬프
          example: 1647014400000
          type: number
      required:
        - series
        - startTime
        - endTime
      type: object
    SeriesResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/SeriesDataPoint'
          type: array
      type: object
    ChartSeries:
      properties:
        aggFn:
          description: 데이터에 사용할 집계 함수
          enum:
            - avg
            - count
            - count_distinct
            - last_value
            - max
            - min
            - quantile
            - sum
          example: count
          type: string
        dataSource:
          enum:
            - events
            - metrics
          example: events
          type: string
        field:
          description: 집계할 필드
          example: duration
          type: string
        groupBy:
          description: 결과를 그룹화할 필드
          example:
            - service
            - host
          items:
            type: string
          type: array
        metricDataType:
          description: 메트릭 데이터 유형
          enum:
            - sum
            - gauge
            - histogram
          example: gauge
          type: string
        metricName:
          description: 메트릭 이름(메트릭 data source용)
          example: http_requests_total
          type: string
        sourceId:
          description: 이 시리즈의 data source ID
          example: 65f5e4a3b9e77c001a123456
          type: string
        type:
          enum:
            - time
            - table
            - number
            - histogram
            - search
            - markdown
          example: time
          type: string
        where:
          description: Lucene 쿼리 구문의 필터 조건
          example: level:error
          type: string
        whereLanguage:
          description: WHERE 절에서 사용하는 쿼리 언어
          enum:
            - lucene
            - sql
          example: lucene
          type: string
      required:
        - sourceId
        - aggFn
        - where
        - groupBy
      type: object
    SeriesDataPoint:
      properties:
        group:
          description: groupBy가 지정된 경우의 그룹화 값
          example:
            - api
            - prod-host-1
          items:
            type: string
          type: array
        series_0.data:
          description: 첫 번째 시리즈의 값
          example: 42
          type: number
        series_1.data:
          description: 두 번째 시리즈의 값
          example: 18
          type: number
        ts_bucket:
          description: 데이터 포인트의 타임스탬프(버킷 시작 시간)
          example: 1647014400000
          type: number
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      scheme: bearer
      type: http

````