> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contraforce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get playbooks by gamebook id



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/workspaces/{workspaceId}/gamebooks/history/{gamebookId}/playbooks
openapi: 3.1.1
info:
  title: ContraForce API
  description: ContraForce platform API for security operations management.
  version: '2.0'
servers: []
security: []
tags:
  - name: Incidents
  - name: Gamebooks
  - name: Data sources
  - name: Service tickets
  - name: Investigation
  - name: Cross-workspace incidents
  - name: Cross-workspace gamebooks
  - name: Cross-workspace data sources
  - name: Webhooks
  - name: Service accounts
  - name: Users
  - name: Azure resources
paths:
  /api/v2/workspaces/{workspaceId}/gamebooks/history/{gamebookId}/playbooks:
    get:
      tags:
        - Gamebooks
      summary: Get playbooks by gamebook id
      operationId: v2-get-playbooks-by-gamebook-id
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: gamebookId
          in: path
          required: true
          schema:
            type: string
        - name: year
          in: query
          required: true
          schema:
            pattern: ^-?(?:0|[1-9]\d*)$
            type:
              - integer
              - string
            format: int32
        - name: tenantId
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponseOfIEnumerableOfPlaybookGameplanDto
        '400':
          description: Bad request — validation or parameter binding failed.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '401':
          description: Unauthorized — missing or invalid Bearer token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '403':
          description: Forbidden — insufficient scope or workspace access.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '404':
          description: Not found — workspace or resource is missing.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '500':
          description: Internal server error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
components:
  schemas:
    ApiResponseOfIEnumerableOfPlaybookGameplanDto:
      type: object
      properties:
        data:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/PlaybookGameplanDto'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      description: Standard v2 API response envelope for single-item responses.
    ApiProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
        code:
          type:
            - 'null'
            - string
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
        target:
          type:
            - 'null'
            - string
        errors:
          type:
            - 'null'
            - object
          additionalProperties:
            type: array
            items:
              type: string
      description: "API extension of ProblemDetails that surfaces the stable error code,\r\ntrace identifier, timestamp, optional target, and optional field-keyed validation\r\nerror map alongside the RFC 7807 members."
    PlaybookGameplanDto:
      type: object
      properties:
        id:
          type:
            - 'null'
            - string
        referenceId:
          type:
            - 'null'
            - string
          description: >-
            Reference Id (readonly) which is the id of the playbook + the id of
            the entity
        entityId:
          type:
            - 'null'
            - string
        name:
          type:
            - 'null'
            - string
        description:
          type:
            - 'null'
            - string
        entityType:
          $ref: '#/components/schemas/PlaybookEntityType'
        affectedEntity:
          type:
            - 'null'
            - string
        isRecommended:
          type: boolean
        status:
          $ref: '#/components/schemas/PlaybookRunningStatus'
        errorMessage:
          type:
            - 'null'
            - string
        sequence:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        modificationDate:
          type: string
          format: date-time
        startingDate:
          type:
            - 'null'
            - string
          format: date-time
        finishingDate:
          type:
            - 'null'
            - string
          format: date-time
        executionTime:
          type:
            - 'null'
            - string
          description: >-
            Total execution time taken to execute the playbook, the value is
            null until the DateTime? PlaybookGameplanDto.FinishingDate property
            is populated
        tracingId:
          type:
            - 'null'
            - string
        parameters:
          type:
            - 'null'
            - object
          description: "Represents the parameters of the playbooks to be sent in the message\r\nThe value will be populated only if the playbook is configurable (Block IP)"
        isAdminRequired:
          type: boolean
    ResponseMeta:
      type: object
      properties:
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
    PlaybookEntityType:
      enum:
        - User
        - Endpoint
        - General
        - Network
        - Email
    PlaybookRunningStatus:
      enum:
        - Pending
        - Running
        - Finished
        - Failed
        - Terminated

````