openapi: 3.2.0 info: title: Business Analytics Report Aggregated traffics API version: 1.0.5 description: '#### Copyright © Aeris Communications, Inc.' x-audience: external-public x-api-id: b6389a2a-0d7f-4ba1-af93-27ad5e690095 servers: - url: https://iot-api.aeris.com/iot/api/business-analytics-service/v1 description: API server tags: - name: Aggregated traffics paths: /aggregated-traffic-usages/top-usage-subscriptions: get: tags: - Aggregated traffics summary: Query the top subscriptions with most traffic usage operationId: TopUsageSubscriptions description: Returns the top subscriptions with most traffic usage in the specified time duration. parameters: - $ref: '#/components/parameters/FromDate' - $ref: '#/components/parameters/ToDate' - $ref: '#/components/parameters/ResultLimit' - $ref: '#/components/parameters/TrafficType' - $ref: '#/components/parameters/OrganizationId' - $ref: '#/components/parameters/DateRange' responses: '200': allOf: - $ref: '#/components/responses/RateLimitedResponse' description: OK content: application/json: schema: $ref: '#/components/schemas/TrafficTopUsageSubscriptionsResponse' '400': $ref: '#/components/responses/400Response' '401': $ref: '#/components/responses/401Response' '403': $ref: '#/components/responses/403Response' '404': $ref: '#/components/responses/404Response' '429': $ref: '#/components/responses/429Response' '500': $ref: '#/components/responses/500Response' default: $ref: '#/components/responses/500Response' security: - Oauth2_auth: - cnx_top_traffic_subscr_gprs - cnx_top_traffic_subscr_sms components: schemas: DateRangeEnum: type: string description: "An enum which defines supported date range values:\n - LAST_DAY\n - LAST_2_DAYS\n - LAST_7_DAYS\n - LAST_30_DAYS\n - THIS_MONTH\n" enum: - LAST_DAY - LAST_2_DAYS - LAST_7_DAYS - LAST_30_DAYS - THIS_MONTH ErrorResponse: type: object properties: type: type: string format: uri description: 'An absolute URI that identifies the problem type. When dereferenced,it SHOULD provide human-readable documentation for the problem type (e.g., using HTML). ' default: about:blank example: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4 title: type: string description: 'A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized. ' status: type: integer format: int32 description: The HTTP status code generated by the origin server for this occurrence of the problem. minimum: 100 exclusiveMaximum: 600 detail: type: string description: A human readable explanation specific to this occurrence of the problem. instance: type: string description: An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. example: https://api.documentation.url/request-id TrafficTypeEnum: type: string description: The traffice types. example: SMS x-extensible-enum: - SMS - DATA TrafficTopUsageSubscriptionsResponseItem: type: object properties: imsi: type: string example: '238208000000001' description: The IMSI of the subscription. msisdn: type: string example: '33123456789' description: The MSISDN of the subscription. volume: type: integer format: int64 example: 500000 TrafficTopUsageSubscriptionsResponse: type: object properties: subscriptionTrafficUsageData: type: array items: $ref: '#/components/schemas/TrafficTopUsageSubscriptionsResponseItem' responses: 429Response: description: Too Many Requests headers: X-RateLimit-Limit-Second: $ref: '#/components/headers/X-RateLimit-Limit-Second' X-RateLimit-Limit-Minute: $ref: '#/components/headers/X-RateLimit-Limit-Minute' X-RateLimit-Remaining-Second: $ref: '#/components/headers/X-RateLimit-Remaining-Second' X-RateLimit-Remaining-Minute: $ref: '#/components/headers/X-RateLimit-Remaining-Minute' Content-Type: $ref: '#/components/headers/Content-Type' content: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' RateLimitedResponse: headers: X-RateLimit-Limit-Second: $ref: '#/components/headers/X-RateLimit-Limit-Second' X-RateLimit-Limit-Minute: $ref: '#/components/headers/X-RateLimit-Limit-Minute' X-RateLimit-Remaining-Second: $ref: '#/components/headers/X-RateLimit-Remaining-Second' X-RateLimit-Remaining-Minute: $ref: '#/components/headers/X-RateLimit-Remaining-Minute' Content-Type: $ref: '#/components/headers/Content-Type' 400Response: description: Bad Request content: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' examples: response: value: type: https://www.iana.org/assignments/http-status-codes/ title: Bad Request status: 400 detail: Invalid customerNo instance: https://hostname/iot/api/some-path 401Response: description: Unauthorized content: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' examples: response: value: type: https://www.iana.org/assignments/http-status-codes/ title: Unauthorized status: 401 detail: Token expired instance: https://hostname/iot/api/some-path 404Response: description: Not Found content: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' examples: response: value: type: https://www.iana.org/assignments/http-status-codes/ title: Not Found status: 404 detail: Not Found instance: https://hostname/iot/api/some-path 403Response: description: Forbidden content: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' examples: response: value: type: https://www.iana.org/assignments/http-status-codes/ title: Forbidden status: 403 detail: You do not have access to the resource instance: https://hostname/iot/api/some-path 500Response: description: Internal Server Error content: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' examples: response: value: type: https://www.iana.org/assignments/http-status-codes/ title: Internal Server Error status: 500 detail: Internal Server Error instance: https://hostname/iot/api/some-path headers: Content-Type: description: Handle Content-Type schema: type: string X-RateLimit-Remaining-Second: description: The number of requests remaining in a second. schema: type: integer format: int32 X-RateLimit-Limit-Second: description: The maximum number of requests allowed in a second. schema: type: integer format: int32 X-RateLimit-Remaining-Minute: description: The number of requests remaining in a minute. schema: type: integer format: int32 X-RateLimit-Limit-Minute: description: The maximum number of requests allowed in a minute. schema: type: integer format: int32 parameters: ToDate: name: toDate in: query description: 'Specifies the latest date to search for aggregated traffic usage, in the following format: YYYY-MM-DD. The starting and ending dates must define a period of 1, 7, or 30 days. Otherwise, an error is returned. ' required: false schema: type: string format: date example: '2022-04-20' OrganizationId: name: organizationId in: query required: false description: 'Specifies the organization ID. ' schema: type: string example: 3.88.2 ResultLimit: name: resultLimit in: query required: true description: 'Specifies the number of results the query returns. Maximum possible value is 250. ' schema: type: integer format: int32 minimum: 1 maximum: 250 example: 5 TrafficType: name: trafficType in: query required: true description: 'Specifies the traffic type to search for. ' schema: $ref: '#/components/schemas/TrafficTypeEnum' DateRange: name: dateRange in: query required: false description: "An optional parameter which is used to selects most common date ranges.\nValid values are:\n - LAST_DAY\n - LAST_2_DAYS\n - LAST_7_DAYS\n - LAST_30_DAYS\n - THIS_MONTH\n\nThis parameter takes precedence over 'fromDate' and 'toDate' and calculates the dates automatically\nbased on the selected dateRange. If user provides all parameters 'fromDate', 'toDate' and 'dateRange'\nthen 'fromDate', 'toDate' provided by user are ignored.\n" schema: $ref: '#/components/schemas/DateRangeEnum' example: LAST_DAY FromDate: name: fromDate in: query description: 'Specifies the earliest date to search for aggregated traffic usage, in the following format: YYYY-MM-DD. Traffic usage data is available only from the last 31 days. ' required: false schema: type: string format: date example: '2022-04-20' securitySchemes: Oauth2_auth: type: oauth2 flows: password: tokenUrl: /iot/api/auth/token scopes: cnx_report_download_operator: Download monthly reports - for TCXN (old) cnx_report_download_operator_2: Download monthly reports - for TCXN cnx_report_download_opco: Download monthly reports - for operators (old) cnx_report_download_opco_2: Download monthly reports - for operators cnx_report_download: Download monthly reports - for TCXN (old) cnx_report_download_2: Download monthly reports - for enterprises cnx_report_download_no_invoice: Download monthly reports (no billing-related reports) - for enterprises (old) cnx_report_download_no_invoice_2: Download monthly reports (no billing-related reports) - for enterprises cnx_invoice_download_supplier: Download invoices + invoice deletion - for supplier cnx_invoice_download_operator: Download invoices + invoice deletion - for operators (old) cnx_invoice_download_operator_2: Download invoices + invoice deletion cnx_invoice_download: Download invoices - for enterprises (old) cnx_invoice_download_2: Download invoices cnx_usage_data_download: Download usage data (old) cnx_usage_data_download_2: Download usage data cnx_top_traffic_subscr_gprs: 'API: Subscriptions with most data traffic' cnx_top_traffic_subscr_sms: 'API: Subscriptions with most SMS traffic'