Mabl Test Generation API

The TestGeneration API from Mabl — 1 operation(s) for testgeneration.

Business capability
Software Quality Engineering BC-4200.50

Operations 1

POST /generate/steps Generate test steps #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mabl:mabl-testgeneration-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mabl-testgeneration-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: mabl Test Generation API
  description: APIs for interacting with mabl services
  version: 0.599.3.1792436330
  x-readme-id: 62c896636916ce01d2ff4f5a
servers:
- url: /
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: TestGeneration
paths:
  /generate/steps:
    post:
      tags:
      - TestGeneration
      summary: Generate test steps
      description: Generate test steps from the given context information
      operationId: generateSteps
      parameters:
      - name: workspaceId
        in: query
        description: The ID for the workspace
        required: true
        style: form
        explode: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StepGenerationRequest'
        required: true
      responses:
        '200':
          description: The resulting test steps
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StepGenerationResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse400'
        '401':
          $ref: '#/components/responses/ErrorResponse401'
        default:
          $ref: '#/components/responses/ErrorResponse'
      x-mabl-action: Run::AiGeneration
components:
  schemas:
    OAuth1Authentication:
      type: object
      properties:
        add_parameters_to_header:
          type: boolean
        add_empty_parameters_to_signature:
          type: boolean
        callback_url:
          type: string
        consumer_key:
          type: string
        consumer_secret:
          type: string
        include_body_hash:
          type: boolean
        nonce:
          type: string
        realm:
          type: string
        signature_method:
          type: string
          enum:
          - HMAC-SHA1
          - HMAC-SHA256
          - HMAC-SHA512
          - RSA-SHA1
          - RSA-SHA256
          - RSA-SHA512
          - PLAINTEXT
        timestamp:
          type: string
        token:
          type: string
        token_secret:
          type: string
        verifier:
          type: string
        version:
          type: string
      description: Configuration for OAuth 1.0 authentication
    SnippetTypeEnum:
      type: string
      enum:
      - css
      - javascript
      - xpath
      - sql
      - postman
    ExecutableSnippet:
      type: object
      properties:
        invariant_id:
          maxLength: 50
          type: string
          description: Object ID for the parent type. Set by system.
        description:
          type: string
          description: Summary of the Snippet
        name:
          type: string
          description: The display name of the Snippet
        body:
          type: string
          description: the base64 encoded body of the Snippet
        snippet_type:
          $ref: '#/components/schemas/SnippetTypeEnum'
        reusable:
          type: boolean
          description: Indicates whether the snippet is reusable
        workspace_id:
          type: string
          description: The ID of the workspace that this Snippet belongs to
      description: Fields necessary to execute a snippet in a test or flow
    BasicAuthentication:
      type: object
      properties:
        username:
          type: string
          description: The username to use for authentication
        password:
          type: string
          description: The password to use for authentication
      description: Configuration for basic authentication
    GuardrailApprovalKind:
      type: string
      description: Who decides a guardrail approval. SELF is decided by the person the agent acts for; WORKSPACE, for an agent acting for an API key, by a workspace owner or editor.
      enum:
      - SELF
      - WORKSPACE
    BearerAuthentication:
      type: object
      properties:
        token:
          type: string
          description: The token to use for authentication
      description: Configuration for bearer authentication
    OAuth2Authentication:
      required:
      - access_token_url
      - client_credentials_location
      - client_id
      - client_secret
      - grant_type
      - token_variable
      type: object
      properties:
        access_token_url:
          type: string
        client_credentials_location:
          type: string
          enum:
          - basic_auth_header
          - body
        client_id:
          type: string
        client_secret:
          type: string
        grant_type:
          type: string
          enum:
          - client_credentials
        scope:
          type: string
        token_variable:
          type: string
          description: The OAuth token will be stored to this variable
      description: Configuration for OAuth 2.0 authentication
    Step:
      type: object
      properties:
        intent:
          type: string
          description: The intent of this test interaction
        stepType:
          type: string
          description: The type of step
          enum:
          - step_group
          - assert_step
          - flow
          - api_test_step
      description: A single interaction in a test
      discriminator:
        propertyName: stepType
        mapping:
          step_group: '#/components/schemas/StepGroup'
          assert_step: '#/components/schemas/AssertStep'
          flow: '#/components/schemas/FlowStep'
          api_test_step: '#/components/schemas/ApiTestStep'
    ApiAuthentication:
      required:
      - type
      type: object
      properties:
        type:
          type: string
          description: The authentication type to use
          enum:
          - apikey
          - basic
          - bearer
          - noauth
          - oauth1
          - oauth2
        api_key:
          $ref: '#/components/schemas/ApiKeyAuthentication'
        basic:
          $ref: '#/components/schemas/BasicAuthentication'
        bearer:
          $ref: '#/components/schemas/BearerAuthentication'
        oauth1:
          $ref: '#/components/schemas/OAuth1Authentication'
        oauth2:
          $ref: '#/components/schemas/OAuth2Authentication'
      description: Configuration for API authentication
    TestTypeEnum:
      type: string
      description: Type of test
      enum:
      - api
      - browser
      - performance
      - mobile
      - desktop
      x-mabl-scope: public
    TestCreationContext:
      type: object
      properties:
        applicationId:
          type: string
          description: The ID of the application being used for training the test
        environmentId:
          type: string
          description: The ID of the environment being used for training the test
        sessionId:
          type: string
          description: The ID of the current test creation session
        testInvariantId:
          type: string
          description: The invariant ID of the test
        testRunId:
          type: string
          description: The ID of the test run
        url:
          type: string
          description: The URL being used for training the test, if a web test
        testType:
          $ref: '#/components/schemas/TestTypeEnum'
        mobilePlatform:
          $ref: '#/components/schemas/MobilePlatformEnum'
        api_description:
          type: string
          description: The description of the API being used for training the test, if an API test.
        variables:
          type: object
          additionalProperties:
            type: string
          description: Key-value object containing the variables available for use in the test
        step_id:
          type: string
          description: The ID of the step
        step_context:
          type: object
          additionalProperties:
            type: string
          description: Key-value object containing the metadata about the step
        training_session_id:
          type: string
          description: The ID of the training session
      description: The context of the test creation and training session
    GuardrailApprovalRef:
      type: object
      properties:
        id:
          type: string
          description: The approval's id.
        state:
          description: Where the approval stands.
          allOf:
          - $ref: '#/components/schemas/GuardrailApprovalState'
        kind:
          description: Who decides the approval.
          allOf:
          - $ref: '#/components/schemas/GuardrailApprovalKind'
        request_expires_time:
          type: integer
          description: When the approval expires if nobody decides it, in epoch milliseconds.
          format: int64
        url:
          type: string
          description: The mabl app page where a person reviews the approval.
      description: 'An approval a guardrail policy asks for. While it is PENDING, stop: give the person the url, tell them the request is waiting for approval, and do not repeat the request or poll in a loop. Once a person tells you it is APPROVED, repeat the identical request with the header X-Mabl-Approval set to id. DENIED means a person said no, so do not work around it.'
    ErrorResponseGeneric:
      type: object
      properties:
        id:
          type: string
          x-mabl-scope: public
        code:
          maximum: 599
          minimum: 100
          type: integer
          format: int32
          x-mabl-scope: public
        message:
          type: string
          x-mabl-scope: public
        error_code:
          type: string
          description: Machine-readable reason for the error, present only when the API names one. Values are guardrail_blocked (a guardrail policy refused an agent request), approval_required (a guardrail policy requires a person to approve the request first).
        guardrail:
          description: The guardrail policy that refused the request; present only when error_code is guardrail_blocked or approval_required.
          allOf:
          - $ref: '#/components/schemas/GuardrailRefusal'
    MobilePlatformEnum:
      type: string
      description: The mobile platform associated with this object
      enum:
      - android
      - ios
      x-mabl-scope: public
    StepGenerationRequest:
      type: object
      properties:
        intent:
          type: string
          description: The intent of the test as plain text
        context:
          $ref: '#/components/schemas/TestCreationContext'
      description: Request to generate test steps
    ApiKeyAuthentication:
      type: object
      properties:
        location:
          type: string
          description: The location of the API key
          enum:
          - header
          - query
        key:
          type: string
          description: The key to use for authentication
        value:
          type: string
          description: The value to use for authentication
      description: Configuration for API key authentication
    GuardrailRefusal:
      type: object
      properties:
        id:
          type: string
          description: The id of the guardrail policy that decided the refusal.
        reason:
          type: string
          description: Why the policy refuses the request, written for the person the agent acts for.
        decision_id:
          type: string
          description: The id of this decision in the guardrail decision log.
        action:
          type: string
          description: The action the request was evaluated as, written Verb::Resource (for example Delete::Test), as declared by the operation's x-mabl-action extension.
        policy_source:
          type: string
          description: 'Who set the deciding policy: workspace for a rule the workspace''s owners wrote, account for a rule set for the workspace''s account, mabl_agent_type for the agent type''s ceiling, and mabl_default for mabl''s own defaults.'
        approval:
          description: The approval for this request; present when error_code is approval_required and the approval could be recorded. Without it the request cannot be approved.
          allOf:
          - $ref: '#/components/schemas/GuardrailApprovalRef'
      description: The guardrail policy that refused an agent request.
    GuardrailApprovalState:
      type: string
      description: Where a guardrail approval stands. PENDING awaits a decision and expires undecided after 24 hours; APPROVED lets the agent repeat the request, as often as it does, for 20 minutes; DENIED refuses the same request for 20 minutes after the decision, after which asking again opens a new approval; CANCELLED means a person withdrew it while pending or revoked it while approved. EXPIRED and CANCELLED are final.
      enum:
      - PENDING
      - APPROVED
      - DENIED
      - EXPIRED
      - CANCELLED
    ApiConfiguration:
      type: object
      properties:
        authentication:
          $ref: '#/components/schemas/ApiAuthentication'
        pre_request_snippets:
          type: array
          description: Snippets to execute before the request
          items:
            $ref: '#/components/schemas/ExecutableSnippet'
        post_request_snippets:
          type: array
          description: Snippets to execute after the request
          items:
            $ref: '#/components/schemas/ExecutableSnippet'
      description: Configuration of the API test type.
    StepGenerationResponse:
      type: object
      properties:
        api_test_configuration:
          $ref: '#/components/schemas/ApiConfiguration'
        steps:
          type: array
          description: The steps generated
          items:
            $ref: '#/components/schemas/Step'
        prompt_id:
          type: string
          description: The ID of the prompt used to generate the steps
        session_id:
          type: string
          description: The ID of the generation session
      description: Response from generating test steps
  responses:
    ErrorResponse400:
      description: Invalid or missing parameter
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseGeneric'
    ErrorResponse:
      description: Unknown error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseGeneric'
    ErrorResponse401:
      description: User not authenticated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseGeneric'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: apiKey
      name: Authorization
      in: header