openapi: 3.0.3 info: title: Brightcove Analytics API Reference Access Tokens RTMP Outputs API description: "Reference for the Brightcove Analytics API, used to retrieve analytics data for your accounts. To test API requests, you can use our API Testing Tools.\n\nFor additional in-depth guides to features of the API, see the **[general documentation](/analytics/index.html)**.\n\n **Base URL**: https://analytics.api.brightcove.com" x-bc-access: public version: 1.0.0 servers: - url: https://analytics.api.brightcove.com variables: {} tags: - name: RTMP Outputs description: Operations for creating and managing RTMP outputs. Note that RTMP output hours will be billed against event hours. paths: /jobs/{job_id}/rtmpouts: get: tags: - RTMP Outputs summary: List RTMP Outputs description: 'Get a list of RTMP outputs. See [Live API: RTMP Outputs](/live-api/guides/live-api-rtmp-outputs.html) for more information on RTMP outputs.' operationId: GetRTMPOutputs parameters: - $ref: '#/components/parameters/JobId' - $ref: '#/components/parameters/XAPIKEY' responses: '200': description: '200' content: application/json: schema: $ref: '#/components/schemas/ListRTMPOutputs' '401': description: 'UNAUTHORIZED: Unauthorized - see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' '404': description: 'RESOURCE_NOT_FOUND: The api could not find the resource you requested - see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' '500': description: 'INTERNAL_SERVER_ERROR: see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' deprecated: false security: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false post: tags: - RTMP Outputs summary: Create RTMP Output description: 'Create an RTMP output. See [Live API: RTMP Outputs](/live-api/guides/live-api-rtmp-outputs.html) for more information on RTMP outputs.' operationId: CreateRTMPOutput parameters: - $ref: '#/components/parameters/JobId' - $ref: '#/components/parameters/XAPIKEY' requestBody: description: Create an RTMP output request body content: application/json: schema: $ref: '#/components/schemas/CreateRTMPOutputRequestBody' required: true responses: '200': description: '200' content: application/json: schema: $ref: '#/components/schemas/CreateRTMPOutputResponse' '400': description: 'BAD_REQUEST: Bad Request - RTMP outputs limit reached, failed to add (most likely you have reached the limit of active RTMP outputs for your account; the default limit is 5)' '401': description: 'UNAUTHORIZED: Unauthorized - see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' '404': description: 'RESOURCE_NOT_FOUND: The api could not find the resource you requested - see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' '500': description: 'INTERNAL_SERVER_ERROR: see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' deprecated: false security: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /jobs/{job_id}/rtmpouts/{rtmp_out_id}/stop: put: tags: - RTMP Outputs summary: Stop RTMP Output description: 'Stop an RTMP output. See [Live API: RTMP Outputs](/live-api/guides/live-api-rtmp-outputs.html) for more information on RTMP outputs.' operationId: StopRTMPOutput parameters: - $ref: '#/components/parameters/JobId' - $ref: '#/components/parameters/XAPIKEY' - $ref: '#/components/parameters/rtmp_out_id' responses: '200': description: '200' content: application/json: schema: $ref: '#/components/schemas/StopRTMPOutputResponse' '401': description: 'UNAUTHORIZED: Unauthorized - see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' '404': description: 'RESOURCE_NOT_FOUND: The api could not find the resource you requested - see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' '500': description: 'INTERNAL_SERVER_ERROR: see [Live API Error Messages](/live-api/references/live-api-error-messages.html) for more details' deprecated: false security: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false components: parameters: JobId: name: job_id in: path description: Live job ID required: true style: simple explode: false schema: type: string XAPIKEY: name: X-API-KEY in: header description: 'X-API-KEY: {Your_Live_API_Key}' required: true style: simple explode: false schema: type: string rtmp_out_id: name: rtmp_out_id in: path description: RTMP output ID required: true style: simple explode: false schema: type: string schemas: RTMPout: title: RTMP Output type: object description: RTMP output object properties: rtmp_out_id: type: string description: system id for the RTMP output stream_start: type: integer description: Start time of the output in Epoch time (milliseconds) state: type: string description: Current state of the RTMP output stream enum: - connected - disconnected - error - starting duration_history: type: array description: Array of durations for connections items: type: object description: A connection start and stop properties: stream_start: type: integer description: The epoch time (in milliseconds) that a stream connected stream_end: type: integer description: The epoch time (in milliseconds) that a stream disconnected connection_info: type: object description: Details of the connection information properties: host: type: string description: Host URL port: type: integer description: The port number application: type: string description: The application name in the path streamName: type: string description: The stream name in the path sessionStatus: type: string description: The current session status enum: - Active - Inactive waiting_for_start: type: boolean description: 'For SEP jobs. If `true`, the SEP job was deactivated but the RTMP output was not stopped and the next time you activate the stream on the SEP job there will be an attempt to reconnect the RTMP output. If `waiting_for_start` is `false`, it means the RTMP output was stopped.' StopRTMPOutputResponse: title: Stop RTMP output response description: Success response for stopping and RTMP output type: object properties: message: type: string description: Success message example: '{ "message": "RTMP out asdfg-lkjh deleted successfully" }' ListRTMPOutputs: title: List RMTP Outputs description: Response to GET request for RTMP outputs - array of RTMP outputs objects type: array items: $ref: '#/components/schemas/RTMPout' example: - rtmp_out_id: asdfg-lkjh stream_start: 1538746255247 connection_info: host: a.rtmp.youtube.com port: 1935 application: live2 streamName: myStream sessionStatus: Active duration_history: - stream_start: 1557933191000 stream_end: 1557936731000 waiting_for_start: false CreateRTMPOutputResponse: title: Create RTMP output success response description: Create RTMP output success response type: object properties: connection_info: type: object description: Information on the connection URL properties: host: type: string description: Host URL port: type: integer description: The port number application: type: string description: The application name in the path streamName: type: string description: The stream name in the path duration_history: type: array description: Array of durations for connections items: type: integer description: A connection duration in seconds rtmp_out_id: type: string description: System id for the RTMP output stream_start: type: integer description: Time of the stream start in Epoch time (milliseconds) example: connection_info: host: live-api-s.facebook.com port: 80 application: rtmp streamName: foo-bar duration_history: [] rtmp_out_id: foo stream_start: 1542731746032 CreateRTMPOutputRequestBody: title: Create RTMP Output Request Body description: Request body for requests to create an RTMP output type: object properties: url: type: string description: URL for the RTMP output example: rtmp://host:port/application/streamName output_label: type: string description: The label of the job output to use as the source for the RTMP output. Omit this parameter to simply forward the RTMP input instead. required: - url securitySchemes: BC_OAuth2: type: oauth2 description: Brightcove OAuth API. See the [support documentation](/oauth/index.html) or [Getting Access Tokens](/oauth/code-samples/oauth-api-sample-get-access-token.html) to learn more flows: clientCredentials: tokenUrl: https://oauth.brightcove.com/v4/access_token scopes: video-cloud/analytics/read: Read analytics data video-cloud/video/read: Read video data x-bc-implicit-head: true x-bc-implicit-options: true x-bc-upstream: https://backend_server