**API versions** · **V2 (Latest)** · [V1](/integrations/v1/docs?lang=en)

# Private report exports

OpenAPI 3.0.3 · API 2.0.0

```json
[
  {
    "url": "https://api.unisoft.world/integrations/v2",
    "description": "API"
  }
]
```

## Operations

## POST /reports/exports

Queue a private export of one authorised report projection

`create_report_export`

Public request/definition objects are limited to 64 KiB. Private client-driven export of an authorised public Explorer projection. Requires statistics:read plus every currently required dataset/relation scope; contacts/interactions=contacts:read, paiements=paiements:read, abonnements=abonnements:read, promesses=promesses:read, forms_submit=forms:read AND forms_submit:read, cerfas=receipts:read. forms_submit additionally admits a current same-organisation non-deleted form UUID. Stable API-key and organisation ownership is private, without staff sharing, campaign-restricted keys or administrator inheritance. Use the live Explorer catalogue; no Mongo language, custom field, raw document or reusable payment configuration is accepted. scope=REQUESTED_PAGE exports exactly the requested rows page (maximum 200), not the full dataset; totalMatches/hasMore explicitly describe omitted pages. scope=AGGREGATE exports the existing bounded aggregate (maximum 30 groups), with hasMore reflecting truncation. Separate pages are live observations, never one frozen dataset. No formula, money aggregation, comparison or conversion is added. Formats json/csv/xlsx/pdf use the same authorised scalar projection. JSON preserves its typed projection; CSV/XLSX/PDF preserve raw numeric units, identify units in field labels and put each MONEY currency in a separate column. Unknown values stay null in JSON and blank in CSV/XLSX and a dash in PDF, never fabricated zero/EUR. Dates stay the projected ISO strings. Spreadsheet formula prefixes are neutralised. Native XLSX/PDF renderers are reused; nonempty PDFs use complete-label record cards and allow at most 8 columns including currency columns. The native Helvetica font supports WinAnsi text only; unsupported glyphs (for example Hebrew/Arabic) refuse with REPORT_EXPORT_PDF_GLYPH_UNSUPPORTED, without transliteration or an automatic format fallback. JSON/CSV/XLSX preserve Unicode. File size is at most 4 MiB; no partial file. COMPLETED can be an authorization and does not prove bank settlement. The file is returned as base64 with MIME type, safe file name, byteLength and sha256; decode it rather than inventing a download URL. No server download link, email, provider operation or public share is created. Jobs expire 600 seconds after creation and retain their one-shot execution identity. No daemon, background timer, automatic retry or lock stealing exists. QUEUED needs explicit execution; RUNNING remains locked after uncertainty; SUCCEEDED/FAILED are terminal. GET is passive and never queries report rows, renders, writes, renews or cleans up. Current source grants and required form are revalidated before disclosure/execution. Unknown query/body parameters are refused. Additionally requires explicit reports:write. Supply idempotencyKey (8–100 ASCII letters/digits/underscore/hyphen) and request={format,kind,report}, where kind=rows|aggregate matches the existing public Explorer request. Validates current fields/rights/form without calculating or rendering. Same key/request returns the same job; different inputs return 409 STATISTICS_JOB_IDEMPOTENCY_CONFLICT. Creation requires exact positive durable acknowledgement with w:1,j:true. 503 STATISTICS_JOB_CREATION_UNCONFIRMED requires inspection/repetition of this same key before any new artifact.

### Authentication

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Required permissions

```json
{
  "accepted": "statistics:read",
  "additional": [
    "reports:write"
  ]
}
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "idempotencyKey": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{8,100}$"
          },
          "request": {
            "type": "object",
            "properties": {
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "csv",
                  "xlsx",
                  "pdf"
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "rows",
                  "aggregate"
                ]
              },
              "report": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/UnisoftRequest_729f4d152ef616c77bcd"
                  },
                  {
                    "$ref": "#/components/schemas/UnisoftRequest_411efe4dbeaae4a40e62"
                  }
                ]
              }
            },
            "required": [
              "format",
              "kind",
              "report"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "idempotencyKey",
          "request"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### Responses

#### HTTP 201

```json
{
  "description": "Private export job status and optional bounded base64 file.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ReportExportResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Unknown or invalid request.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Principal or current source scopes refused.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Private export, dataset or form unavailable.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Request conflict or retained execution lock.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 410

```json
{
  "description": "Private export expired.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 422

```json
{
  "description": "Invalid fields, output/size limits or unsupported format.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Storage or execution acknowledgement uncertain; inspect same job.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "statistics:read",
  "x-unisoft-additional-scopes": [
    "reports:write"
  ],
  "x-unisoft-conditional-scopes": [
    "contacts:read",
    "paiements:read",
    "abonnements:read",
    "promesses:read",
    "forms:read",
    "forms_submit:read",
    "receipts:read"
  ],
  "x-unisoft-mcp": {
    "category": "write",
    "readOnly": false,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## GET /reports/exports/{jobId}

Read a private export status or frozen file

`get_report_export`

Public request/definition objects are limited to 64 KiB. Private client-driven export of an authorised public Explorer projection. Requires statistics:read plus every currently required dataset/relation scope; contacts/interactions=contacts:read, paiements=paiements:read, abonnements=abonnements:read, promesses=promesses:read, forms_submit=forms:read AND forms_submit:read, cerfas=receipts:read. forms_submit additionally admits a current same-organisation non-deleted form UUID. Stable API-key and organisation ownership is private, without staff sharing, campaign-restricted keys or administrator inheritance. Use the live Explorer catalogue; no Mongo language, custom field, raw document or reusable payment configuration is accepted. scope=REQUESTED_PAGE exports exactly the requested rows page (maximum 200), not the full dataset; totalMatches/hasMore explicitly describe omitted pages. scope=AGGREGATE exports the existing bounded aggregate (maximum 30 groups), with hasMore reflecting truncation. Separate pages are live observations, never one frozen dataset. No formula, money aggregation, comparison or conversion is added. Formats json/csv/xlsx/pdf use the same authorised scalar projection. JSON preserves its typed projection; CSV/XLSX/PDF preserve raw numeric units, identify units in field labels and put each MONEY currency in a separate column. Unknown values stay null in JSON and blank in CSV/XLSX and a dash in PDF, never fabricated zero/EUR. Dates stay the projected ISO strings. Spreadsheet formula prefixes are neutralised. Native XLSX/PDF renderers are reused; nonempty PDFs use complete-label record cards and allow at most 8 columns including currency columns. The native Helvetica font supports WinAnsi text only; unsupported glyphs (for example Hebrew/Arabic) refuse with REPORT_EXPORT_PDF_GLYPH_UNSUPPORTED, without transliteration or an automatic format fallback. JSON/CSV/XLSX preserve Unicode. File size is at most 4 MiB; no partial file. COMPLETED can be an authorization and does not prove bank settlement. The file is returned as base64 with MIME type, safe file name, byteLength and sha256; decode it rather than inventing a download URL. No server download link, email, provider operation or public share is created. Jobs expire 600 seconds after creation and retain their one-shot execution identity. No daemon, background timer, automatic retry or lock stealing exists. QUEUED needs explicit execution; RUNNING remains locked after uncertainty; SUCCEEDED/FAILED are terminal. GET is passive and never queries report rows, renders, writes, renews or cleans up. Current source grants and required form are revalidated before disclosure/execution. Unknown query/body parameters are refused. Read the same private export job and its terminal file only for SUCCEEDED. A FAILED job carries a stable code; no partial file is returned. 404 also covers another key/organisation. 410 STATISTICS_JOB_EXPIRED denies the file without refresh or deletion. After connection loss, inspect this job; RUNNING is locked and never automatically restarted. reports:write is not needed for reading.

### Authentication

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Required permissions

```json
{
  "accepted": "statistics:read",
  "additional": []
}
```

### Parameters

```json
{
  "name": "jobId",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  },
  "description": "Private export job UUID returned by create_report_export."
}
```

### Responses

#### HTTP 200

```json
{
  "description": "Private export job status and optional bounded base64 file.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ReportExportResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Unknown or invalid request.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Principal or current source scopes refused.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Private export, dataset or form unavailable.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Request conflict or retained execution lock.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 410

```json
{
  "description": "Private export expired.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 422

```json
{
  "description": "Invalid fields, output/size limits or unsupported format.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Storage or execution acknowledgement uncertain; inspect same job.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "statistics:read",
  "x-unisoft-additional-scopes": [],
  "x-unisoft-conditional-scopes": [
    "contacts:read",
    "paiements:read",
    "abonnements:read",
    "promesses:read",
    "forms:read",
    "forms_submit:read",
    "receipts:read"
  ],
  "x-unisoft-mcp": {
    "category": "read",
    "readOnly": true,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## POST /reports/exports/{jobId}/execute

Explicitly render a queued private report export once

`execute_report_export`

Public request/definition objects are limited to 64 KiB. Private client-driven export of an authorised public Explorer projection. Requires statistics:read plus every currently required dataset/relation scope; contacts/interactions=contacts:read, paiements=paiements:read, abonnements=abonnements:read, promesses=promesses:read, forms_submit=forms:read AND forms_submit:read, cerfas=receipts:read. forms_submit additionally admits a current same-organisation non-deleted form UUID. Stable API-key and organisation ownership is private, without staff sharing, campaign-restricted keys or administrator inheritance. Use the live Explorer catalogue; no Mongo language, custom field, raw document or reusable payment configuration is accepted. scope=REQUESTED_PAGE exports exactly the requested rows page (maximum 200), not the full dataset; totalMatches/hasMore explicitly describe omitted pages. scope=AGGREGATE exports the existing bounded aggregate (maximum 30 groups), with hasMore reflecting truncation. Separate pages are live observations, never one frozen dataset. No formula, money aggregation, comparison or conversion is added. Formats json/csv/xlsx/pdf use the same authorised scalar projection. JSON preserves its typed projection; CSV/XLSX/PDF preserve raw numeric units, identify units in field labels and put each MONEY currency in a separate column. Unknown values stay null in JSON and blank in CSV/XLSX and a dash in PDF, never fabricated zero/EUR. Dates stay the projected ISO strings. Spreadsheet formula prefixes are neutralised. Native XLSX/PDF renderers are reused; nonempty PDFs use complete-label record cards and allow at most 8 columns including currency columns. The native Helvetica font supports WinAnsi text only; unsupported glyphs (for example Hebrew/Arabic) refuse with REPORT_EXPORT_PDF_GLYPH_UNSUPPORTED, without transliteration or an automatic format fallback. JSON/CSV/XLSX preserve Unicode. File size is at most 4 MiB; no partial file. COMPLETED can be an authorization and does not prove bank settlement. The file is returned as base64 with MIME type, safe file name, byteLength and sha256; decode it rather than inventing a download URL. No server download link, email, provider operation or public share is created. Jobs expire 600 seconds after creation and retain their one-shot execution identity. No daemon, background timer, automatic retry or lock stealing exists. QUEUED needs explicit execution; RUNNING remains locked after uncertainty; SUCCEEDED/FAILED are terminal. GET is passive and never queries report rows, renders, writes, renews or cleans up. Current source grants and required form are revalidated before disclosure/execution. Unknown query/body parameters are refused. Additionally requires reports:write and an empty object. Validates current source grants/form, then a durable scalar-owner/revision CAS claim precedes exactly one public report execution and rendering. Repeat terminal execution only returns the frozen artifact. A RUNNING job returns 409 STATISTICS_JOB_EXECUTION_LOCKED. 503 STATISTICS_JOB_EXECUTION_UNCONFIRMED or STATISTICS_JOB_FINALIZATION_UNCONFIRMED requires GET inspection; never retry work or infer no file automatically. Inspect state even in a successful response envelope. Source errors, limits or renderer failures become terminal FAILED with a stable code. No business financial effect is authorized.

### Authentication

```json
[
  {
    "bearerAuth": []
  },
  {
    "apiKeyHeader": []
  }
]
```

### Required permissions

```json
{
  "accepted": "statistics:read",
  "additional": [
    "reports:write"
  ]
}
```

### Parameters

```json
{
  "name": "jobId",
  "in": "path",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  },
  "description": "Private export job UUID returned by create_report_export."
}
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    }
  }
}
```

### Responses

#### HTTP 200

```json
{
  "description": "Private export job status and optional bounded base64 file.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ReportExportResponse"
      }
    }
  }
}
```

#### HTTP 400

```json
{
  "description": "Unknown or invalid request.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 401

```json
{
  "description": "Authentication required.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 403

```json
{
  "description": "Principal or current source scopes refused.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 404

```json
{
  "description": "Private export, dataset or form unavailable.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 409

```json
{
  "description": "Request conflict or retained execution lock.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 410

```json
{
  "description": "Private export expired.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 422

```json
{
  "description": "Invalid fields, output/size limits or unsupported format.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

#### HTTP 503

```json
{
  "description": "Storage or execution acknowledgement uncertain; inspect same job.",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StatisticsJobError"
      }
    }
  }
}
```

### OpenAPI

```json
{
  "x-unisoft-mcp-output-schema": true,
  "x-unisoft-scope": "statistics:read",
  "x-unisoft-additional-scopes": [
    "reports:write"
  ],
  "x-unisoft-conditional-scopes": [
    "contacts:read",
    "paiements:read",
    "abonnements:read",
    "promesses:read",
    "forms:read",
    "forms_submit:read",
    "receipts:read"
  ],
  "x-unisoft-mcp": {
    "category": "write",
    "readOnly": false,
    "destructive": false,
    "idempotent": true,
    "warn": false
  }
}
```

## Schemas

```json
{
  "components": {
    "schemas": {
      "UnisoftRequest_729f4d152ef616c77bcd": {
        "type": "object",
        "properties": {
          "dataset": {
            "type": "string",
            "enum": [
              "contacts",
              "interactions",
              "paiements",
              "abonnements",
              "promesses",
              "forms_submit",
              "cerfas"
            ]
          },
          "formId": {
            "type": "string",
            "format": "uuid",
            "description": "Required only for forms_submit, whose supported row mode is submission. Other datasets reject formId."
          },
          "filters": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "description": "Exact logical field identifier advertised by this dataset's authorised catalogue; never a database path or expression."
                },
                "op": {
                  "type": "string",
                  "enum": [
                    "contains",
                    "equals",
                    "startsWith",
                    "endsWith",
                    "in",
                    "notIn",
                    "eq",
                    "neq",
                    "gt",
                    "gte",
                    "lt",
                    "lte",
                    "between",
                    "before",
                    "after",
                    "isTrue",
                    "isFalse",
                    "isEmpty",
                    "isNotEmpty"
                  ]
                },
                "values": {
                  "type": "array",
                  "maxItems": 20,
                  "items": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                }
              },
              "required": [
                "field",
                "op",
                "values"
              ],
              "additionalProperties": false
            }
          },
          "fields": {
            "type": "array",
            "minItems": 1,
            "maxItems": 40,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 180,
              "description": "Exact logical field identifier advertised by this dataset's authorised catalogue; never a database path or expression."
            }
          },
          "sort": {
            "type": "array",
            "maxItems": 4,
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "description": "Exact logical field identifier advertised by this dataset's authorised catalogue; never a database path or expression."
                },
                "order": {
                  "type": "string",
                  "enum": [
                    "asc",
                    "desc"
                  ]
                }
              },
              "required": [
                "field",
                "order"
              ],
              "additionalProperties": false
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "default": 1
          },
          "pageSize": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200,
            "default": 50
          }
        },
        "required": [
          "dataset",
          "fields"
        ],
        "additionalProperties": false
      },
      "UnisoftRequest_411efe4dbeaae4a40e62": {
        "type": "object",
        "properties": {
          "dataset": {
            "type": "string",
            "enum": [
              "contacts",
              "interactions",
              "paiements",
              "abonnements",
              "promesses",
              "forms_submit",
              "cerfas"
            ]
          },
          "formId": {
            "type": "string",
            "format": "uuid",
            "description": "Required only for forms_submit, whose supported row mode is submission. Other datasets reject formId."
          },
          "filters": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180,
                  "description": "Exact logical field identifier advertised by this dataset's authorised catalogue; never a database path or expression."
                },
                "op": {
                  "type": "string",
                  "enum": [
                    "contains",
                    "equals",
                    "startsWith",
                    "endsWith",
                    "in",
                    "notIn",
                    "eq",
                    "neq",
                    "gt",
                    "gte",
                    "lt",
                    "lte",
                    "between",
                    "before",
                    "after",
                    "isTrue",
                    "isFalse",
                    "isEmpty",
                    "isNotEmpty"
                  ]
                },
                "values": {
                  "type": "array",
                  "maxItems": 20,
                  "items": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 500
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                }
              },
              "required": [
                "field",
                "op",
                "values"
              ],
              "additionalProperties": false
            }
          },
          "operation": {
            "type": "string",
            "enum": [
              "count",
              "sum",
              "avg",
              "min",
              "max"
            ]
          },
          "field": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180,
            "description": "Required for sum/avg/min/max, forbidden for count. Only a root or computed NUMBER field with numericAggregate:true is accepted; MONEY and relation metrics are unsupported."
          },
          "groupBy": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180,
            "description": "Optional single groupable field. Omit for one overall value. No multi-axis, date-bucket, expression or money aggregation is accepted."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30,
            "default": 12
          }
        },
        "required": [
          "dataset",
          "operation"
        ],
        "additionalProperties": false
      },
      "ReportExportResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/ReportExportJob"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "ReportExportJob": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "QUEUED",
              "RUNNING",
              "SUCCEEDED",
              "FAILED"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "executionModel": {
            "type": "string",
            "enum": [
              "CLIENT_DRIVEN_ONCE"
            ]
          },
          "canExecute": {
            "type": "boolean"
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReportExportFile"
              },
              {
                "type": "object",
                "additionalProperties": false,
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          }
        },
        "required": [
          "id",
          "state",
          "createdAt",
          "expiresAt",
          "startedAt",
          "finishedAt",
          "executionModel",
          "canExecute",
          "error",
          "result"
        ]
      },
      "ReportExportFile": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "json",
              "csv",
              "xlsx",
              "pdf"
            ]
          },
          "mimeType": {
            "type": "string",
            "enum": [
              "application/json",
              "text/csv",
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
              "application/pdf"
            ]
          },
          "fileName": {
            "type": "string",
            "enum": [
              "unisoft-report.json",
              "unisoft-report.csv",
              "unisoft-report.xlsx",
              "unisoft-report.pdf"
            ]
          },
          "encoding": {
            "type": "string",
            "enum": [
              "base64"
            ]
          },
          "data": {
            "type": "string",
            "maxLength": 5600000
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "byteLength": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4194304
          },
          "scope": {
            "type": "string",
            "enum": [
              "REQUESTED_PAGE",
              "AGGREGATE"
            ]
          },
          "rowCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 200
          },
          "page": {
            "type": "integer",
            "nullable": true,
            "minimum": 1,
            "maximum": 500
          },
          "pageSize": {
            "type": "integer",
            "nullable": true,
            "minimum": 1,
            "maximum": 200
          },
          "totalMatches": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "hasMore": {
            "type": "boolean"
          },
          "readAt": {
            "type": "string",
            "format": "date-time"
          },
          "sourceComputedAt": {
            "type": "string",
            "nullable": true,
            "enum": [
              null
            ]
          },
          "freshness": {
            "type": "string",
            "enum": [
              "LIVE_QUERY"
            ]
          },
          "consistentSnapshot": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "units": {
            "type": "string",
            "enum": [
              "OWNER_RAW_UNITS"
            ]
          }
        },
        "required": [
          "format",
          "mimeType",
          "fileName",
          "encoding",
          "data",
          "sha256",
          "byteLength",
          "scope",
          "rowCount",
          "page",
          "pageSize",
          "totalMatches",
          "hasMore",
          "readAt",
          "sourceComputedAt",
          "freshness",
          "consistentSnapshot",
          "units"
        ]
      },
      "StatisticsJobError": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "error"
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Format: `ke_live_xxx`"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
```
