Soracom Stats and Diagnostics API

Retrieve cellular data usage statistics (per SIM/subscriber/group/account), API and Napter audit logs, operator error logs, and diagnostic features.

Soracom Stats and Diagnostics API is one of 18 APIs that Soracom publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 1 machine-runnable capability that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko.

Tagged areas include IoT, Stats, Audit, Diagnostics, and Observability. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, and 1 Naftiko capability spec.

OpenAPI Specification

soracom-stats-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Soracom Stats and Diagnostics API
  description: Air data usage statistics, audit logs, error logs, and diagnostic features.
  version: 20250903-043502
servers:
- description: Japan coverage production API endpoint
  url: https://api.soracom.io/v1
- description: Global coverage production API endpoint
  url: https://g.api.soracom.io/v1
paths:
  /stats/air/groups/{group_id}:
    get:
      description: Retrieves the usage report aggregating all SIMs that belong to the specified Group.
      operationId: getAirStatsOfGroup
      parameters:
      - description: Group ID
        in: path
        name: group_id
        required: true
        schema:
          type: string
      - description: Specify the start month/day of the period to be aggregated in UNIX time in seconds.
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: Specify the end month/day of the period to be aggregated in UNIX time in seconds.
        in: query
        name: to
        required: true
        schema:
          type: integer
      - description: "Unit of aggregation.\n\n- `month`: Monthly.\n\n  The `from` and `to` should be UNIX time (in seconds)\
          \ from 3 months before the current time to the current time. The actual period of interest is not the time specified\
          \ by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00 on the first day of\
          \ the month, including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00 of the last day of\
          \ the month containing the specified UNIX time (in seconds). |\n- `day`: Daily\n\n  The `from` and `to` should be\
          \ UNIX time (in seconds) from 7 days before the current time to the current time. The actual period of interest\
          \ is not the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00\
          \ of the day including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00 of the day including\
          \ the specified UNIX time (in seconds). |\n"
        in: query
        name: period
        required: true
        schema:
          enum:
          - month
          - day
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AirAggregatedStatsResponse'
                type: array
          description: OK.
        '400':
          description: Bad request.
      security:
      - api_key: []
        api_token: []
      summary: Get Air Usage Report of a Group.
      tags:
      - Stats
      x-soracom-cli:
      - stats air groups get
  /stats/air/operators/{operator_id}:
    get:
      description: Retrieves the usage report aggregating all SIMs that belong to the specified Operator.
      operationId: getAirStatsOfOperator
      parameters:
      - description: Operator ID
        in: path
        name: operator_id
        required: true
        schema:
          type: string
      - description: Specify the start month/day of the period to be aggregated in UNIX time in seconds.
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: Specify the end month/day of the period to be aggregated in UNIX time in seconds.
        in: query
        name: to
        required: true
        schema:
          type: integer
      - description: "Unit of aggregation.\n\n- `month`: Monthly.\n\n  The `from` and `to` should be UNIX time (in seconds)\
          \ from 3 months before the current time to the current time. The actual period of interest is not the time specified\
          \ by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00 on the first day of\
          \ the month, including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00 of the last day of\
          \ the month containing the specified UNIX time (in seconds). |\n- `day`: Daily\n\n  The `from` and `to` should be\
          \ UNIX time (in seconds) from 7 days before the current time to the current time. The actual period of interest\
          \ is not the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00\
          \ of the day including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00 of the day including\
          \ the specified UNIX time (in seconds). |\n"
        in: query
        name: period
        required: true
        schema:
          enum:
          - month
          - day
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AirAggregatedStatsResponse'
                type: array
          description: OK.
        '400':
          description: Bad request.
      security:
      - api_key: []
        api_token: []
      summary: Get Air Usage Report of an Operator.
      tags:
      - Stats
      x-soracom-cli:
      - stats air operators get
  /stats/air/operators/{operator_id}/export:
    post:
      description: 'Download the Air Data Traffic Actual Data CSV file that contains the usage report of all the IoT SIMs
        for the specified operator.


        **Warning**: If there is no data usage during the specified period, a CSV file with only a header row will be output.

        **Info**: You can also check the data usage of terminated IoT SIMs.

        '
      operationId: exportAirStats
      parameters:
      - description: Operator ID. The operator ID can be obtained from the [Operator:getOperator API](#!/Operator/getOperator).
        in: path
        name: operator_id
        required: true
        schema:
          type: string
      - description: 'Specify how to obtain the URL to download the Air Data Usage Report CSV.


          - `async`: Get the `exportedFieldId` without waiting for the URL to be issued on the Soracom platform. Specify this
          `exportedFieldId` in [Files:getExportedFile API](#!/Files/getExportedFile) to get the URL. If the file size of the
          Air Data Usage Report CSV is huge, specify `async`.

          - `sync` (default): Wait for the URL to be issued on the Soracom platform. However, if the file size of the Air
          Data Usage Report CSV is huge, it may time out and the URL cannot be retrieved. If the timeout occurs, specify `async`.

          '
        in: query
        name: export_mode
        required: false
        schema:
          enum:
          - async
          - sync
          type: string
      requestBody:
        content:
          application/json:
            example:
              from: 1709218800
              period: month
              to: 1714402800
            schema:
              $ref: '#/components/schemas/ExportRequest'
        description: Period and aggregation unit of the data to be exported.
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                (1) export_mode=async:
                  description: 'By specifying this `exportedFieldId` in the [Files:getExportedFile API](#!/Files/getExportedFile),
                    you can obtain the URL for downloading. Access the URL and download the CSV file.

                    '
                  value:
                    exportedFileId: fe_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    exportedFilePath: //files/exported/fe_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                (2) export_mode=sync:
                  description: '`url` is the URL for downloading. Access the URL and download the CSV file.


                    Example command:


                    ```bash

                    $ wget -O export.csv "https://soracom-xxxxxxxx-...."

                    ```

                    '
                  value:
                    url: https://soracom-xxxxxxxx-....
              schema:
                $ref: '#/components/schemas/FileExportResponse'
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Export Air Usage Report of All Subscribers
      tags:
      - Stats
      x-soracom-cli:
      - stats air export
  /stats/air/sims/{sim_id}:
    get:
      description: 'Retrieves the usage report for the SIM specified by the SIM ID.


        **Warning**: The data traffic of the terminated IoT SIM cannot be confirmed.

        '
      operationId: getAirStatsOfSim
      parameters:
      - description: SIM ID of the target SIM. The SIM ID can be obtained from the [Sim:listSims API](#!/Sim/listSims).
        in: path
        name: sim_id
        required: true
        schema:
          type: string
      - description: Specify the start month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: Specify the end month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: to
        required: true
        schema:
          type: integer
      - description: "Unit of aggregation.\n\n- `month`: Aggregate by month.\n\n  The `from` and `to` should be UNIX time\
          \ (in seconds) from 18 months before the current time to the current time. The actual period of interest is not\
          \ the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00\
          \ on the first day of the month, including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00\
          \ of the last day of the month containing the specified UNIX time (in seconds). |\n- `day`: Aggregate by day.\n\n\
          \  The `from` and `to` should be UNIX time (in seconds) from 18 months before the current time to the current time.\
          \ The actual period of interest is not the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n\
          \  | Actual start time | 00:00:00 of the day including the specified UNIX time (in seconds). |\n  | Actual end time\
          \ | 24:00:00 of the day including the specified UNIX time (in seconds). |\n- `minutes`: Aggregate by approximately\
          \ every 5 minutes.\n\n  The `from` and `to` must be between 32 days before the current time and the UNIX time (in\
          \ seconds) of the current time. The actual period to be aggregated is not the time specified by `from` and `to`.\n\
          \n  | Item | Description |\n  |-|-|\n  | Actual Start Time | Start time of approximately 5 minutes including the\
          \ specified UNIX time (seconds). |\n  | Actual End Time | End time of approximately 5 minutes including the specified\
          \ UNIX time (seconds). |\n"
        in: query
        name: period
        required: true
        schema:
          enum:
          - month
          - day
          - minutes
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AirStatsResponse'
                type: array
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Get Air Usage Report of SIM.
      tags:
      - Stats
      x-soracom-cli:
      - stats air sims get
  /stats/air/subscribers/{imsi}:
    get:
      description: 'Retrieves the usage report for the subscriber specified by the IMSI.


        **Warning**: The data traffic of the terminated IoT SIM cannot be confirmed.

        '
      operationId: getAirStats
      parameters:
      - description: The target IMSI. The IMSI can be obtained from the [Sim:listSims API](#!/Sim/listSims).
        in: path
        name: imsi
        required: true
        schema:
          type: string
      - description: Specify the start month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: Specify the end month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: to
        required: true
        schema:
          type: integer
      - description: "Unit of aggregation.\n\n- `month`: Aggregate by month.\n\n  The `from` and `to` should be UNIX time\
          \ (in seconds) from 18 months before the current time to the current time. The actual period of interest is not\
          \ the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00\
          \ on the first day of the month, including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00\
          \ of the last day of the month containing the specified UNIX time (in seconds). |\n- `day`: Aggregate by day.\n\n\
          \  The `from` and `to` should be UNIX time (in seconds) from 18 months before the current time to the current time.\
          \ The actual period of interest is not the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n\
          \  | Actual start time | 00:00:00 of the day including the specified UNIX time (in seconds). |\n  | Actual end time\
          \ | 24:00:00 of the day including the specified UNIX time (in seconds). |\n- `minutes`: Aggregate by approximately\
          \ every 5 minutes.\n\n  The `from` and `to` must be between 32 days before the current time and the UNIX time (in\
          \ seconds) of the current time. The actual period to be aggregated is not the time specified by `from` and `to`.\n\
          \n  | Item | Description |\n  |-|-|\n  | Actual Start Time | Start time of approximately 5 minutes including the\
          \ specified UNIX time (seconds). |\n  | Actual End Time | End time of approximately 5 minutes including the specified\
          \ UNIX time (seconds). |\n"
        in: query
        name: period
        required: true
        schema:
          enum:
          - month
          - day
          - minutes
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AirStatsResponse'
                type: array
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Get Air Usage Report of Subscriber.
      tags:
      - Stats
      x-soracom-cli:
      - stats air get
  /stats/beam/operators/{operator_id}/export:
    post:
      description: Retrieves a file containing the Soracom Beam usage report of all subscribers for the specified operator.
        The report data range is specified with from, to in unixtime. The report contains monthly data. The file output destination
        is AWS S3. The file output format is CSV.
      operationId: exportBeamStats
      parameters:
      - description: Operator ID
        in: path
        name: operator_id
        required: true
        schema:
          type: string
      - description: export_mode (async, sync)
        in: query
        name: export_mode
        required: false
        schema:
          enum:
          - async
          - sync
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportRequest'
        description: Export time period.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileExportResponse'
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Export Beam Usage Report of All Subscribers
      tags:
      - Stats
      x-soracom-cli:
      - stats beam export
  /stats/beam/subscribers/{imsi}:
    get:
      description: Retrieves the Soracom Beam usage report for the subscriber specified by the IMSI.
      operationId: getBeamStats
      parameters:
      - description: imsi
        in: path
        name: imsi
        required: true
        schema:
          type: string
      - description: Specify the start month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: Specify the end month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: to
        required: true
        schema:
          type: integer
      - description: "Unit of aggregation.\n\n- `month`: Aggregate by month.\n\n  The `from` and `to` should be UNIX time\
          \ (in seconds) from 18 months before the current time to the current time. The actual period of interest is not\
          \ the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00\
          \ on the first day of the month, including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00\
          \ of the last day of the month containing the specified UNIX time (in seconds). |\n- `day`: Aggregate by day.\n\n\
          \  The `from` and `to` should be UNIX time (in seconds) from 18 months before the current time to the current time.\
          \ The actual period of interest is not the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n\
          \  | Actual start time | 00:00:00 of the day including the specified UNIX time (in seconds). |\n  | Actual end time\
          \ | 24:00:00 of the day including the specified UNIX time (in seconds). |\n- `minutes`: Aggregate by approximately\
          \ every 5 minutes.\n\n  The `from` and `to` must be between 32 days before the current time and the UNIX time (in\
          \ seconds) of the current time. The actual period to be aggregated is not the time specified by `from` and `to`.\n\
          \n  | Item | Description |\n  |-|-|\n  | Actual Start Time | Start time of approximately 5 minutes including the\
          \ specified UNIX time (seconds). |\n  | Actual End Time | End time of approximately 5 minutes including the specified\
          \ UNIX time (seconds). |\n"
        in: query
        name: period
        required: true
        schema:
          enum:
          - month
          - day
          - minutes
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/BeamStatsResponse'
                type: array
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Get Beam Usage Report of Subscriber
      tags:
      - Stats
      x-soracom-cli:
      - stats beam get
  /stats/funk/operators/{operator_id}/export:
    post:
      description: Retrieves a file containing the Soracom Funk usage report of all subscribers for the specified operator.
        The report data range is specified with from, to in unixtime. The report contains monthly data. The file output destination
        is AWS S3. The file output format is CSV.
      operationId: exportFunkStats
      parameters:
      - description: Operator ID
        in: path
        name: operator_id
        required: true
        schema:
          type: string
      - description: export_mode (async, sync)
        in: query
        name: export_mode
        required: false
        schema:
          enum:
          - async
          - sync
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportRequest'
        description: Export time period.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileExportResponse'
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Export Funk Usage Report of All Subscribers
      tags:
      - Stats
      x-soracom-cli:
      - stats funk export
  /stats/funk/subscribers/{imsi}:
    get:
      description: Retrieves the Soracom Funk usage report for the subscriber specified by the IMSI.
      operationId: getFunkStats
      parameters:
      - description: imsi
        in: path
        name: imsi
        required: true
        schema:
          type: string
      - description: Specify the start month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: Specify the end month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: to
        required: true
        schema:
          type: integer
      - description: "Unit of aggregation.\n\n- `month`: Aggregate by month.\n\n  The `from` and `to` should be UNIX time\
          \ (in seconds) from 18 months before the current time to the current time. The actual period of interest is not\
          \ the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00\
          \ on the first day of the month, including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00\
          \ of the last day of the month containing the specified UNIX time (in seconds). |\n- `day`: Aggregate by day.\n\n\
          \  The `from` and `to` should be UNIX time (in seconds) from 18 months before the current time to the current time.\
          \ The actual period of interest is not the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n\
          \  | Actual start time | 00:00:00 of the day including the specified UNIX time (in seconds). |\n  | Actual end time\
          \ | 24:00:00 of the day including the specified UNIX time (in seconds). |\n- `minutes`: Aggregate by approximately\
          \ every 5 minutes.\n\n  The `from` and `to` must be between 32 days before the current time and the UNIX time (in\
          \ seconds) of the current time. The actual period to be aggregated is not the time specified by `from` and `to`.\n\
          \n  | Item | Description |\n  |-|-|\n  | Actual Start Time | Start time of approximately 5 minutes including the\
          \ specified UNIX time (seconds). |\n  | Actual End Time | End time of approximately 5 minutes including the specified\
          \ UNIX time (seconds). |\n"
        in: query
        name: period
        required: true
        schema:
          enum:
          - month
          - day
          - minutes
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FunkStatsResponse'
                type: array
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Get Funk Usage Report of Subscriber
      tags:
      - Stats
      x-soracom-cli:
      - stats funk get
  /stats/funnel/operators/{operator_id}/export:
    post:
      description: Retrieves a file containing the Soracom Funnel usage report of all subscribers for the specified operator.
        The report data range is specified with from, to in unixtime. The report contains monthly data. The file output destination
        is AWS S3. The file output format is CSV.
      operationId: exportFunnelStats
      parameters:
      - description: Operator ID
        in: path
        name: operator_id
        required: true
        schema:
          type: string
      - description: export_mode (async, sync)
        in: query
        name: export_mode
        required: false
        schema:
          enum:
          - async
          - sync
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportRequest'
        description: Export time period.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileExportResponse'
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Export Funnel Usage Report of All Subscribers
      tags:
      - Stats
      x-soracom-cli:
      - stats funnel export
  /stats/funnel/subscribers/{imsi}:
    get:
      description: Retrieves the Soracom Funnel usage report for the subscriber specified by the IMSI.
      operationId: getFunnelStats
      parameters:
      - description: imsi
        in: path
        name: imsi
        required: true
        schema:
          type: string
      - description: Specify the start month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: Specify the end month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: to
        required: true
        schema:
          type: integer
      - description: "Unit of aggregation.\n\n- `month`: Aggregate by month.\n\n  The `from` and `to` should be UNIX time\
          \ (in seconds) from 18 months before the current time to the current time. The actual period of interest is not\
          \ the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00\
          \ on the first day of the month, including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00\
          \ of the last day of the month containing the specified UNIX time (in seconds). |\n- `day`: Aggregate by day.\n\n\
          \  The `from` and `to` should be UNIX time (in seconds) from 18 months before the current time to the current time.\
          \ The actual period of interest is not the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n\
          \  | Actual start time | 00:00:00 of the day including the specified UNIX time (in seconds). |\n  | Actual end time\
          \ | 24:00:00 of the day including the specified UNIX time (in seconds). |\n- `minutes`: Aggregate by approximately\
          \ every 5 minutes.\n\n  The `from` and `to` must be between 32 days before the current time and the UNIX time (in\
          \ seconds) of the current time. The actual period to be aggregated is not the time specified by `from` and `to`.\n\
          \n  | Item | Description |\n  |-|-|\n  | Actual Start Time | Start time of approximately 5 minutes including the\
          \ specified UNIX time (seconds). |\n  | Actual End Time | End time of approximately 5 minutes including the specified\
          \ UNIX time (seconds). |\n"
        in: query
        name: period
        required: true
        schema:
          enum:
          - month
          - day
          - minutes
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/FunnelStatsResponse'
                type: array
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Get Funnel Usage Report of Subscriber
      tags:
      - Stats
      x-soracom-cli:
      - stats funnel get
  /stats/harvest/operators/{operator_id}:
    get:
      description: Retrieves the Soracom Harvest usage report for the operator.
      operationId: getHarvestExportedDataStats
      parameters:
      - description: Operator ID
        in: path
        name: operator_id
        required: true
        schema:
          type: string
      - description: Specify the year and month from 18 months before the current time to the current time in the YYYYMM format.
        in: query
        name: year_month
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HarvestExportedDataStatsResponse'
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Get 'Harvest usage report' for the specified operator.
      tags:
      - Stats
      x-soracom-cli:
      - stats harvest operators get
  /stats/harvest/operators/{operator_id}/export:
    post:
      description: 'Download the Harvest Data Write Count Results Data CSV file that contains the usage report of all the
        IoT SIMs for the specified operator.


        **Info**: You can also check the Harvest Data write counts of the terminated IoT SIM.

        '
      operationId: exportHarvestStats
      parameters:
      - description: Operator ID.
        in: path
        name: operator_id
        required: true
        schema:
          type: string
      - description: 'Specify how to obtain the URL to download the Harvest Data Write Count Results Data CSV.


          - `async`: Get the `exportedFieldId` without waiting for the URL to be issued on the Soracom platform. Specify this
          `exportedFieldId` in [Files:getExportedFile API](#!/Files/getExportedFile) to get the URL for downloading. If the
          file size of the Harvest Data Write Count Results Data CSV is huge, specify `async`.

          - `sync` (default): Wait for the URL for downloading to be issued on the Soracom platform. However, if the file
          size of the Harvest Data Write Count Results Data CSV is huge, it may time out and the URL cannot be retrieved.
          If the timeout occurs, specify `async`.

          '
        in: query
        name: export_mode
        required: false
        schema:
          enum:
          - async
          - sync
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportRequest'
        description: Export time period.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileExportResponse'
          description: OK.
      security:
      - api_key: []
        api_token: []
      summary: Export Harvest Data Write Counts Report of all IoT SIMs
      tags:
      - Stats
      x-soracom-cli:
      - stats harvest export
  /stats/harvest/subscribers/{imsi}:
    get:
      description: Retrieves the Soracom Harvest usage report for the subscriber specified by the IMSI.
      operationId: getHarvestStats
      parameters:
      - description: imsi
        in: path
        name: imsi
        required: true
        schema:
          type: string
      - description: Specify the start month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: from
        required: true
        schema:
          type: integer
      - description: Specify the end month/day/minute of the period to be aggregated in UNIX time in seconds.
        in: query
        name: to
        required: true
        schema:
          type: integer
      - description: "Unit of aggregation.\n\n- `month`: Aggregate by month.\n\n  The `from` and `to` should be UNIX time\
          \ (in seconds) from 18 months before the current time to the current time. The actual period of interest is not\
          \ the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n  | Actual start time | 00:00:00\
          \ on the first day of the month, including the specified UNIX time (in seconds). |\n  | Actual end time | 24:00:00\
          \ of the last day of the month containing the specified UNIX time (in seconds). |\n- `day`: Aggregate by day.\n\n\
          \  The `from` and `to` should be UNIX time (in seconds) from 18 months before the current time to the current time.\
          \ The actual period of interest is not the time specified by `from` and `to`.\n\n  | Item | Description |\n  |-|-|\n\
          \  | Actual start time | 00:00:00 of the day including the specified UNIX time (in seconds). |\n  | Actual end time\
          \ | 24:00:00 of the day including the specified UNIX tim

# --- truncated at 32 KB (58 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/soracom/refs/heads/main/openapi/soracom-stats-api-openapi.yml