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
  • Request Format
  • Response Fields
  • Response Format
  • Examples
  • Error Responses
  • Validation Rules
  1. endpoints
  2. outputs

Load Output Cases

Loads output cases into a project in globalMOO.

Endpoint

POST /models/{model_id}/projects/{project_id}/output-cases

Path Parameters

Parameter
Type
Required
Description

model_id

integer

Yes

ID of the model

project_id

integer

Yes

ID of the project

Request Parameters

Parameter
Type
Required
Description

outputCount

integer

Yes

Number of outputs per case (must be > 0)

outputCases

array[array[float]]

Yes

Array of output case arrays (must be non-empty)

Request Format

{
    "outputCount": 3,
    "outputCases": [
        [1.2, 3.4, 5.6],
        [7.8, 9.0, 1.2],
        [3.4, 5.6, 7.8]
    ]
}

Response Fields

Field
Type
Description

id

integer

Unique identifier for the output set

model_id

integer

ID of the model

project_id

integer

ID of the project

output_count

integer

Number of outputs per case

output_cases

array[array[float]]

Array of output case arrays

created_at

string

Creation timestamp (ISO 8601)

updated_at

string

Last update timestamp (ISO 8601)

Response Format

{
    "id": 123,
    "model_id": 456,
    "project_id": 789,
    "output_count": 3,
    "output_cases": [
        [1.2, 3.4, 5.6],
        [7.8, 9.0, 1.2],
        [3.4, 5.6, 7.8]
    ],
    "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")
result = client.load_output_cases(
    model_id=123,
    project_id=456,
    output_count=3,
    output_cases=[
        [1.2, 3.4, 5.6],
        [7.8, 9.0, 1.2],
        [3.4, 5.6, 7.8]
    ]
)
const { Client } = require('globalmoo');

const client = new Client('your-api-key');
const result = await client.loadOutputCases({
    modelId: 123,
    projectId: 456,
    outputCount: 3,
    outputCases: [
        [1.2, 3.4, 5.6],
        [7.8, 9.0, 1.2],
        [3.4, 5.6, 7.8]
    ]
});
$client = new Client("your-api-key");

$result = $client->loadOutputCases([
    "modelId" => 123,
    "projectId" => 456,
    "outputCount" => 3,
    "outputCases" => [
        [1.2, 3.4, 5.6],
        [7.8, 9.0, 1.2],
        [3.4, 5.6, 7.8]
    ]
]);

Error Responses

Status Code
Description

400

Invalid request - Invalid output data format

401

Unauthorized - Invalid API key

404

Model or project not found

429

Too many requests - Rate limit exceeded

500

Internal server error

Validation Rules

  • Model and project IDs must be positive integers

  • outputCount must be a positive integer

  • Each output case must contain exactly outputCount values

  • All output values must be valid floating point numbers

  • The output cases array must contain at least one case

  • Project must exist and be active

PreviousOutput EndpointsNextLoad Developed Outputs

Last updated 4 months ago