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
  • Response Fields
  • Response Format
  • Examples
  • Response Example
  • Error Responses
  • Notes
  1. endpoints
  2. models

List Models

Retrieves a list of all optimization models in your account.

Endpoint

GET /models

Response Fields

Field
Type
Description

id

integer

Unique identifier for the model

name

string

Name of the model (4-96 characters)

url

string

Optional callback URL for the model (must be valid URL with TLD)

created_at

string

Creation timestamp (ISO 8601)

updated_at

string

Last update timestamp (ISO 8601)

Response Format

[
    {
        "id": 123,
        "name": "string",
        "url": "string",
        "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")
models = client.read_models()

# Iterate through models
for model in models:
    print(f"Model: {model.name}, ID: {model.id}")
const { Client } = require('globalmoo');

const client = new Client('your-api-key');
const models = await client.readModels();

// Iterate through models
models.forEach(model => {
    console.log(`Model: ${model.name}, ID: ${model.id}`);
});
$client = new Client("your-api-key");

$models = $client->readModels();

// Iterate through models
foreach ($models as $model) {
    echo "Model: {$model->name}, ID: {$model->id}\n";
}

Response Example

[
    {
        "id": 123,
        "name": "Optimization Model A",
        "url": "https://example.com/model-a",
        "created_at": "2025-01-31T10:00:00.000Z",
        "updated_at": "2025-01-31T10:00:00.000Z"
    },
    {
        "id": 456,
        "name": "Optimization Model B",
        "url": null,
        "created_at": "2025-01-31T11:00:00.000Z",
        "updated_at": "2025-01-31T11:00:00.000Z"
    }
]

Error Responses

Status Code
Description

401

Unauthorized - Invalid API key

429

Too many requests - Rate limit exceeded

500

Internal server error

Notes

  • Models are returned in descending order by creation date

  • The response is an array that may be empty if no models exist

  • Model names must be unique within your account

  • URLs, if provided, must be valid and accessible callback URLs

  • All timestamps are in ISO 8601 format with millisecond precision

PreviousModel EndpointsNextobjectives

Last updated 4 months ago