> For the complete documentation index, see [llms.txt](https://globalmoo.gitbook.io/globalmoo-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://globalmoo.gitbook.io/globalmoo-documentation/schemas/project.md).

# Project Schema

This document describes the Project object schema returned by the globalMOO API.

## Structure

```json
{
  "id": 456,                                     // Unique identifier
  "createdAt": "2025-01-31T10:00:00.000Z",      // Creation timestamp
  "updatedAt": "2025-01-31T10:00:00.000Z",      // Last update timestamp
  "disabledAt": null,                           // Optional disable timestamp
  "developedAt": "2025-01-31T15:00:00.000Z",    // Timestamp when project was developed
  "name": "Q1 Planning",                         // Project name
  "inputCount": 3,                              // Number of input variables
  "minimums": [0, 0, 0],                        // Minimum values for each input
  "maximums": [1, 1, 1],                        // Maximum values for each input
  "inputTypes": ["float", "float", "float"],    // Type of each input variable
  "categories": [                               // Categories for categorical inputs
    ["red", "green", "blue"],
    [],
    []
  ],
  "inputCases": [                               // Input test cases
    [0.1, 0.2, 0.7],
    [0.3, 0.3, 0.4],
    [0.5, 0.1, 0.4]
  ],
  "caseCount": 3,                               // Number of test cases
  "trials": [                                   // Associated trials
    {
      "id": 789,
      // ... other trial properties
    }
  ]
}
```

## Fields

| Field         | Type                                                                | Description                                                     |
| ------------- | ------------------------------------------------------------------- | --------------------------------------------------------------- |
| `id`          | integer                                                             | Unique identifier for the project                               |
| `createdAt`   | string (ISO 8601)                                                   | Timestamp when the project was created                          |
| `updatedAt`   | string (ISO 8601)                                                   | Timestamp when the project was last updated                     |
| `disabledAt`  | string (ISO 8601) or null                                           | Timestamp when the project was disabled, null if active         |
| `developedAt` | string (ISO 8601) or null                                           | Timestamp when the project was developed, null if not developed |
| `name`        | string                                                              | Name of the project (minimum 4 characters)                      |
| `inputCount`  | integer                                                             | Number of input variables in the optimization model             |
| `minimums`    | array of numbers                                                    | Minimum allowed values for each input variable                  |
| `maximums`    | array of numbers                                                    | Maximum allowed values for each input variable                  |
| `inputTypes`  | array of strings                                                    | Type of each input variable (boolean, category, float, integer) |
| `categories`  | array of arrays                                                     | For categorical inputs, the possible values for each input      |
| `inputCases`  | array of arrays                                                     | Test cases with specific input values                           |
| `caseCount`   | integer                                                             | Number of test cases                                            |
| `trials`      | array of [Trial](/globalmoo-documentation/schemas/trial.md) objects | List of trials associated with this project                     |

## Input Types

| Type       | Description                                          |
| ---------- | ---------------------------------------------------- |
| `boolean`  | Boolean input (0 or 1)                               |
| `category` | Categorical input (from a predefined set of options) |
| `float`    | Floating point number input                          |
| `integer`  | Integer number input                                 |

## SDK Representations

### JavaScript SDK

In the JavaScript SDK, the Project object uses snake\_case naming for fields, translating from the API's camelCase:

```javascript
{
  id: 456,
  created_at: Date("2025-01-31T10:00:00.000Z"),  // Converted to Date object
  updated_at: Date("2025-01-31T10:00:00.000Z"),  // Converted to Date object
  disabled_at: null,
  developed_at: Date("2025-01-31T15:00:00.000Z"),  // Converted to Date object
  name: "Q1 Planning",
  input_count: 3,
  minimums: [0, 0, 0],
  maximums: [1, 1, 1],
  input_types: ["float", "float", "float"],  // Simple strings in lowercase
  categories: [
    ["red", "green", "blue"],
    [],
    []
  ],
  input_cases: [
    [0.1, 0.2, 0.7],
    [0.3, 0.3, 0.4],
    [0.5, 0.1, 0.4]
  ],
  case_count: 3,
  trials: [
    // Trial objects
  ]
}
```

### Python SDK

The Python SDK also uses snake\_case naming and converts timestamps to datetime objects:

```python
Project(
  id=456,
  created_at=datetime(2025, 1, 31, 10, 0, 0),    # Converted to datetime object
  updated_at=datetime(2025, 1, 31, 10, 0, 0),    # Converted to datetime object
  disabled_at=None,
  developed_at=datetime(2025, 1, 31, 15, 0, 0),  # Converted to datetime object
  name="Q1 Planning",
  input_count=3,
  minimums=[0, 0, 0],
  maximums=[1, 1, 1],
  input_types=[InputType.FLOAT, InputType.FLOAT, InputType.FLOAT],  # Enum values
  categories=[
    ["red", "green", "blue"],
    [],
    []
  ],
  input_cases=[
    [0.1, 0.2, 0.7],
    [0.3, 0.3, 0.4],
    [0.5, 0.1, 0.4]
  ],
  case_count=3,
  trials=[
    # Trial objects
  ]
)
```

### PHP SDK

The PHP SDK maintains camelCase naming to match the API and converts timestamps to DateTimeImmutable objects:

```php
Project(
  id: 456,
  createdAt: DateTimeImmutable("2025-01-31T10:00:00.000Z"),  // DateTimeImmutable object
  updatedAt: DateTimeImmutable("2025-01-31T10:00:00.000Z"),  // DateTimeImmutable object
  disabledAt: null,
  developedAt: DateTimeImmutable("2025-01-31T15:00:00.000Z"),  // DateTimeImmutable object
  name: "Q1 Planning",
  inputCount: 3,
  minimums: [0, 0, 0],
  maximums: [1, 1, 1],
  inputTypes: [InputType::Float, InputType::Float, InputType::Float],  // Enum values
  categories: [
    ["red", "green", "blue"],
    [],
    []
  ],
  inputCases: [
    [0.1, 0.2, 0.7],
    [0.3, 0.3, 0.4],
    [0.5, 0.1, 0.4]
  ],
  caseCount: 3,
  trials: [
    // Trial objects
  ]
)
```

## Examples

### Simple Project

```json
{
  "id": 456,
  "createdAt": "2025-01-31T10:00:00.000Z",
  "updatedAt": "2025-01-31T10:00:00.000Z",
  "disabledAt": null,
  "developedAt": null,
  "name": "Basic Project",
  "inputCount": 2,
  "minimums": [0, 0],
  "maximums": [100, 1],
  "inputTypes": ["integer", "boolean"],
  "categories": [[], []],
  "inputCases": [
    [50, 1],
    [75, 0]
  ],
  "caseCount": 2,
  "trials": []
}
```

### Project with Categorical Inputs

```json
{
  "id": 789,
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-20T14:45:00.000Z",
  "disabledAt": null,
  "developedAt": "2025-01-20T15:00:00.000Z",
  "name": "Marketing Channel Optimization",
  "inputCount": 3,
  "minimums": [0, 0, 0],
  "maximums": [2, 1, 100000],
  "inputTypes": ["category", "boolean", "integer"],
  "categories": [
    ["email", "social", "search"],
    [],
    []
  ],
  "inputCases": [
    [0, 1, 50000],  // email, with remarketing, $50,000 budget
    [1, 0, 75000],  // social, no remarketing, $75,000 budget
    [2, 1, 60000]   // search, with remarketing, $60,000 budget
  ],
  "caseCount": 3,
  "trials": [
    {
      "id": 101,
      "status": "completed",
      "createdAt": "2025-01-20T15:00:00.000Z",
      "updatedAt": "2025-01-20T15:10:00.000Z"
    }
  ]
}
```

## Related Endpoints

* [Project Endpoints](/globalmoo-documentation/endpoints/projects/index.md)
* [Create Project](/globalmoo-documentation/endpoints/projects/create.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://globalmoo.gitbook.io/globalmoo-documentation/schemas/project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
