# List deployments

`GET /logic/v1/deployments`

Endpoints:

- `https://api.test.neobits.ai/logic/v1/deployments`
- `https://api.prod.neobits.ai/logic/v1/deployments`

Authentication: one of the following alternatives:

- `bearer`

- `bearer`: Bearer token authentication using OAuth 2.0 client credentials flow.

Returns resources in the active workspace in ascending ID order. Use `size` and either `before` or `after` for pagination. `page.size` is the returned count; `page.total` is the workspace total. Cursors are exclusive and are null for an empty page. There are no additional filters or sort parameters.

Required service-token scope: `deployments:read`. End-user access is checked against workspace policies. Send a Bearer token and the `X-Workspace-Id` header.

## Parameters

| Name | In | Required | Schema | Description |
| --- | --- | --- | --- | --- |
| `X-Workspace-Id` | header | yes | string (uuid); example `019991b1-0000-7000-8000-000000000001` | Active workspace UUID. The authenticated principal must have access to this workspace. |
| `size` | query | no | integer; minimum 1; maximum 5000; default `50`; example `50` | Maximum resources to return (1–5,000). Defaults to 50. |
| `before` | query | no | string (uuid) | Exclusive resource ID cursor. Use page.before from a previous response. Cannot be combined with after. |
| `after` | query | no | string (uuid) | Exclusive resource ID cursor. Use page.after from a previous response. Cannot be combined with before. |

Parameter definitions (including all schema constraints and serialization options):

```json
[
  {
    "name": "X-Workspace-Id",
    "in": "header",
    "required": true,
    "description": "Active workspace UUID. The authenticated principal must have access to this workspace.",
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "example": "019991b1-0000-7000-8000-000000000001"
  },
  {
    "name": "size",
    "in": "query",
    "required": false,
    "description": "Maximum resources to return (1–5,000). Defaults to 50.",
    "schema": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5000,
      "default": 50
    },
    "example": 50
  },
  {
    "name": "before",
    "in": "query",
    "required": false,
    "description": "Exclusive resource ID cursor. Use page.before from a previous response. Cannot be combined with after.",
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  },
  {
    "name": "after",
    "in": "query",
    "required": false,
    "description": "Exclusive resource ID cursor. Use page.after from a previous response. Cannot be combined with before.",
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  }
]
```

## Responses

### 200 Deployment page.

Content type: `application/json`

```json
{
  "title": "LogicDeploymentPage",
  "type": "object",
  "required": [
    "data",
    "page"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "title": "LogicDeployment",
        "type": "object",
        "required": [
          "id",
          "workspaceId",
          "decisionId",
          "version",
          "environmentId",
          "name",
          "message",
          "deployedBy",
          "milestone",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Deployment identifier.",
            "example": "019991b1-0000-7000-8000-000000000004"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "description": "Workspace containing this resource.",
            "example": "019991b1-0000-7000-8000-000000000001"
          },
          "decisionId": {
            "type": "string",
            "format": "uuid",
            "description": "Standalone decision to deploy. Sub-decisions are deployed with their parent.",
            "example": "019991b1-0000-7000-8000-000000000003"
          },
          "version": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 2147483647,
            "description": "Saved version number, or 0/null for the working copy. Null is normalized to 0 in the response. Use a saved version for a reproducible deployment.",
            "example": 1
          },
          "environmentId": {
            "type": "string",
            "format": "uuid",
            "description": "Environment in the active workspace.",
            "example": "019991b1-0000-7000-8000-000000000002"
          },
          "name": {
            "type": "string",
            "description": "Nonempty deployment name without leading or trailing whitespace.",
            "example": "Eligibility v1",
            "minLength": 1
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Release notes. Use null or an empty string to clear them.",
            "example": "Initial deployment"
          },
          "deployedBy": {
            "type": "string",
            "description": "Caller-supplied attribution; required and not inferred from the access token.",
            "example": "Integration service",
            "minLength": 1
          },
          "milestone": {
            "type": "integer",
            "const": 0,
            "description": "Snapshot milestone; always 0 for a deployment.",
            "example": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time.",
            "example": "2026-09-30T10:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update time.",
            "example": "2026-09-30T10:00:00.000Z"
          }
        },
        "example": {
          "id": "019991b1-0000-7000-8000-000000000004",
          "workspaceId": "019991b1-0000-7000-8000-000000000001",
          "decisionId": "019991b1-0000-7000-8000-000000000003",
          "version": 1,
          "milestone": 0,
          "environmentId": "019991b1-0000-7000-8000-000000000002",
          "name": "Eligibility v1",
          "message": "Initial deployment",
          "deployedBy": "Integration service",
          "createdAt": "2026-09-30T10:00:00.000Z",
          "updatedAt": "2026-09-30T10:00:00.000Z"
        }
      }
    },
    "page": {
      "title": "LogicPage",
      "type": "object",
      "required": [
        "size",
        "total",
        "before",
        "after"
      ],
      "properties": {
        "size": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of resources returned in this response.",
          "example": 1
        },
        "total": {
          "type": "integer",
          "minimum": 0,
          "description": "Total resources in the active workspace, independent of the cursor.",
          "example": 1
        },
        "before": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "First returned ID. Use as before to request the preceding page. Null for an empty page.",
          "example": "019991b1-0000-7000-8000-000000000002"
        },
        "after": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Last returned ID. Use as after to request the following page. Null for an empty page. A non-null cursor does not guarantee another page exists.",
          "example": "019991b1-0000-7000-8000-000000000002"
        }
      }
    }
  },
  "example": {
    "data": [
      {
        "id": "019991b1-0000-7000-8000-000000000004",
        "workspaceId": "019991b1-0000-7000-8000-000000000001",
        "decisionId": "019991b1-0000-7000-8000-000000000003",
        "version": 1,
        "milestone": 0,
        "environmentId": "019991b1-0000-7000-8000-000000000002",
        "name": "Eligibility v1",
        "message": "Initial deployment",
        "deployedBy": "Integration service",
        "createdAt": "2026-09-30T10:00:00.000Z",
        "updatedAt": "2026-09-30T10:00:00.000Z"
      }
    ],
    "page": {
      "size": 1,
      "total": 1,
      "before": "019991b1-0000-7000-8000-000000000004",
      "after": "019991b1-0000-7000-8000-000000000004"
    }
  }
}
```

### 400 Bad Request

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "BadRequestResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "BadRequest"
            ],
            "example": "BadRequest"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "400-000",
              "400-001",
              "400-002",
              "400-003",
              "400-004",
              "400-005",
              "400-006",
              "400-007",
              "400-008",
              "400-100",
              "400-101",
              "400-102",
              "400-103",
              "400-104",
              "400-105",
              "400-106",
              "400-107",
              "400-108",
              "400-109",
              "400-110",
              "400-111",
              "400-112"
            ],
            "example": "400-001"
          },
          "message": {
            "type": "string",
            "example": "Field 'ssn' is required"
          }
        }
      }
    }
  }
}
```

### 401 Unauthorized

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "UnauthorizedResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "Unauthorized"
            ],
            "example": "Unauthorized"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "401-000",
              "401-001",
              "401-002",
              "401-003",
              "401-004",
              "401-005",
              "401-006",
              "401-007"
            ],
            "example": "401-000"
          },
          "message": {
            "type": "string",
            "example": "Client is not authenticated"
          }
        }
      }
    }
  }
}
```

### 403 Bad Request

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "ForbiddenResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "Forbidden"
            ],
            "example": "Forbidden"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "403-000",
              "403-001"
            ],
            "example": "403-000"
          },
          "message": {
            "type": "string",
            "example": "Client does not have access to this resource"
          }
        }
      }
    }
  }
}
```

### 429 Too Many Requests. When the rate limit rejects a request, the response carries `Retry-After` and only the `errors` field: no `timestamp`, `moreInfo` or `X-Request-ID`, as the request never reached the API.

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "Retry-After": {
      "description": "Seconds to wait before retrying. Sent when the rate limit rejects a request.",
      "schema": {
        "type": "integer",
        "example": 60
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "TooManyRequestsResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "TooManyRequests"
            ],
            "example": "TooManyRequests"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "429-000"
            ],
            "example": "429-000"
          },
          "message": {
            "type": "string",
            "example": "Too many requests. Please try again later."
          }
        }
      }
    }
  }
}
```

### 500 Internal Server Error

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "InternalServerErrorResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "InternalServerError"
            ],
            "example": "InternalServerError"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "500-000",
              "500-001"
            ],
            "example": "500-000"
          },
          "message": {
            "type": "string",
            "example": "An unexpected internal error occurred"
          }
        }
      }
    }
  }
}
```

### 503 Service Unavailable

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "ServiceUnavailableResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "ServiceUnavailable"
            ],
            "example": "ServiceUnavailable"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "503-000"
            ],
            "example": "503-000"
          },
          "message": {
            "type": "string",
            "example": "An error occurred while interacting with a third party service"
          }
        }
      }
    }
  }
}
```

### 504 Gateway Timeout

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "TimeoutResponse",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "example": "2019-09-16T22:14:45.624Z"
    },
    "moreInfo": {
      "type": "string",
      "format": "url",
      "example": "https://docs.neobits.ai/"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "GatewayTimeout"
            ],
            "example": "GatewayTimeout"
          },
          "code": {
            "type": "string",
            "description": "Unique error code in format HTTP_STATUS-SEQUENCE",
            "enum": [
              "504-000"
            ],
            "example": "504-000"
          },
          "message": {
            "type": "string",
            "example": "The request timed out"
          }
        }
      }
    }
  }
}
```