globalMOO Documentation
  • globalMOO API Documentation
  • core
    • Authentication
    • Core Concepts
    • Getting Started with globalMOO
    • Error Handling
    • Event Handling
    • SDK Initialization
    • Debugging & Logging
  • schemas
    • Account Schema
    • Model Schema
    • Project Schema
    • Trial Schema
    • Objective Schema
    • Result Schema
    • Inverse Schema
  • quickstart
    • Your First Optimization with globalMOO
  • endpoints
    • accounts
      • Account Endpoints
      • Register Account
    • inverse
      • Inverse Optimization Endpoints
      • Initialize Inverse Optimization
      • Load Inverse Output
      • Suggest Inverse Step
    • models
      • Create Model
      • Model Endpoints
      • List Models
    • objectives
      • Objective Endpoints
      • Load Objectives
    • outputs
      • Output Endpoints
      • Load Output Cases
      • Load Developed Outputs
    • projects
      • Create Project
      • Project Endpoints
    • trials
      • Trial Endpoints
      • Read Trial
Powered by GitBook
On this page
  • Endpoint
  • Path Parameters
  • Request Parameters
  • Input Types
  • Request Format
  • Response Fields
  • Response Format
  • Examples
  • Response Example
  • Error Responses
  • Validation Rules
  1. endpoints
  2. projects

Create Project

Creates a new optimization project under a specific model in globalMOO.

Endpoint

POST /models/{model_id}/projects

Path Parameters

Parameter
Type
Required
Description

model_id

integer

Yes

ID of the model

Request Parameters

Parameter
Type
Required
Description

name

string

Yes

Project name (≥4 characters)

inputCount

integer

Yes

Number of input variables for optimization (must be > 0)

minimums

array[float]

Yes

Minimum values for each input variable (length must match inputCount)

maximums

array[float]

Yes

Maximum values for each input variable (length must match inputCount, each value must be > corresponding minimum)

inputTypes

array[string]

Yes

Type of each input variable (length must match inputCount)

categories

array[string]

No

Categories for CATEGORICAL inputs (required when type is CATEGORICAL)

Input Types

Available input types are:

  • CONTINUOUS - Floating point numbers within defined min/max range

  • INTEGER - Whole numbers within defined min/max range

  • CATEGORICAL - Selection from predefined category list

  • LOGICAL - Boolean values represented as 0 or 1

Request Format

{
    "name": "Process Optimization",
    "inputCount": 3,
    "minimums": [0.0, -10.0, 0.0],
    "maximums": [100.0, 10.0, 1.0],
    "inputTypes": ["CONTINUOUS", "INTEGER", "LOGICAL"],
    "categories": []
}

Response Fields

Field
Type
Description

id

integer

Unique identifier for the project

model_id

integer

ID of the parent model

input_count

integer

Number of input variables

minimums

array[float]

Minimum values for each input

maximums

array[float]

Maximum values for each input

input_types

array[string]

Types for each input (see Input Types)

categories

array[string]

Categories for CATEGORICAL inputs

created_at

string

ISO 8601 timestamp with millisecond precision

updated_at

string

ISO 8601 timestamp with millisecond precision

Response Format

{
    "id": 123,
    "model_id": 456,
    "name": "Process Optimization",
    "input_count": 3,
    "minimums": [0.0, -10.0, 0.0],
    "maximums": [100.0, 10.0, 1.0],
    "input_types": ["CONTINUOUS", "INTEGER", "LOGICAL"],
    "categories": [],
    "created_at": "2025-01-31T10:00:00.000Z",
    "updated_at": "2025-01-31T10:00:00.000Z"
}

Examples

from globalmoo import Client

client = Client(api_key="your-api-key")
project = client.create_project(
    model_id=123,
    name="Process Optimization",
    input_count=3,
    minimums=[0, -10, 0],
    maximums=[100, 10, 1],
    input_types=["CONTINUOUS", "INTEGER", "LOGICAL"],
    categories=[]
)
const { Client } = require('globalmoo');

const client = new Client('your-api-key');
const project = await client.createProject({
    modelId: 123,
    name: "Process Optimization",
    inputCount: 3,
    minimums: [0, -10, 0],
    maximums: [100, 10, 1],
    inputTypes: ["CONTINUOUS", "INTEGER", "LOGICAL"],
    categories: []
});
$client = new Client("your-api-key");

$project = $client->createProject([
    "modelId" => 123,
    "name" => "Process Optimization",
    "inputCount" => 3,
    "minimums" => [0, -10, 0],
    "maximums" => [100, 10, 1],
    "inputTypes" => ["CONTINUOUS", "INTEGER", "LOGICAL"],
    "categories" => []
]);

Response Example

{
    "id": 123,
    "model_id": 456,
    "input_count": 3,
    "minimums": [0.0, -10.0, 0.0],
    "maximums": [100.0, 10.0, 1.0],
    "input_types": ["CONTINUOUS", "INTEGER", "LOGICAL"],
    "categories": [],
    "created_at": "2025-01-31T10:00:00.000Z",
    "updated_at": "2025-01-31T10:00:00.000Z"
}

Error Responses

Status Code
Description

400

Invalid request - Missing required fields, invalid format, or validation errors

401

Unauthorized - Invalid API key

404

Model not found

429

Too many requests - Rate limit exceeded

500

Internal server error

Validation Rules

  • Model ID must be a positive integer

  • Project name must be at least 4 characters

  • inputCount must be a positive integer

  • Array lengths must all match inputCount:

    • minimums array

    • maximums array

    • inputTypes array

  • For each input:

    • minimum value must be less than maximum value

    • INTEGER type requires integer min/max values

    • CATEGORICAL type requires corresponding category string in categories array

    • LOGICAL type ignores min/max values

  • CONTINUOUS and INTEGER minimums/maximums must be valid numbers

  • Model must exist and be active

PreviousprojectsNextProject Endpoints

Last updated 3 months ago