openapi: 3.2.0 info: title: Gumlet Live Stream Analytics API description: Gumlet helps developers deliver online video and images. This API encompasses Gumlet Video, Image and Video Analytics functionality to help you build your products better and faster than ever before. version: '1.4' contact: name: Gumlet Support Team url: https://www.gumlet.com/contact/ email: support@gumlet.com termsOfService: https://www.gumlet.com/terms/ license: name: Apache 2.0 url: https://opensource.org/license/apache-2.0 x-scalar-sdk-installation: - lang: TypeScript description: '```sh npm install @gumlet/nodejs-sdk ```' - lang: Python description: '```sh pip install gumlet ```' servers: - url: https://api.gumlet.com/v1 security: - API_KEY: [] tags: - name: Live Stream Analytics description: Get usage analytics for live streams. paths: /video/live/analytics: post: responses: '200': description: Successful response content: application/json: schema: type: object properties: bandwidth_consumption: type: array items: type: object properties: units: type: integer description: Bandwidth consumption data in bytes format: uint64 timestamp: type: integer format: int64 description: Milliseconds since epoch timestamp for the data point x-apidog-orders: - units - timestamp required: - units - timestamp description: Data about bandwidth consumption asset_duration: type: array items: type: object properties: units: type: integer format: int64 description: Input asset seconds timestamp: type: integer description: Milliseconds since epoch timestamp for the data point format: int64 x-apidog-orders: - units - timestamp required: - units - timestamp description: Data about input seconds processed storage_unit: type: array items: type: object properties: units: type: integer format: uint64 description: Storage unit in either bytes or seconds. You can get the information from `storage_data_unit` field. timestamp: type: integer description: Milliseconds since epoch timestamp for the data point format: int64 x-apidog-orders: - units - timestamp required: - units - timestamp description: Bytes or seconds of storage used storage_data_unit: type: string enum: - min - gb x-apidog-enum: - value: min name: '' description: '' - value: gb name: '' description: '' description: Storage data unit information x-apidog-orders: - bandwidth_consumption - asset_duration - storage_unit - storage_data_unit required: - storage_data_unit '400': description: Bad Request content: application/json: examples: Result: value: error: code: invalid_parameter_value message: The parameter value is invalid. schema: type: object properties: error: type: object properties: code: type: string example: invalid_parameter_value message: type: string example: The parameter value is invalid. required: - code - message required: - error '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': description: Not Found content: application/json: examples: Result: value: error: code: source_not_found message: Could not find any video source with the specified source_id. schema: type: object properties: error: type: object properties: code: type: string example: source_not_found message: type: string example: Could not find any video source with the specified source_id. required: - code - message required: - error summary: Usage Analytics tags: - Live Stream Analytics operationId: live-usage-analytics description: Get usage analytics for your live streams. requestBody: content: application/json: schema: type: object properties: date_range: type: object properties: start_at: type: string description: Start date in ISO 8601 date format (YYYY-MM-DD) format: date end_at: type: string format: date description: End date in ISO 8601 date format (YYYY-MM-DD) x-apidog-orders: - start_at - end_at required: - start_at - end_at group_by: type: string enum: - daily - weekly - monthly x-apidog-enum: - value: daily name: '' description: '' - value: weekly name: '' description: '' - value: monthly name: '' description: '' description: Group the data either weekly, daily or monthly metrics: type: array items: type: string enum: - bandwidth_consumption - asset_duration - storage_unit x-apidog-enum: - value: bandwidth_consumption name: '' description: '' - value: asset_duration name: '' description: '' - value: storage_unit name: '' description: '' description: List of metrics required in response x-apidog-orders: - date_range - group_by - metrics required: - date_range - group_by - metrics x-codeSamples: - label: TypeScript lang: TypeScript source: "import Gumlet from '@gumlet/nodejs-sdk';\n\nconst client = new Gumlet({\n apiKey: process.env['API_KEY'], // defaults to the API_KEY env var\n});\n\nconst liveStreamAnalytic = await client.liveStreamAnalytics.usage({\n date_range: {\n start_at: '2024-01-01',\n end_at: '2024-01-01',\n },\n group_by: 'daily',\n metrics: ['bandwidth_consumption'],\n});\n\nconsole.log(liveStreamAnalytic);" - label: Python lang: Python source: "import os\n\nfrom gumlet import Gumlet\n\nclient = Gumlet(\n api_key=os.environ.get(\"API_KEY\"),\n)\n\nlive_stream_analytic = client.live_stream_analytics.usage(\n date_range={\"start_at\": \"2024-01-01\", \"end_at\": \"2024-01-01\"},\n group_by=\"daily\",\n metrics=[\"bandwidth_consumption\"],\n)\n\nprint(live_stream_analytic)" components: schemas: Error: type: object required: - error properties: error: type: object required: - code - message properties: code: type: string description: Machine-readable error code message: type: string description: Human-readable error message param: type: string description: Optional parameter name related to the error responses: Unauthorized: description: Unauthorized — missing or invalid API key / bearer token content: application/json: examples: Result: value: error: code: invalid_api_key message: API key supplied with request is invalid schema: $ref: '#/components/schemas/Error' Forbidden: description: Forbidden — unpaid account or insufficient role permissions content: application/json: examples: Result: value: error: code: unauthorized message: You don't have access to this feature. Please contact your organization owner. schema: $ref: '#/components/schemas/Error' securitySchemes: API_KEY: type: http scheme: bearer x-tagGroups: - name: Video on Demand tags: - Video Assets - Global Search - Multipart Upload - Audio Upload - Subtitle Upload - Recycle Bin - Video Workspaces - Folders - Video Playlists - Channel Viewers - Video Usage Analytics - Video Profiles - Webhooks - name: Live Streams tags: - Live Stream Workspaces - Live Stream Assets - Live Stream Analytics - name: Image APIs tags: - Image Sources - Image Usage Analytics - name: Video Analytics tags: - Video Analytics - name: Webhooks tags: - Webhooks - name: Account Endpoints tags: - User Data - Billing - Organization Data - Audit Logs x-ext-urls: {}