openapi: 3.0.0 info: description: |- This is a service that allows applying Concurrency mid-stream checks without DRM. **Base URL: https://edge-gsc.api.brightcove.com** title: Concurrency Service API contact: {} version: "1.0" paths: "/api/v1/accounts/{account_id}/sessions": get: description: An endpoint that returns active sessions by viewerID tags: - Session summary: GetActiveSessions endpoint parameters: - description: Account ID name: account_id in: path required: true schema: type: string responses: "200": description: Active Sessions content: application/json: schema: type: array items: $ref: "#/components/schemas/model.Session" "401": description: Unauthorized due to invalid token content: application/json: schema: $ref: "#/components/schemas/model.ErrorResponse" post: security: - JWTAuth: [] description: An endpoint that allows or denies playback based on concurrency restrictions tags: - Session summary: Session endpoint parameters: - description: Account ID name: account_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/model.HeartbeatRequest" description: Heartbeat Request required: true responses: "200": description: Playback allowed content: application/json: schema: $ref: "#/components/schemas/model.HeartbeatResponse" "204": description: Feature not available for the account "401": description: Unauthorized due to invalid token content: application/json: schema: $ref: "#/components/schemas/model.ErrorResponse" "403": description: Forbidden playback due to concurrency limit content: application/json: schema: $ref: "#/components/schemas/model.ErrorResponse" "/api/v1/accounts/{account_id}/sessions/{session_id}": delete: security: - JWTAuth: [] description: An endpoint that removes an active session by AccountID and SessionID tags: - Session summary: StopSession endpoint parameters: - description: Account ID name: account_id in: path required: true schema: type: string - description: Session ID name: session_id in: path required: true schema: type: string responses: "204": description: Successful delete "401": description: Unauthorized due to invalid token content: "*/*": schema: $ref: "#/components/schemas/model.ErrorResponse" tags: - description: Session related endpoints name: Session servers: - url: https://edge-gsc.api.brightcove.com - url: http://edge-gsc.api.brightcove.com components: securitySchemes: JWTAuth: type: JWT name: Authorization in: header schemas: model.ErrorDetails: type: object properties: code: type: string example: ACCESS_DENIED message: type: string example: Video not available. model.ErrorResponse: type: object properties: error: $ref: "#/components/schemas/model.ErrorDetails" model.HeartbeatRequest: type: object properties: sid: type: string description: A unique session id video: type: string description: The video id model.HeartbeatResponse: type: object properties: current: type: integer description: Number of current active sessions heartbeat_interval: type: integer description: Interval for heartbeats in seconds max: type: integer description: Maximum number of allowed concurrent sessions model.Session: type: object properties: end_viewer_id: type: string description: Unique id for the viewer last_seen: type: string description: Date-time of last session by the viewer session_id: type: string description: Unique session id stopped: type: boolean description: whether the session has stopped