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}")

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

Last updated