ProductPlan Bars API

Manage bars (features/items) within roadmaps

OpenAPI Specification

productplan-bars-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: ProductPlan REST Bars API
  description: 'The ProductPlan REST API (v2) provides programmatic access to roadmaps, strategy (objectives and key results), discovery (ideas and opportunities), launch management, users, teams, and account status. It enables synchronization with internal systems and third-party tools such as Jira, GitHub, Slack, and Trello.

    '
  version: v2
  contact:
    name: ProductPlan Support
    url: https://docs.productplan.com/api/
  termsOfService: https://www.productplan.com/terms/
servers:
- url: https://app.productplan.com/api/v2
  description: ProductPlan production API
security:
- bearerAuth: []
tags:
- name: Bars
  description: Manage bars (features/items) within roadmaps
paths:
  /bars:
    post:
      operationId: createBar
      summary: Create a bar
      description: 'Creates a new bar (feature/item) within a specified roadmap. Bars represent work items on a roadmap timeline.

        '
      tags:
      - Bars
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BarCreate'
      responses:
        '201':
          description: Bar created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BarResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /bars/{id}:
    get:
      operationId: getBar
      summary: Retrieve a bar
      tags:
      - Bars
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: A single bar
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BarResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateBar
      summary: Update a bar
      tags:
      - Bars
      parameters:
      - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BarUpdate'
      responses:
        '200':
          description: Bar updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BarResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    delete:
      operationId: deleteBar
      summary: Delete a bar
      tags:
      - Bars
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: Bar deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /bars/{id}/child-bars:
    get:
      operationId: listChildBars
      summary: List child bars
      tags:
      - Bars
      parameters:
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/page_size'
      responses:
        '200':
          description: List of child bars
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BarList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /bars/{id}/comments:
    get:
      operationId: listBarComments
      summary: List comments on a bar
      tags:
      - Bars
      parameters:
      - $ref: '#/components/parameters/id'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/page_size'
      responses:
        '200':
          description: List of comments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /bars/{bar_id}/connections:
    get:
      operationId: listBarConnections
      summary: List connections for a bar
      tags:
      - Bars
      parameters:
      - name: bar_id
        in: path
        required: true
        schema:
          type: integer
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/page_size'
      responses:
        '200':
          description: List of connections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: createBarConnection
      summary: Create a connection for a bar
      tags:
      - Bars
      parameters:
      - name: bar_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionCreate'
      responses:
        '201':
          description: Connection created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /bars/{bar_id}/connections/{id}:
    delete:
      operationId: deleteBarConnection
      summary: Delete a connection
      tags:
      - Bars
      parameters:
      - name: bar_id
        in: path
        required: true
        schema:
          type: integer
      - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: Connection deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /bars/{bar_id}/links:
    get:
      operationId: listBarLinks
      summary: List links for a bar
      tags:
      - Bars
      parameters:
      - name: bar_id
        in: path
        required: true
        schema:
          type: integer
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/page_size'
      responses:
        '200':
          description: List of links
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: createBarLink
      summary: Create a link for a bar
      tags:
      - Bars
      parameters:
      - name: bar_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkCreate'
      responses:
        '201':
          description: Link created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
  /bars/{bar_id}/links/{id}:
    delete:
      operationId: deleteBarLink
      summary: Delete a link
      tags:
      - Bars
      parameters:
      - name: bar_id
        in: path
        required: true
        schema:
          type: integer
      - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: Link deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    ConnectionCreate:
      type: object
      required:
      - target_bar_id
      properties:
        target_bar_id:
          type: integer
    CustomDropdownField:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
    BarUpdate:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        starts_on:
          type: string
          format: date
        ends_on:
          type: string
          format: date
        strategic_value:
          type: string
        notes:
          type: string
        percent_done:
          type: integer
          minimum: 0
          maximum: 100
        tags:
          type: array
          items:
            type: string
        lane:
          type: string
        legend:
          type: string
        custom_text_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomTextField'
        custom_dropdown_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomDropdownField'
        parked:
          type: boolean
        container_bar_id:
          type: integer
    CommentList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Comment'
        meta:
          $ref: '#/components/schemas/Pagination'
    CustomTextField:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
    Bar:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        starts_on:
          type: string
          format: date
        ends_on:
          type: string
          format: date
        strategic_value:
          type: string
        notes:
          type: string
        percent_done:
          type: integer
          minimum: 0
          maximum: 100
        tags:
          type: array
          items:
            type: string
        lane:
          type: string
        legend:
          type: string
        is_container:
          type: boolean
        parked:
          type: boolean
        roadmap_id:
          type: integer
        container_bar_id:
          type: integer
          nullable: true
        custom_text_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomTextField'
        custom_dropdown_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomDropdownField'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Link:
      type: object
      properties:
        id:
          type: integer
        url:
          type: string
          format: uri
        title:
          type: string
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        errors:
          type: array
          items:
            type: string
    LinkList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Link'
        meta:
          $ref: '#/components/schemas/Pagination'
    BarCreate:
      type: object
      required:
      - name
      - roadmap_id
      properties:
        name:
          type: string
          description: Title of the bar
        roadmap_id:
          type: integer
          description: ID of the roadmap
        description:
          type: string
        starts_on:
          type: string
          format: date
        ends_on:
          type: string
          format: date
        strategic_value:
          type: string
        notes:
          type: string
        percent_done:
          type: integer
          minimum: 0
          maximum: 100
        tags:
          type: array
          items:
            type: string
        lane:
          type: string
        legend:
          type: string
        custom_text_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomTextField'
        custom_dropdown_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomDropdownField'
        is_container:
          type: boolean
          default: false
        parked:
          type: boolean
          default: true
        container_bar_id:
          type: integer
    LinkCreate:
      type: object
      required:
      - url
      properties:
        url:
          type: string
          format: uri
        title:
          type: string
    Pagination:
      type: object
      properties:
        current_page:
          type: integer
        page_size:
          type: integer
        total_count:
          type: integer
        total_pages:
          type: integer
    Comment:
      type: object
      properties:
        id:
          type: integer
        body:
          type: string
        user_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    BarList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Bar'
        meta:
          $ref: '#/components/schemas/Pagination'
    BarResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Bar'
    ConnectionList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Connection'
        meta:
          $ref: '#/components/schemas/Pagination'
    ConnectionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Connection'
    LinkResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Link'
    Connection:
      type: object
      properties:
        id:
          type: integer
        source_bar_id:
          type: integer
        target_bar_id:
          type: integer
        created_at:
          type: string
          format: date-time
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: Validation errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid authentication credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    id:
      name: id
      in: path
      required: true
      schema:
        type: integer
      description: The unique numeric identifier of the resource
    page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
      description: Page number (1-based)
    page_size:
      name: page_size
      in: query
      schema:
        type: integer
        default: 200
        maximum: 500
      description: Number of results per page (max 500)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Personal Access Token (64-character hash). Generate in ProductPlan under Settings > Integrations. Include as: Authorization: Bearer <token>

        '