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

# Get Playbook Execution Setting

> 指定したPlaybookの自動実行条件を取得します。
Playbookや設定が非公開・無効であっても、同じワークスペースに存在すれば現在の設定を返します。
`auto_execution` が設定全体の有効状態、各条件セットの `auto_execution` がその条件セットの有効状態です。
条件セット同士はOR、同じ条件セット内のフィルター同士はAND、同じフィルター内の値はORとして評価されます。
`meeting_type` が `ONLINE` の条件は、アップロードされた `OFFLINE` ミーティングにも一致します。
メンバー条件の値はメンバーAPIの `id` と突合できます。設定・フィルター・値の内部IDは返しません。

条件の値のうち、APIで参照できないリソースを指すものは省略されます。
カンパニー条件（`COMPANY_ID`）の値は `GET /v2/objects/{object}/records`（`object=company`）で参照できるレコードの `id` に対応します。
company は段階提供（Staged）のため、ワークスペースによっては CRM オブジェクト API の公開対象外です。
非公開カンパニーを対象にした条件は値が省略され、Frictioの画面に表示される条件より少なく見えることがあります。
クエリパラメータはサポートしていません。




## OpenAPI

````yaml /openapi.yaml get /v1/playbooks/{playbookId}/execution-setting
openapi: 3.1.0
info:
  title: Frictio Public API
  version: 1.0.0-beta
servers:
  - url: https://public-api.frictio.ai
security:
  - ApiKeyAuth: []
paths:
  /v1/playbooks/{playbookId}/execution-setting:
    get:
      summary: Get Playbook Execution Setting
      description: >
        指定したPlaybookの自動実行条件を取得します。

        Playbookや設定が非公開・無効であっても、同じワークスペースに存在すれば現在の設定を返します。

        `auto_execution` が設定全体の有効状態、各条件セットの `auto_execution` がその条件セットの有効状態です。

        条件セット同士はOR、同じ条件セット内のフィルター同士はAND、同じフィルター内の値はORとして評価されます。

        `meeting_type` が `ONLINE` の条件は、アップロードされた `OFFLINE` ミーティングにも一致します。

        メンバー条件の値はメンバーAPIの `id` と突合できます。設定・フィルター・値の内部IDは返しません。


        条件の値のうち、APIで参照できないリソースを指すものは省略されます。

        カンパニー条件（`COMPANY_ID`）の値は `GET
        /v2/objects/{object}/records`（`object=company`）で参照できるレコードの `id` に対応します。

        company は段階提供（Staged）のため、ワークスペースによっては CRM オブジェクト API の公開対象外です。

        非公開カンパニーを対象にした条件は値が省略され、Frictioの画面に表示される条件より少なく見えることがあります。

        クエリパラメータはサポートしていません。
      operationId: getPlaybookExecutionSetting
      parameters:
        - $ref: '#/components/parameters/workspaceId'
        - $ref: '#/components/parameters/playbookId'
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/PlaybookExecutionSetting'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/PlaybookExecutionSettingNotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    workspaceId:
      name: X-Workspace-Id
      in: header
      required: true
      description: ワークスペースID
      schema:
        type: string
      example: e1f2a3b4-...
    playbookId:
      name: playbookId
      in: path
      required: true
      description: Playbook ID
      schema:
        type: string
      example: d4e5f6a7-...
  schemas:
    PlaybookExecutionSetting:
      type: object
      description: Playbookの自動実行条件設定
      required:
        - playbook_id
        - auto_execution
        - condition_sets
      properties:
        playbook_id:
          type: string
          description: PlaybookID
          example: d4e5f6a7-...
        auto_execution:
          type: boolean
          description: 設定全体の自動実行が有効かどうか
          example: true
        condition_sets:
          type: array
          description: 自動実行条件のグループ。グループ同士はORとして評価されます。
          items:
            $ref: '#/components/schemas/PlaybookExecutionConditionSet'
    PlaybookExecutionConditionSet:
      type: object
      required:
        - label
        - auto_execution
        - meeting_type
        - filters
      properties:
        label:
          type: string
          description: 条件セットの表示名
          example: オンライン商談
        auto_execution:
          type: boolean
          description: この条件セットの自動実行が有効かどうか
          example: true
        meeting_type:
          type: string
          description: |
            対象となるミーティング種別。
            `ONLINE` は、オンラインミーティングに加えてアップロードされた `OFFLINE` ミーティングにも一致します。
          enum:
            - ONLINE
            - OFFLINE
            - TELEPHONE
          example: ONLINE
        filters:
          type: array
          description: 条件セット内のフィルター。フィルター同士はANDとして評価されます。
          items:
            $ref: '#/components/schemas/PlaybookExecutionFilter'
    Error:
      type: object
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          description: HTTPステータスコード
          example: 404
        message:
          type: string
          description: エラーメッセージ
          example: Meeting not found
        error:
          type: string
          description: |
            エラー種別。メッセージ文字列付きで例外が生成された場合のみ含まれます。
          example: Not Found
    PlaybookExecutionFilter:
      type: object
      required:
        - target_type
        - condition_type
        - values
      properties:
        target_type:
          type: string
          description: >
            条件の対象。`PARTICIPANT_WORKSPACE_MEMBER_ID` の値はメンバーAPIの `id`、

            `COMPANY_ID` の値は `GET
            /v2/objects/{object}/records`（`object=company`）の `id` です。

            company は段階提供（Staged）のため、ワークスペースによっては CRM オブジェクト API の公開対象外です。
          enum:
            - MEETING_TITLE
            - PARTICIPANT_NAME
            - PARTICIPANT_WORKSPACE_MEMBER_ID
            - PARTICIPANT_TEAM_ID
            - PARTICIPANT_COMPOSITION
            - COMPANY_ID
          example: MEETING_TITLE
        condition_type:
          type: string
          description: 条件の比較方法
          enum:
            - CONTAINS
            - IS
          example: CONTAINS
        values:
          type: array
          description: >
            比較値。同じフィルター内の値はORとして評価されます。


            APIで参照できないリソースを指す値は省略されます。

            `PARTICIPANT_WORKSPACE_MEMBER_ID`
            は削除済み・無効化済みのメンバー、`PARTICIPANT_TEAM_ID` は削除済みのチーム、

            `COMPANY_ID` は `GET
            /v2/objects/{object}/records`（`object=company`）で取得できないカンパニー（非公開・削除済み・段階提供対象外）が対象です。

            このため `values` が空配列になる場合や、実際の設定より少ない件数になる場合があります。
          items:
            type: string
          example:
            - 商談
  responses:
    BadRequest:
      description: クエリパラメータまたはIDの形式が不正です
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            message: Bad Request
            error: Bad Request
    Unauthorized:
      description: APIキーが無効、失効、期限切れ、または未指定です
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalidApiKey:
              summary: 無効な API キー
              value:
                statusCode: 401
                message: Invalid API key
                error: Unauthorized
            missingApiKey:
              summary: API キー未指定
              value:
                statusCode: 401
                message: Missing X-Api-Key header
                error: Unauthorized
    Forbidden:
      description: 権限エラー
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 403
            message: Forbidden
    PlaybookExecutionSettingNotFound:
      description: Playbookまたは自動実行設定が見つかりません
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 404
            message: Playbook execution setting not found
            error: Not Found
    TooManyRequests:
      description: レートリミット超過
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 429
            message: Too Many Requests
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.