Rainforest QA folders API

Operations about folders

OpenAPI Specification

rainforest-qa-folders-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Rainforest callback folders API
  description: Nearly all interactions done in Rainforest can be done via the API. Find your API Token (for the CLIENT_TOKEN header field) on the integration settings page (https://app.rainforestqa.com/settings/integrations).
  version: '1'
servers:
- url: https://app.rainforestqa.com/api
security:
- api_key: []
tags:
- name: folders
  description: Operations about folders
paths:
  /1/folders:
    get:
      summary: List folders
      description: List folders
      parameters:
      - in: query
        name: page
        description: Page of results to display
        required: false
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: page_size
        description: 'Number of results to return per page; maximum: 100'
        required: false
        schema:
          type: integer
          format: int32
          default: 10
      - in: query
        name: title
        description: Filter by title (case-insensitive)
        required: false
        schema:
          type: string
      - in: query
        name: type
        description: Filter by type
        required: false
        schema:
          type: string
          enum:
          - filter
          - tag
      responses:
        '200':
          description: Folders retrieved
          headers:
            X-Total-Pages:
              description: Total pages
              schema:
                type: integer
            X-Current-Page:
              description: Current page
              schema:
                type: integer
            X-Per-Page:
              description: The maximum number of results per page
              schema:
                type: integer
            X-Total-Results:
              description: The total number of results
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SmartFolder'
      tags:
      - folders
      operationId: get-folders
      x-rdme-order: 1
    post:
      summary: Create a new folder
      description: Create a new folder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/post-folders'
        required: true
      responses:
        '201':
          description: Folder created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartFolder'
        '400':
          description: Could not create folder
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - folders
      operationId: post-folders
      x-rdme-order: 2
  /1/folders/{id}:
    get:
      summary: Get a folder
      description: Get folder details including a paginated list of tests
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: without_tests
        description: Return folder data without tests and test_count
        required: false
        schema:
          type: boolean
      - in: query
        name: page
        description: Page of results to display
        required: false
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: page_size
        description: 'Number of results to return per page; maximum: 100'
        required: false
        schema:
          type: integer
          format: int32
          default: 10
      responses:
        '200':
          description: Folder retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartFolder'
        '404':
          description: Folder not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - folders
      operationId: get-folder
      x-rdme-order: 10
    put:
      summary: Update a folder
      description: Update a folder
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/put-folder'
        required: true
      responses:
        '200':
          description: Folder updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartFolder'
        '400':
          description: Could not update folder
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Folder not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - folders
      operationId: put-folder
      x-rdme-order: 11
    delete:
      summary: Delete a folder
      description: Delete a folder
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Folder deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmartFolder'
        '404':
          description: Folder not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - folders
      operationId: delete-folder
      x-rdme-order: 12
components:
  schemas:
    SmartFolder:
      type: object
      properties:
        id:
          type: integer
          format: int32
        created_at:
          type: string
          format: date-time
        title:
          type: string
        type:
          type: string
          enum:
          - filter
          - tag
        logic:
          type: array
          items:
            type: object
          example:
          - expression:
              tag: foo
              inclusive: true
          - operation: and
          - expression:
              tag: bar
              inclusive: false
          - operation: or
          - expression:
              tag: baz
              inclusive: true
        filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
          example:
          - owner_id: 117
          - priority: P1
        test_count:
          type: integer
          format: int32
        tests:
          type: array
          items:
            $ref: '#/components/schemas/Tests_Index'
        updated_at:
          type: string
          format: date-time
      required:
      - title
      - type
      - logic
      - filters
      - updated_at
      description: SmartFolder model
    Tests_Index:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
        test_id:
          type: string
        title:
          type: string
        result:
          type: string
        wisp:
          type: string
        prompt:
          type: string
        prompt_credentials:
          type: string
        ai_mode:
          type: string
        state:
          type: string
        category:
          type: string
        site_id:
          type: string
        priority:
          type: string
        start_uri:
          type: string
        description:
          type: string
        browsers:
          $ref: '#/components/schemas/RunTestBrowserStatus'
        tags:
          type: string
        frontend_url:
          type: string
        rfml_id:
          type: string
        exploratory_run_id:
          type: string
        initial_redirect_behavior:
          type: string
        source:
          type: string
        reroute_geo:
          type: string
          description: 'Deprecated: please use `connection.id` instead'
        connection:
          $ref: '#/components/schemas/Connection'
        atc_settings:
          type: string
        owner:
          $ref: '#/components/schemas/UserLite'
        last_updated_by:
          $ref: '#/components/schemas/UserLite'
        updated_at:
          type: string
        archived_at:
          type: string
        deleted:
          type: string
        attached_to:
          $ref: '#/components/schemas/Tests_Lite'
        dry_run_url:
          type: string
        last_run:
          $ref: '#/components/schemas/RunSuperLite'
        feature_id:
          type: string
        has_wisp:
          type: string
        type:
          type: string
        coverage_summary:
          type: string
        used_in_snippets_count:
          type: string
        used_in_tests_count:
          type: string
        used_in_archived_snippets_count:
          type: string
        used_in_archived_tests_count:
          type: string
        self_healed_at:
          type: string
        last_run_test:
          type: object
          properties:
            self_healed:
              type: string
            rescued:
              type: string
    Filter:
      type: object
      properties:
        query:
          type: string
        step_query:
          type: string
        owner_id:
          type: integer
          format: int32
        result:
          type: string
          enum:
          - passed
          - failed
        feature_id:
          type: integer
          format: int32
        run_group_id:
          type: integer
          format: int32
        priority:
          type: string
          enum:
          - P1
          - P2
          - P3
          - not_prioritized
        embedded:
          type: boolean
        state:
          type: string
          enum:
          - enabled
          - disabled
          - draft
        site_id:
          type: integer
          format: int32
        category:
          type: string
          enum:
          - site
          - app
        variable:
          type: string
        exploratory_run_id:
          type: integer
          format: int32
        test_language:
          type: string
          enum:
          - plain_english
          - rainforest_test_language
        has_comments:
          type: boolean
    Error:
      type: object
      properties:
        error:
          type: string
          description: An error message describing what went wrong
      required:
      - error
      description: Error model
    OverriddenResult:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        note:
          type: string
        result:
          type: string
        job_group_id:
          type: string
        user:
          $ref: '#/components/schemas/UserLite'
    UserLite:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        name:
          type: string
        email:
          type: string
        state:
          type: string
        role:
          type: string
    put-folder:
      type: object
      properties:
        without_tests:
          type: boolean
          description: Return folder data without tests and test_count
        title:
          type: string
          description: The title of the folder
        logic:
          type: array
          description: An array of alternating tag expressions and operations. Must have an odd number of elements.
          example:
          - expression:
              tag: foo
              inclusive: true
          - operation: and
          - expression:
              tag: bar
              inclusive: false
          - operation: or
          - expression:
              tag: baz
              inclusive: true
          items:
            type: object
            properties:
              operation:
                type: string
                enum:
                - and
                - or
              expression:
                type: object
                properties:
                  tag:
                    type: string
                    description: The name of the tag
                  inclusive:
                    type: boolean
                    description: Whether to filter for tests tagged or untagged with the given tag
                required:
                - tag
                - inclusive
        filters:
          type: array
          description: An array of filters. Each filter must have one key. Keys may not be reused across filters.
          example:
          - owner_id: 117
          - priority: P1
          items:
            type: object
            properties:
              category:
                type: string
                description: Only select tests with this category
                enum:
                - app
                - site
              exploratory_run_id:
                type: integer
                format: int32
                description: Only select created in this exploratory run
              feature_id:
                type: array
                description: Only select tests with this/these feature(s); use `-1` to filter for tests without a feature
                items:
                  type: integer
                  format: int32
              priority:
                type: string
                description: Only select tests with this priority
                enum:
                - P1
                - P2
                - P3
                - ''
                - not_prioritized
              query:
                type: string
                description: Only select tests whose title contains, or ID matches, this string
              result:
                type: string
                description: Only select tests with a specific result
                enum:
                - passed
                - failed
                - no_result
              run_group_id:
                type: integer
                format: int32
                description: Only select tests in this run group; use `-1` to filter for tests not in any run groups
              site_id:
                type: array
                description: Only select tests for this/these site(s)
                items:
                  type: integer
                  format: int32
              state:
                type: array
                description: Only select tests that with this state
                items:
                  type: string
                  enum:
                  - enabled
                  - disabled
                  - draft
                  - archived
                  - all
                  - unarchived
              step_query:
                type: string
                description: Only select tests whose steps match this string
              tests:
                type: string
                description: Only select tests matching this criteria. Can be comma-separated list of test ids or 'all' to select all tests
              type:
                type: string
                description: Only select tests of this type
                enum:
                - snippet
                - test
              run_id:
                type: array
                description: Only select tests that were in this/these previous run(s)
                items:
                  type: integer
                  format: int32
              variable:
                type: string
                description: Only select tests that contain given variable
              embedded:
                type: boolean
                description: If true, only select tests that are embedded in other tests. If false, only select tests that are not embedded in other tests.
              owner_id:
                type: integer
                format: int32
                description: Only select tests owned by this user; use `-1` to filter for tests without an owner
              test_language:
                type: string
                description: Only select tests with a specified language
                enum:
                - plain_english
                - rainforest_test_language
              has_comments:
                type: string
      description: Update a folder
    Connection:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        name:
          type: string
        api_token:
          type: string
        state:
          type: string
        link_state:
          type: string
        type:
          type: string
          enum:
          - rainforest
          - user
      description: Connection model
    RunSuperLite:
      type: object
      properties:
        id:
          type: integer
          format: int32
        created_at:
          type: string
          format: date-time
        state:
          type: string
    RunTestBrowserStatus:
      type: object
      properties:
        id:
          type: integer
          format: int32
        created_at:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
        category:
          type: string
        result:
          type: string
        state:
          type: string
        overridden_results:
          $ref: '#/components/schemas/OverriddenResult'
        credit_cost:
          type: string
    Tests_Lite:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
        test_id:
          type: string
        title:
          type: string
        result:
          type: string
        wisp:
          type: string
        prompt:
          type: string
        prompt_credentials:
          type: string
        ai_mode:
          type: string
        priority:
          type: string
        real_cost_to_run:
          type: string
        owner_id:
          type: string
        state:
          type: string
        updated_at:
          type: string
        deleted:
          type: string
        feature_id:
          type: string
    post-folders:
      type: object
      properties:
        without_tests:
          type: boolean
          description: Return folder data without tests and test_count
        title:
          type: string
          description: The title of the folder
        logic:
          type: array
          description: An array of alternating tag expressions and operations. Must have an odd number of elements.
          example:
          - expression:
              tag: foo
              inclusive: true
          - operation: and
          - expression:
              tag: bar
              inclusive: false
          - operation: or
          - expression:
              tag: baz
              inclusive: true
          items:
            type: object
            properties:
              operation:
                type: string
                enum:
                - and
                - or
              expression:
                type: object
                properties:
                  tag:
                    type: string
                    description: The name of the tag
                  inclusive:
                    type: boolean
                    description: Whether to filter for tests tagged or untagged with the given tag
                required:
                - tag
                - inclusive
        filters:
          type: array
          description: An array of filters. Each filter must have one key. Keys may not be reused across filters.
          example:
          - owner_id: 117
          - priority: P1
          items:
            type: object
            properties:
              category:
                type: string
                description: Only select tests with this category
                enum:
                - app
                - site
              exploratory_run_id:
                type: integer
                format: int32
                description: Only select created in this exploratory run
              feature_id:
                type: array
                description: Only select tests with this/these feature(s); use `-1` to filter for tests without a feature
                items:
                  type: integer
                  format: int32
              priority:
                type: string
                description: Only select tests with this priority
                enum:
                - P1
                - P2
                - P3
                - ''
                - not_prioritized
              query:
                type: string
                description: Only select tests whose title contains, or ID matches, this string
              result:
                type: string
                description: Only select tests with a specific result
                enum:
                - passed
                - failed
                - no_result
              run_group_id:
                type: integer
                format: int32
                description: Only select tests in this run group; use `-1` to filter for tests not in any run groups
              site_id:
                type: array
                description: Only select tests for this/these site(s)
                items:
                  type: integer
                  format: int32
              state:
                type: array
                description: Only select tests that with this state
                items:
                  type: string
                  enum:
                  - enabled
                  - disabled
                  - draft
                  - archived
                  - all
                  - unarchived
              step_query:
                type: string
                description: Only select tests whose steps match this string
              tests:
                type: string
                description: Only select tests matching this criteria. Can be comma-separated list of test ids or 'all' to select all tests
              type:
                type: string
                description: Only select tests of this type
                enum:
                - snippet
                - test
              run_id:
                type: array
                description: Only select tests that were in this/these previous run(s)
                items:
                  type: integer
                  format: int32
              variable:
                type: string
                description: Only select tests that contain given variable
              embedded:
                type: boolean
                description: If true, only select tests that are embedded in other tests. If false, only select tests that are not embedded in other tests.
              owner_id:
                type: integer
                format: int32
                description: Only select tests owned by this user; use `-1` to filter for tests without an owner
              test_language:
                type: string
                description: Only select tests with a specified language
                enum:
                - plain_english
                - rainforest_test_language
              has_comments:
                type: string
      required:
      - title
      description: Create a new folder
  securitySchemes:
    api_key:
      type: apiKey
      name: CLIENT_TOKEN
      in: header