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

# Sync Inventory Cluster Playbooks

> Render the cluster's inventory.ini and open (or update) its PR on
infra-playbooks.

Side-effecting rather than a write of inventory data, so it is gated on
``inventory:execute`` scoped to the cluster — the same verb as certificate
signing. ``?dryRun=true`` returns the rendered diff and touches nothing;
it overrides the body flag.



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json post /api/admin/inventory/{cluster_id}/playbooks-sync
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/admin/inventory/{cluster_id}/playbooks-sync:
    post:
      tags:
        - admin-inventory
      summary: Sync Inventory Cluster Playbooks
      description: >-
        Render the cluster's inventory.ini and open (or update) its PR on

        infra-playbooks.


        Side-effecting rather than a write of inventory data, so it is gated on

        ``inventory:execute`` scoped to the cluster — the same verb as
        certificate

        signing. ``?dryRun=true`` returns the rendered diff and touches nothing;

        it overrides the body flag.
      operationId: >-
        sync_inventory_cluster_playbooks_api_admin_inventory__cluster_id__playbooks_sync_post
      parameters:
        - name: cluster_id
          in: path
          required: true
          schema:
            type: string
            title: Cluster Id
        - name: dryRun
          in: query
          required: false
          schema:
            type: boolean
            title: Dryrun
            default: false
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/PlaybooksSyncRequest'
                - type: 'null'
              title: Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_PlaybooksSyncResult_'
        '401':
          description: Authorization failed
        '403':
          description: Insufficient permissions
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    PlaybooksSyncRequest:
      properties:
        dryRun:
          type: boolean
          title: Dryrun
          default: false
        resetBranch:
          type: boolean
          title: Resetbranch
          default: false
      additionalProperties: false
      type: object
      title: PlaybooksSyncRequest
      description: >-
        Render this cluster's inventory.ini and open/update its infra-playbooks
        PR.
    GenericResponse_PlaybooksSyncResult_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/PlaybooksSyncResult'
            - type: 'null'
          description: Response data
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Response status
      type: object
      title: GenericResponse[PlaybooksSyncResult]
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    PlaybooksSyncResult:
      properties:
        operationId:
          type: string
          title: Operationid
        targetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetid
        targetName:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetname
        message:
          type: string
          title: Message
        created:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created
        updated:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated
        assigned:
          anyOf:
            - type: integer
            - type: 'null'
          title: Assigned
        detached:
          anyOf:
            - type: integer
            - type: 'null'
          title: Detached
        retired:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retired
        dryRun:
          type: boolean
          title: Dryrun
        changed:
          type: boolean
          title: Changed
        repoConfigured:
          type: boolean
          title: Repoconfigured
          default: true
        repo:
          type: string
          title: Repo
        path:
          type: string
          title: Path
        branch:
          type: string
          title: Branch
        baseBranch:
          type: string
          title: Basebranch
        summary:
          items:
            type: string
          type: array
          title: Summary
          default: []
        warnings:
          items:
            type: string
          type: array
          title: Warnings
          default: []
        diff:
          anyOf:
            - type: string
            - type: 'null'
          title: Diff
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        commitSha:
          anyOf:
            - type: string
            - type: 'null'
          title: Commitsha
        prNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prnumber
        prUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Prurl
        prAction:
          anyOf:
            - type: string
            - type: 'null'
          title: Praction
      type: object
      required:
        - operationId
        - message
        - dryRun
        - changed
        - repo
        - path
        - branch
        - baseBranch
      title: PlaybooksSyncResult
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````