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]
    ]
)

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

Last updated