Rainforest QA features API

Operations about features

OpenAPI Specification

rainforest-qa-features-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Rainforest callback features 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: features
  description: Operations about features
paths:
  /1/features:
    get:
      summary: List features
      description: List features
      parameters:
      - in: query
        name: title
        description: Filter by title (case-insensitive)
        required: false
        schema:
          type: string
      - 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: sort[][title]
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - asc
            - desc
      - in: query
        name: sort[][updated_at]
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - asc
            - desc
      responses:
        '200':
          description: Features 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/Feature'
      tags:
      - features
      operationId: get-features
      x-rdme-order: 1
    post:
      summary: Create a new feature
      description: Create a new feature
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/post-features'
        required: true
      responses:
        '201':
          description: Feature created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
        '400':
          description: Feature could not be created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - features
      operationId: post-features
      x-rdme-order: 2
  /1/features/{id}:
    get:
      summary: Get a feature
      description: Get a feature
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Feature retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
        '404':
          description: Feature not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - features
      operationId: get-feature
      x-rdme-order: 10
    put:
      summary: Update a feature
      description: Update a feature
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/put-feature'
        required: true
      responses:
        '200':
          description: Feature updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
        '400':
          description: Feature could not be updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Feature not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - features
      operationId: put-feature
      x-rdme-order: 11
    delete:
      summary: Delete a feature
      description: Delete a feature
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Feature deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
        '404':
          description: Feature not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - features
      operationId: delete-feature
      x-rdme-order: 12
  /1/features/{id}/tests:
    post:
      summary: Add tests to a feature
      description: Add tests to a feature
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/post-feature-tests'
        required: true
      responses:
        '201':
          description: Tests added to feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
        '400':
          description: Can't add snippets to a Feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Feature not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - features
      operationId: post-feature-tests
      x-rdme-order: 13
    delete:
      summary: Remove tests from a feature
      description: Remove tests from a feature
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: category
        description: Only return tests with this category
        required: false
        schema:
          type: string
          enum:
          - app
          - site
      - in: query
        name: exploratory_run_id
        description: Only return created in this exploratory run
        required: false
        schema:
          type: integer
          format: int32
      - in: query
        name: priority
        description: Only return tests with this priority
        required: false
        schema:
          type: string
          enum:
          - P1
          - P2
          - P3
          - ''
          - not_prioritized
      - in: query
        name: query
        description: Only return tests whose title contains, or ID matches, this string
        required: false
        schema:
          type: string
      - in: query
        name: result
        description: Only return tests with a specific result
        required: false
        schema:
          type: string
          enum:
          - passed
          - failed
          - no_result
      - in: query
        name: run_group_id
        description: Only return tests in this run group; use `-1` to filter for tests not in any run groups
        required: false
        schema:
          type: integer
          format: int32
      - in: query
        name: smart_folder_id
        description: Only return tests in this saved filter
        required: false
        schema:
          type: integer
          format: int32
      - in: query
        name: step_query
        description: Only return tests whose steps match this string
        required: false
        schema:
          type: string
      - in: query
        name: tests
        description: Only return tests matching this criteria. Can be comma-separated list of test ids or 'all' to return all tests
        required: false
        schema:
          type: string
      - in: query
        name: type
        description: Only return tests of this type
        required: false
        schema:
          type: string
          enum:
          - snippet
          - test
      - in: query
        name: variable
        description: Only return tests that contain given variable
        required: false
        schema:
          type: string
      - in: query
        name: embedded
        description: If true, only return tests that are embedded in other tests. If false, only return tests that are not embedded in other tests.
        required: false
        schema:
          type: boolean
      - in: query
        name: owner_id
        description: Only return tests owned by this user; use `-1` to filter for tests without an owner
        required: false
        schema:
          type: integer
          format: int32
      - in: query
        name: test_language
        description: Only return tests with a specified language
        required: false
        schema:
          type: string
          enum:
          - plain_english
          - rainforest_test_language
      - in: query
        name: feature_id[]
        description: Only return tests with this/these feature(s); use `-1` to filter for tests without a feature
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
            format: int32
      - in: query
        name: site_id[]
        description: Only return tests for this/these site(s)
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
            format: int32
      - in: query
        name: state[]
        description: Only return tests that with this state
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - enabled
            - disabled
            - draft
            - archived
            - all
            - unarchived
      - in: query
        name: tags[]
        description: Only return tests having all specified tags; use `-1` to filter for untagged tests
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
      - in: query
        name: run_id[]
        description: Only return tests that were in this/these previous run(s)
        required: false
        style: form
        explode: false
        schema:
          type: array
          items:
            type: integer
            format: int32
      responses:
        '200':
          description: Tests removed from feature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Feature'
        '404':
          description: Feature not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - features
      operationId: delete-feature-tests
      x-rdme-order: 14
components:
  schemas:
    put-feature:
      type: object
      properties:
        title:
          type: string
          description: The new title of the feature
      required:
      - title
      description: Update a feature
    post-features:
      type: object
      properties:
        title:
          type: string
          description: The title of the feature
      required:
      - title
      description: Create a new feature
    Error:
      type: object
      properties:
        error:
          type: string
          description: An error message describing what went wrong
      required:
      - error
      description: Error model
    post-feature-tests:
      type: object
      properties:
        category:
          type: string
          description: Only return tests with this category
          enum:
          - app
          - site
        exploratory_run_id:
          type: integer
          format: int32
          description: Only return created in this exploratory run
        feature_id:
          type: array
          description: Only return 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 return tests with this priority
          enum:
          - P1
          - P2
          - P3
          - ''
          - not_prioritized
        query:
          type: string
          description: Only return tests whose title contains, or ID matches, this string
        result:
          type: string
          description: Only return tests with a specific result
          enum:
          - passed
          - failed
          - no_result
        run_group_id:
          type: integer
          format: int32
          description: Only return tests in this run group; use `-1` to filter for tests not in any run groups
        site_id:
          type: array
          description: Only return tests for this/these site(s)
          items:
            type: integer
            format: int32
        smart_folder_id:
          type: integer
          format: int32
          description: Only return tests in this saved filter
        state:
          type: array
          description: Only return tests that with this state
          items:
            type: string
            enum:
            - enabled
            - disabled
            - draft
            - archived
            - all
            - unarchived
        step_query:
          type: string
          description: Only return tests whose steps match this string
        tags:
          type: array
          description: Only return tests having all specified tags; use `-1` to filter for untagged tests
          items:
            type: string
        tests:
          type: string
          description: Only return tests matching this criteria. Can be comma-separated list of test ids or 'all' to return all tests
        run_id:
          type: array
          description: Only return tests that were in this/these previous run(s)
          items:
            type: integer
            format: int32
        variable:
          type: string
          description: Only return tests that contain given variable
        embedded:
          type: boolean
          description: If true, only return tests that are embedded in other tests. If false, only return tests that are not embedded in other tests.
        owner_id:
          type: integer
          format: int32
          description: Only return tests owned by this user; use `-1` to filter for tests without an owner
        test_language:
          type: string
          description: Only return tests with a specified language
          enum:
          - plain_english
          - rainforest_test_language
      description: Add tests to a feature
    Feature:
      type: object
      properties:
        id:
          type: integer
          format: int32
        created_at:
          type: string
          format: date-time
        title:
          type: string
        test_count:
          type: integer
          format: int32
        updated_at:
          type: string
          format: date-time
      required:
      - title
      - test_count
      description: Feature model
  securitySchemes:
    api_key:
      type: apiKey
      name: CLIENT_TOKEN
      in: header