BigML Supervised Learning API

Logistic regression, linear regression, and deep neural network models

OpenAPI Specification

bigml-supervised-learning-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: BigML REST Anomaly Detection Supervised Learning API
  description: 'The BigML REST API provides programmatic access to the full BigML machine learning platform. Create and manage sources, datasets, models, ensembles, clusters, anomaly detectors, topic models, time series forecasters, deepnets, linear and logistic regression models, PCA, and generate predictions — both individual and batch — over HTTPS using username and API key authentication.

    '
  version: 1.0.0
  contact:
    name: BigML Support
    url: https://support.bigml.com/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-api-id: bigml:bigml-api
  x-provider: https://bigml.com/
servers:
- url: https://bigml.io/andromeda
  description: BigML production API (use username/api_key query params)
security:
- ApiKeyAuth: []
tags:
- name: Supervised Learning
  description: Logistic regression, linear regression, and deep neural network models
paths:
  /logisticregression:
    get:
      summary: List Logistic Regression Models
      operationId: listLogisticRegressions
      tags:
      - Supervised Learning
      parameters:
      - $ref: '#/components/parameters/username'
      - $ref: '#/components/parameters/apiKey'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: List of logistic regression models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
    post:
      summary: Create a Logistic Regression Model
      operationId: createLogisticRegression
      tags:
      - Supervised Learning
      parameters:
      - $ref: '#/components/parameters/username'
      - $ref: '#/components/parameters/apiKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - dataset
              properties:
                dataset:
                  type: string
                objective_field:
                  type: string
      responses:
        '201':
          description: Logistic regression model created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogisticRegression'
  /logisticregression/{resource_id}:
    parameters:
    - $ref: '#/components/parameters/resourceId'
    - $ref: '#/components/parameters/username'
    - $ref: '#/components/parameters/apiKey'
    get:
      summary: Get a Logistic Regression Model
      operationId: getLogisticRegression
      tags:
      - Supervised Learning
      responses:
        '200':
          description: Logistic regression details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogisticRegression'
    put:
      summary: Update a Logistic Regression Model
      operationId: updateLogisticRegression
      tags:
      - Supervised Learning
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Logistic regression updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogisticRegression'
    delete:
      summary: Delete a Logistic Regression Model
      operationId: deleteLogisticRegression
      tags:
      - Supervised Learning
      responses:
        '204':
          description: Logistic regression deleted
  /linearregression:
    get:
      summary: List Linear Regression Models
      operationId: listLinearRegressions
      tags:
      - Supervised Learning
      parameters:
      - $ref: '#/components/parameters/username'
      - $ref: '#/components/parameters/apiKey'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: List of linear regression models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
    post:
      summary: Create a Linear Regression Model
      operationId: createLinearRegression
      tags:
      - Supervised Learning
      parameters:
      - $ref: '#/components/parameters/username'
      - $ref: '#/components/parameters/apiKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - dataset
              properties:
                dataset:
                  type: string
                objective_field:
                  type: string
      responses:
        '201':
          description: Linear regression model created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinearRegression'
  /linearregression/{resource_id}:
    parameters:
    - $ref: '#/components/parameters/resourceId'
    - $ref: '#/components/parameters/username'
    - $ref: '#/components/parameters/apiKey'
    get:
      summary: Get a Linear Regression Model
      operationId: getLinearRegression
      tags:
      - Supervised Learning
      responses:
        '200':
          description: Linear regression details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinearRegression'
    put:
      summary: Update a Linear Regression Model
      operationId: updateLinearRegression
      tags:
      - Supervised Learning
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Linear regression updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinearRegression'
    delete:
      summary: Delete a Linear Regression Model
      operationId: deleteLinearRegression
      tags:
      - Supervised Learning
      responses:
        '204':
          description: Linear regression deleted
  /deepnet:
    get:
      summary: List Deepnets
      operationId: listDeepnets
      tags:
      - Supervised Learning
      parameters:
      - $ref: '#/components/parameters/username'
      - $ref: '#/components/parameters/apiKey'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: List of deepnets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
    post:
      summary: Create a Deepnet
      operationId: createDeepnet
      tags:
      - Supervised Learning
      parameters:
      - $ref: '#/components/parameters/username'
      - $ref: '#/components/parameters/apiKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - dataset
              properties:
                dataset:
                  type: string
                objective_field:
                  type: string
      responses:
        '201':
          description: Deepnet created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deepnet'
  /deepnet/{resource_id}:
    parameters:
    - $ref: '#/components/parameters/resourceId'
    - $ref: '#/components/parameters/username'
    - $ref: '#/components/parameters/apiKey'
    get:
      summary: Get a Deepnet
      operationId: getDeepnet
      tags:
      - Supervised Learning
      responses:
        '200':
          description: Deepnet details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deepnet'
    put:
      summary: Update a Deepnet
      operationId: updateDeepnet
      tags:
      - Supervised Learning
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Deepnet updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deepnet'
    delete:
      summary: Delete a Deepnet
      operationId: deleteDeepnet
      tags:
      - Supervised Learning
      responses:
        '204':
          description: Deepnet deleted
components:
  schemas:
    ResourceStatus:
      type: object
      properties:
        code:
          type: integer
          description: HTTP-style status code (1=queued,2=started,3=waiting,4=processing,5=finished,0=unknown,-1=failed)
        message:
          type: string
        elapsed:
          type: number
          description: Processing time in milliseconds.
    Deepnet:
      allOf:
      - $ref: '#/components/schemas/ResourceBase'
      - type: object
        properties:
          dataset:
            type: string
          objective_field:
            type: string
          network:
            type: object
    LinearRegression:
      allOf:
      - $ref: '#/components/schemas/ResourceBase'
      - type: object
        properties:
          dataset:
            type: string
          objective_field:
            type: string
          coefficients:
            type: array
            items:
              type: number
    LogisticRegression:
      allOf:
      - $ref: '#/components/schemas/ResourceBase'
      - type: object
        properties:
          dataset:
            type: string
          objective_field:
            type: string
          coefficients:
            type: array
            items:
              type: array
              items:
                type: number
    ResourceBase:
      type: object
      properties:
        resource:
          type: string
          description: Resource identifier (e.g., source/5f1a2b3c4d5e6f7890abcdef)
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/ResourceStatus'
        name:
          type: string
        tags:
          type: array
          items:
            type: string
        private:
          type: boolean
    ListResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            limit:
              type: integer
            offset:
              type: integer
            total_count:
              type: integer
            previous:
              type: string
              nullable: true
            next:
              type: string
              nullable: true
        objects:
          type: array
          items:
            $ref: '#/components/schemas/ResourceBase'
  parameters:
    apiKey:
      name: api_key
      in: query
      required: true
      schema:
        type: string
      description: BigML API key.
    username:
      name: username
      in: query
      required: true
      schema:
        type: string
      description: BigML username.
    resourceId:
      name: resource_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
      description: The 24-character hexadecimal resource identifier.
    limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        default: 20
        maximum: 1000
      description: Number of resources to return.
    offset:
      name: offset
      in: query
      required: false
      schema:
        type: integer
        default: 0
      description: Index of the first resource to return.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: username
      description: 'Authenticate with username and api_key as query parameters. Example: ?username=myuser&api_key=a1b2c3...

        '
x-tagGroups:
- name: Data Management
  tags:
  - Sources
  - Datasets
  - Projects
  - Data Connectors
- name: Supervised Learning
  tags:
  - Models
  - Ensembles
  - Supervised Learning
  - Evaluations
  - Predictions
- name: Unsupervised Learning
  tags:
  - Clustering
  - Anomaly Detection
  - Unsupervised Learning
  - Time Series
- name: Batch Operations
  tags:
  - Batch Operations
- name: Automation
  tags:
  - WhizzML Scripting