{"openapi":"3.1.0","info":{"title":"Alviss API","description":"\nThe Alviss API enables programmatic management of projects, datasets, models etc\nfor data-driven business analysis. This documentation details endpoints for\nuploading data, managing attribution sets, and analyzing variable impacts within\na project, supporting efficient workflows for business optimization.\n\n\n## Authentication - Access Token\nTo create the access token, please see [Create Access Token](https://docs.alviss.io/API#managing-access-tokens)\n\nyou can authenticate your request by sending the token in the `Authorization` header of your request. \\\nFor example, in the following request, replace `YOUR-TOKEN` with a reference to your token:\n```bash\ncurl --request GET \\\n  --url \"https://api.alviss.io/v1/team/teams\" \\\n  --header \"Authorization: Bearer YOUR-TOKEN\" \\\n  --header \"Accept: application/json\"\n```\n\n\n## Parameters\n\n### Commons\n- `team_id` : the team id, you can get this from\n[Team - list teams](#/Team/list__teams_get) endpoint\n- `project_id` : the project id, you can get this from [Comnav - list projects](#/Comnav%20-%20Project%2FManage/list_projects_projects__team_id__get)\n\n### Filters\nComnav-api uses filters to do pagination and data filtering. These filters let user to do db query through json validated filters.\n\ne.g : `filters='{\"Models.Name\" : [[ \"startswith\", \"prefix\"]]}'` in \"GET datasets\" endpoint would list out datasets that was use to train model with name starts with\"prefix\"\n\nTo filter dataset's data we use different which would apply to dataset's data e.g : `data_filters='{\"Sales.Country\" : [[ \"=\", \"SWE\"]]}'` would filter all data with country = \"SWE\" across for Sales datatype. To simplify applying filter across all datatypes `data_filters='{\"Country\" : [[ \"=\", \"SWE\"]]}'` is also supportedbut only work son \"Country\", \"Region\", \"Grouping\" and \"Date\" columns.\n\n\n## Errors\n\nEvery error response is a JSON object with a `detail` field, and the status code\ntells you what kind of failure it was:\n\n- `422` - the request body failed type or shape validation. `detail` is the list of\npydantic errors, each naming the offending field.\n- `400` - the body was understood but rejected by a rule: model and dataset are\nincompatible, a constraint has the wrong length, dates fall outside the dataset, ...\n- `404` - an entity referenced by the URL or the body does not exist.\n- `405` - the project is read-only.\n","version":"v1"},"servers":[{"url":"https://api.alviss.io/v1"}],"paths":{"/api/info/currencies":{"get":{"tags":["Info"],"summary":"Get Currencies","description":"Get supported currencies.","operationId":"get_currencies_info_currencies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Currency"},"type":"array","title":"Response Get Currencies Info Currencies Get"}}}}}}},"/api/info/example/datauploads":{"get":{"tags":["Data Uploads"],"summary":"Get Dataupload Example","description":"Get data file example from the data specification.","operationId":"get_dataupload_example_info_example_datauploads_get","parameters":[{"name":"dataset_name","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Dataset"}},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TableFormat","default":"long"}},{"name":"filetype","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FileType","default":"csv"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/info/datasource":{"get":{"tags":["Info"],"summary":"Get External Macro Info","description":"Get external data source info.\n\nThis endpoint is used to get the information about the external data source.","operationId":"get_external_macro_info_info_datasource_get","parameters":[{"name":"dataset_name","in":"query","required":true,"schema":{"enum":["Macro","Weather"],"type":"string","title":"Dataset Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/info/data_formats":{"get":{"tags":["Info"],"summary":"Get Data Formats","description":"Get data formats.","operationId":"get_data_formats_info_data_formats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/projects/{team_id}":{"post":{"tags":["Projects"],"summary":"Create Project","description":"Create a new project.","operationId":"create_project_projects__team_id__post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Projects"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Projects"],"summary":"List Projects","description":"List available projects.\n\nDeliberately just each project's own row (see `response.ProjectDetail`):\nnone of the cross-table aggregates (active models, dataset metrics,\nper-market segment counts) are needed to pick a project out of a list,\nand computing them per page row isn't free. Use\n`/projects/{team_id}/{project_id}/resources` for those once a project is\nchosen.","operationId":"list_projects_projects__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"Sort order, format 'field:(asc|desc)'. field ∈ {name, created, last_used} (legacy: Name, CreatedDate, LastUsedDate).","default":"created:asc","title":"Sort"},"description":"Sort order, format 'field:(asc|desc)'. field ∈ {name, created, last_used} (legacy: Name, CreatedDate, LastUsedDate)."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter projects by name (case-insensitive partial match)","title":"Name"},"description":"Filter projects by name (case-insensitive partial match)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ProjectDetail_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project","description":"Get a project info.\n\nDeliberately just the project's own row (see `response.ProjectDetail`):\n`AsyncProjectSessDep` already fetched it for team/project-scope validation,\nso there's no second query to make here. Cross-table aggregates (active\ndataset/model, spend/sales totals, etc.) live on `list_projects` and\n`/projects/{team_id}/{project_id}/resources` instead.\n\nA cache hit is served by `ManagedRoute` before `AsyncProjectSessDep` (or any\nother dependency) runs, so it opens no DB session at all -- see\n`invalidate_cached_project_routes` for how writes keep this from going\nstale beyond `_PROJECT_CACHE_TTL_SECONDS`.","operationId":"get_project_projects__team_id___project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project","description":"Delete a project.","operationId":"delete_project_projects__team_id___project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Projects"],"summary":"Update Project","description":"Update a project.","operationId":"update_project_projects__team_id___project_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Projects"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/active-history":{"get":{"tags":["Projects"],"summary":"Get Project Active History","description":"Return activation/deactivation events for this project, grouped by type.\n\nEach history row represents one state transition:\n- IId set    -> the entity became Selected (activated)\n- IId null   -> the previously-selected entity was deselected or soft-deleted\n\nTime-range semantics\n--------------------\nSuppose for datasets the project has had this activation timeline::\n\n    ds1 active 2024-01-01 -> 2025-01-01\n    ds2 active 2025-01-01 -> 2026-01-01\n    ds3 active 2026-01-01 -> (still active)\n\n1. **Window with no transitions** -- one entity active the whole time.\n   `?start_date=2025-03-01&end_date=2025-06-01` returns the ds2 activation\n   at 2025-01-01 (carried in from before the window) so the caller can see\n   that ds2 was the active dataset throughout the window.\n\n2. **Window covering a transition** -- multiple entities seen.\n   `?start_date=2024-12-01&end_date=2025-02-01` returns the ds1 activation\n   at 2024-01-01 (carried in), the ds1 deactivation at 2025-01-01, and the\n   ds2 activation at 2025-01-01 -- enough to reconstruct the full active\n   timeline across the window.\n\n3. **Open-ended window** -- omit `start_date` to retrieve every event up to\n   `end_date`, or omit both to retrieve the full project history.","operationId":"get_project_active_history_projects__team_id___project_id__active_history_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ActiveHistoryType"},{"type":"null"}],"description":"Restrict to one entity type. Omit to return all three grouped.","title":"Type"},"description":"Restrict to one entity type. Omit to return all three grouped."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Lower bound (ISO 8601) of the window. Events at or after this timestamp are returned. When set, the response also includes the single most-recent event strictly before start_date so callers can see what was active at the window boundary even if no transitions occurred inside the window.","title":"Start Date"},"description":"Lower bound (ISO 8601) of the window. Events at or after this timestamp are returned. When set, the response also includes the single most-recent event strictly before start_date so callers can see what was active at the window boundary even if no transitions occurred inside the window."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Upper bound (ISO 8601) of the window. Events at or before this timestamp are returned.","title":"End Date"},"description":"Upper bound (ISO 8601) of the window. Events at or before this timestamp are returned."},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ActiveHistoryAction"},{"type":"null"}],"description":"Filter to activation or deactivation events.","title":"Action"},"description":"Filter to activation or deactivation events."},{"name":"updated_by_user","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact-match filter for UpdatedByUser.","title":"Updated By User"},"description":"Exact-match filter for UpdatedByUser."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"Maximum rows per entity type (safety cap).","default":500,"title":"Limit"},"description":"Maximum rows per entity type (safety cap)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/resources":{"get":{"tags":["Projects"],"summary":"Get Project Resources","description":"Get list of resources from a project.","operationId":"get_project_resources_projects__team_id___project_id__resources_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResources"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/model-quality-rules":{"get":{"tags":["Projects"],"summary":"Get Model Quality Rules","description":"Return all model quality rules for a project (empty list if none stored).","operationId":"get_model_quality_rules_projects__team_id___project_id__model_quality_rules_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityRulesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Projects"],"summary":"Put Model Quality Rules","description":"Reconcile the project's rules against the incoming set.\n\nRules are matched by `RuleId`:\n- new ids are inserted,\n- existing ids whose columns or filters changed are updated in place,\n- existing ids absent from the body are deleted (cascade removes filters),\n- unchanged rows are left untouched so their `Id` is stable across calls.","operationId":"put_model_quality_rules_projects__team_id___project_id__model_quality_rules_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityRulesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityRulesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/seed":{"post":{"tags":["Projects"],"summary":"Seed Project","description":"Seed the project with a completed upload/dataset/model + result jobs.\n\nNot reachable unless `ALLOW_PROJECT_SEEDING` is set - this writes\nfabricated \"completed\" jobs straight into the project's tables/s3,\nbypassing drun, and must never run against production data.","operationId":"seed_project_projects__team_id___project_id__seed_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SeedProjectRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads":{"post":{"tags":["Data Uploads"],"summary":"Upload Data","description":"Upload a data file.\n\nThe file should be in CSV, Excel, or Gzip format.","operationId":"upload_data_projects__team_id___project_id__datauploads_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_name","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Dataset"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom name, unique within the project: a taken name returns 400, send `prefix` instead to get a free one. Autogenerated if empty.","title":"Name"},"description":"Custom name, unique within the project: a taken name returns 400, send `prefix` instead to get a free one. Autogenerated if empty."},{"name":"note","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},{"name":"prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...).","title":"Prefix"},"description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_data_projects__team_id___project_id__datauploads_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Data Uploads"],"summary":"List Datauploads","description":"Get list of data uploads.\n\nThis endpoint retrieves a paginated list of data uploads based on the provided\nfilters. It supports optional inclusion of related variables and combinations.\n\nRows carry the upload's ``MinDate`` / ``MaxDate``; pass\n``with_variable_ids`` for the ids of the variables it holds, or\n``with_variables`` for the variables themselves. All three read the config\nrows written at ingest; a COMPLETE upload with none yet is seeded on its\nfirst read. Uploads that are not COMPLETE, or are deleted, carry no dates\nor variables.\n\nParameters:\n- filters : A list of filters to apply to the data uploads query.\n  The filters should be provided in JSON format. Example usage:\n  filters='{\"DataSet.Models.SimulationJobs.Name\" : [[ \"contains\", \"SimName\"]]}'\n- sess (Session): The database session to use for the query.\n- project: The project context required for the query.","operationId":"list_datauploads_projects__team_id___project_id__datauploads_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By dataset name: filters='{\"DatasetName\": [[\"=\", \"Sales\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - Recent imports: filters='{\"Date\": [[\">=\", \"2024-01-01\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By dataset name: filters='{\"DatasetName\": [[\"=\", \"Sales\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - Recent imports: filters='{\"Date\": [[\">=\", \"2024-01-01\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        "},{"name":"with_variables","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variables"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_DataImportVariables_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Data Uploads"],"summary":"Bulk Delete Datauploads","description":"Bulk delete data uploads matching the given filters.\n\nMarks all matching uploads for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.\nUploads used in an active dataset, model, or attribution set are excluded.","operationId":"bulk_delete_datauploads_projects__team_id___project_id__datauploads_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /datauploads.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /datauploads.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}":{"get":{"tags":["Data Uploads"],"summary":"Get Dataupload","description":"Get a dataupload info.","operationId":"get_dataupload_projects__team_id___project_id__datauploads__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataImportVariables"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Data Uploads"],"summary":"Delete Dataupload","description":"Delete a dataupload file.","operationId":"delete_dataupload_projects__team_id___project_id__datauploads__item_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Data Uploads"],"summary":"Update Dataupload","description":"Update a dataupload's note.","operationId":"update_dataupload_projects__team_id___project_id__datauploads__item_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataUploadsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataImport"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}/external_indicators":{"get":{"tags":["Data Uploads"],"summary":"Get External Dataupload Indicators","description":"Get list of indicators for external datasource per country.","operationId":"get_external_dataupload_indicators_projects__team_id___project_id__datauploads__item_id__external_indicators_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CoutnryIndicatorDates"},"title":"Response Get External Dataupload Indicators Projects  Team Id   Project Id  Datauploads  Item Id  External Indicators Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}/dates_min_max":{"get":{"tags":["Data Uploads"],"summary":"Get Dataupload Dates Min Max","description":"Get min and max data dates for a data upload.","operationId":"get_dataupload_dates_min_max_projects__team_id___project_id__datauploads__item_id__dates_min_max_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRange-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}/data":{"get":{"tags":["Data Uploads"],"summary":"Downalod Dataupload","description":"Get a dataupload in csv format and would exclude auto-generated variables.","operationId":"downalod_dataupload_projects__team_id___project_id__datauploads__item_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}/interpolate_variable_data":{"get":{"tags":["Data Uploads"],"summary":"Download Interpolated Upload","description":"Download a dataimport interpolated variable as csv.","operationId":"download_interpolated_upload_projects__team_id___project_id__datauploads__item_id__interpolate_variable_data_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"data_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter data rows by geographic or other attributes.\n\n        Examples:\n        - By country: filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple countries: filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By region: filters='{\"Region\": [[\"=\", \"northeast\"]]}'\n        - By date: filters='{\"Date\": [[\">=\", \"2024-01-01\"]]}'\n        ","title":"Data Filters"},"description":"\n        Filter data rows by geographic or other attributes.\n\n        Examples:\n        - By country: filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple countries: filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By region: filters='{\"Region\": [[\"=\", \"northeast\"]]}'\n        - By date: filters='{\"Date\": [[\">=\", \"2024-01-01\"]]}'\n        "},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value.","title":"Start Date"},"description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data.","title":"End Date"},"description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data."},{"name":"lz_data_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"data_filters lz-string compressed, for filters too long for a URL","title":"Lz Data Filters"},"description":"data_filters lz-string compressed, for filters too long for a URL"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}/interpolate_variable_data_query":{"post":{"tags":["Data Uploads"],"summary":"Download Interpolated Upload Query","description":"Download dataimport interpolated variable — POST variant for large filter payloads.","operationId":"download_interpolated_upload_query_projects__team_id___project_id__datauploads__item_id__interpolate_variable_data_query_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterpolateUploadBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}/variable_interpolation":{"get":{"tags":["Data Uploads"],"summary":"List Dataupload Variable Interpolation","description":"List the interpolation chain per variable and modelling combination.\n\nAn upload that predates the feature has its config materialised with the\nderived Group/Type defaults on the way in, so the answer is always stored\ndata.","operationId":"list_dataupload_variable_interpolation_projects__team_id___project_id__datauploads__item_id__variable_interpolation_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableInterpolation"},"title":"Response List Dataupload Variable Interpolation Projects  Team Id   Project Id  Datauploads  Item Id  Variable Interpolation Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Data Uploads"],"summary":"Patch Dataupload Variable Interpolation","description":"Set the chain of one or more of the upload's (variable, combination) rows.\n\nRejected as a whole when a row targets a variable unknown to the project or\na combination the upload does not carry. Datasets built from the upload pick\nthe config up at creation time; datasets that already exist are unaffected.","operationId":"patch_dataupload_variable_interpolation_projects__team_id___project_id__datauploads__item_id__variable_interpolation_patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchVariableInterpolations"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableInterpolation"},"title":"Response Patch Dataupload Variable Interpolation Projects  Team Id   Project Id  Datauploads  Item Id  Variable Interpolation Patch"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}/modelling_combinations":{"get":{"tags":["Data Uploads"],"summary":"List Dataupload Modelling Combinations","description":"List the upload's modelling combinations (Country/Region/Grouping).\n\nRead from ``DataImportModellingComb``, which the import fills with the upload's\ndistinct combinations, so this never touches the data rows — unlike\n``distinct_columns``, which copies every row into DuckDB to find them.","operationId":"list_dataupload_modelling_combinations_projects__team_id___project_id__datauploads__item_id__modelling_combinations_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"array","items":{"type":"string"}},"title":"Response List Dataupload Modelling Combinations Projects  Team Id   Project Id  Datauploads  Item Id  Modelling Combinations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets":{"post":{"tags":["Datasets"],"summary":"Create Dataset","description":"Create a new dataset.\n\nThis endpoint allows the creation of a new dataset within a specified project.\nIt can handle both existing datasets and new data imports.","operationId":"create_dataset_projects__team_id___project_id__datasets_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSetRequest","description":"Left empty to use all data upload available"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSet"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Datasets"],"summary":"List Datasets","description":"List datasets.\n\nRetrieves a paginated list of datasets in a project, with optional\nfilters like names of simulation job where the dataset was used.\n\nEvery row carries the dataset's ``MinDate`` / ``MaxDate`` from its cached\nmetrics; pass ``with_variable_ids`` for the ids of the variables it holds.","operationId":"list_datasets_projects__team_id___project_id__datasets_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - Active dataset: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Marketing\"]]}'\n        - Recent datasets: filters='{\"CreatedDate\": [[\">=\", \"2024-01-01\"]]}'\n        - By model usage: filters='{\"Models.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - Active dataset: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Marketing\"]]}'\n        - Recent datasets: filters='{\"CreatedDate\": [[\">=\", \"2024-01-01\"]]}'\n        - By model usage: filters='{\"Models.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_DataSet_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Datasets"],"summary":"Bulk Delete Datasets","description":"Bulk delete datasets matching the given filters.\n\nMarks all matching datasets for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.\nActive datasets and those used in active models or attribution sets are excluded.","operationId":"bulk_delete_datasets_projects__team_id___project_id__datasets_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /datasets.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Marketing\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /datasets.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Marketing\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/check":{"post":{"tags":["Datasets"],"summary":"Check Dataset","description":"Check whether a dataset request's sources merge without breaking a rule.\n\nSubmits a background check and returns its id; poll\n``GET /datasets/check/{check_id}`` for the result. The uploads and source\ndatasets are checked; derivations and external datasets are not. Nothing is\ncreated besides the check.","operationId":"check_dataset_projects__team_id___project_id__datasets_check_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSetRequest","description":"As for POST /datasets"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCheckSubmitted"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/check/{check_id}":{"get":{"tags":["Datasets"],"summary":"Get Dataset Check","description":"A dataset merge check's status and, once COMPLETE, what it found.","operationId":"get_dataset_check_projects__team_id___project_id__datasets_check__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"integer","title":"Check Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCheck"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/active-history":{"get":{"tags":["Datasets"],"summary":"List Dataset Active History","description":"List the history of active dataset changes for this project.","operationId":"list_dataset_active_history_projects__team_id___project_id__datasets_active_history_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), DataSetId (=, in). Example: filters='{\"UpdatedByUser\": [[\"=\", \"alice\"]]}'","title":"Filters"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), DataSetId (=, in). Example: filters='{\"UpdatedByUser\": [[\"=\", \"alice\"]]}'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_DataSetActiveHistory_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/activate":{"post":{"tags":["Datasets"],"summary":"Activate Dataset","description":"Activate a dataset.\n\nThis endpoint sets a specified dataset as active within a given project.","operationId":"activate_dataset_projects__team_id___project_id__datasets__dataset_id__activate_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Datasets"],"summary":"Deactivate Dataset","description":"Deactivate the active dataset.\n\nClears the active state of the specified dataset. After this call the\nproject will have no active dataset until a new one is activated.\n\nPath Parameters:\n    - dataset_id: The IId of the dataset to deactivate\n\nErrors:\n    - 400 if the dataset is not currently active","operationId":"deactivate_dataset_projects__team_id___project_id__datasets__dataset_id__activate_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}":{"patch":{"tags":["Datasets"],"summary":"Update Dataset","description":"Update dataset attributes.\n\nModifies attributes like name or note for a specific dataset in a\nproject.","operationId":"update_dataset_projects__team_id___project_id__datasets__dataset_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchDataSet"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSet"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Datasets"],"summary":"Delete Dataset","description":"Delete a dataset.\n\nRemoves a dataset and its related jobs and attribution sets from a\nproject. Refused while the dataset is active, has an active model or feeds\nthe active attribution set.","operationId":"delete_dataset_projects__team_id___project_id__datasets__dataset_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Datasets"],"summary":"Get Dataset","description":"Get details of a dataset.\n\nRetrieves detailed information about a specific dataset in a project,\nincluding related data imports. Carries the dataset's ``MinDate`` /\n``MaxDate`` from its cached metrics; pass ``with_variable_ids`` for the\nids of the variables it holds.","operationId":"get_dataset_projects__team_id___project_id__datasets__dataset_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedDataSet"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/variable_limits":{"get":{"tags":["Datasets"],"summary":"List Dataset Variable Limits","description":"List per-variable, per-modelling-combination limits for a dataset.\n\nReturns one row per ``(VariableIId, Country, Region, Grouping)`` present in\nthe dataset's ``VariableStats``. ``MinLimit`` / ``MaxLimit`` are the\ndataset's own bounds (``null`` when unset); ``ProjectMinLimit`` /\n``ProjectMaxLimit`` the project envelope; ``EffectiveMinLimit`` /\n``EffectiveMaxLimit`` the bound that validation enforces, ``null`` meaning\nunbounded.","operationId":"list_dataset_variable_limits_projects__team_id___project_id__datasets__dataset_id__variable_limits_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetVariableLimit"},"title":"Response List Dataset Variable Limits Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Limits Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Datasets"],"summary":"Patch Dataset Variable Limits","description":"Bulk-update dataset-level variable limits.\n\nRejected as a whole if any row would:\n- Target a ``(VariableIId, Country, Region, Grouping)`` that doesn't exist\n  in this dataset's ``VariableStats`` (404 for the row).\n- Violate the project envelope on ``Variables.MinLimit`` / ``MaxLimit``.\n- Result in ``MinLimit >= MaxLimit``.\n\nForbidden once the dataset has been consumed by sim/pred/attribution/\noptimize/response-curve/prior-posterior/Model — the way to get new limits\nis to create a new dataset.\n\nOn success, ``DataSet.Blocked`` is re-computed against the dataset's data.\n\nThe rules themselves live in ``utils.dataset.apply_dataset_variable_limits``,\nshared with the ``set_variable_limits`` MCP tool.","operationId":"patch_dataset_variable_limits_projects__team_id___project_id__datasets__dataset_id__variable_limits_patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchDatasetVariableLimits"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetVariableLimit"},"title":"Response Patch Dataset Variable Limits Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Limits Patch"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/limit_violations":{"get":{"tags":["Datasets"],"summary":"List Dataset Limit Violations","description":"List the variable segments whose data blocks the dataset.\n\nOne row per ``(Slug, Country, Region, Grouping)`` with at least one value\nstrictly below its dataset ``MinLimit`` or strictly above its ``MaxLimit``;\na null bound checks nothing. ``BelowCount`` / ``AboveCount`` count those\nvalues, ``Lowest`` / ``Highest`` give the worst of each. Sorted by the\nnumber of values outside the limits, most first, then by slug and segment.\n\nA dataset that is not ``Blocked`` answers ``[]`` without reading its data.","operationId":"list_dataset_limit_violations_projects__team_id___project_id__datasets__dataset_id__limit_violations_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetLimitViolation"},"title":"Response List Dataset Limit Violations Projects  Team Id   Project Id  Datasets  Dataset Id  Limit Violations Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/variable_interpolation":{"get":{"tags":["Datasets"],"summary":"List Dataset Variable Interpolation","description":"List the interpolation chain per variable and modelling combination.\n\nA dataset that predates the feature has its config materialised with the\nderived Group/Type defaults on the way in, so the answer is always stored\ndata.","operationId":"list_dataset_variable_interpolation_projects__team_id___project_id__datasets__dataset_id__variable_interpolation_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableInterpolation"},"title":"Response List Dataset Variable Interpolation Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Interpolation Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Datasets"],"summary":"Patch Dataset Variable Interpolation","description":"Bulk-update the dataset's per-(variable, combination) interpolation chains.\n\nRejected as a whole if any row targets a\n``(VariableIId, Country, Region, Grouping)`` that is not part of this\ndataset.\n\nForbidden once the dataset has been consumed by sim/pred/attribution/\noptimize/response-curve/prior-posterior/Model — the way to get a different\nchain is to create a new dataset.","operationId":"patch_dataset_variable_interpolation_projects__team_id___project_id__datasets__dataset_id__variable_interpolation_patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchVariableInterpolations"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableInterpolation"},"title":"Response Patch Dataset Variable Interpolation Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Interpolation Patch"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/data":{"get":{"tags":["Datasets"],"summary":"Download Dataset","description":"Download dataset data.\n\nRetrieves data from a specific dataset in a project as a CSV file,\nmerging data if no dataset name is specified.","operationId":"download_dataset_projects__team_id___project_id__datasets__dataset_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_name","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Dataset"},{"type":"null"}],"title":"Dataset Name"}},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"country_code","in":"query","required":false,"schema":{"type":"string","description":"Three letters of country code","title":"Country Code"},"description":"Three letters of country code"},{"name":"region_code","in":"query","required":false,"schema":{"type":"string","description":"Region code","title":"Region Code"},"description":"Region code"},{"name":"grouping","in":"query","required":false,"schema":{"type":"string","description":"Grouping","title":"Grouping"},"description":"Grouping"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/variable_data":{"get":{"tags":["Datasets"],"summary":"Download Variable","description":"Download dataset variable data.\n\nRetrieves variable-specific data from a dataset in a project as CSV,\nwith optional filters like country.","operationId":"download_variable_projects__team_id___project_id__datasets__dataset_id__variable_data_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"data_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter data rows by geographic or other attributes.\n\n        Examples:\n        - By country: data_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: data_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By region: data_filters='{\"Region\": [[\"=\", \"northeast\"]]}'\n        - By date: data_filters='{\"Date\": [[\">=\", \"2024-01-01\"]]}'\n        ","title":"Data Filters"},"description":"\n        Filter data rows by geographic or other attributes.\n\n        Examples:\n        - By country: data_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: data_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By region: data_filters='{\"Region\": [[\"=\", \"northeast\"]]}'\n        - By date: data_filters='{\"Date\": [[\">=\", \"2024-01-01\"]]}'\n        "},{"name":"dataset_names","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Dataset"}},{"type":"null"}],"title":"Dataset Names"}},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_data_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"data_filters lz-string compressed, for filters too long for a URL","title":"Lz Data Filters"},"description":"data_filters lz-string compressed, for filters too long for a URL"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/variable_data_query":{"post":{"tags":["Datasets"],"summary":"Download Variable Query","description":"Download dataset variable data — POST variant for large filter payloads.","operationId":"download_variable_query_projects__team_id___project_id__datasets__dataset_id__variable_data_query_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableDataBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/archive":{"get":{"tags":["Datasets"],"summary":"Download Archive","description":"Download dataset as a zip file.\n\nRetrieves a specific dataset in a project as a zip file containing\nCSV-formatted data.","operationId":"download_archive_projects__team_id___project_id__datasets__dataset_id__archive_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/variable":{"post":{"tags":["Datasets"],"summary":"List Variables Post ","description":"List dataset variables.\n\nRetrieves available variables for a specific dataset in a project,\nformatted by the set function.","operationId":"list_variables_post__projects__team_id___project_id__datasets__dataset_id__variable_post","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"set_fn","in":"query","required":false,"schema":{"enum":["union","grouped","intersect"],"type":"string","default":"union","title":"Set Fn"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"}},{"type":"null"}],"title":"Modelling Combinations"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"}},{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}],"title":"Response List Variables Post  Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Datasets"],"summary":"List Variables","description":"List dataset variables.\n\nRetrieves available variables for a specific dataset in a project,\nformatted by the set function.","operationId":"list_variables_projects__team_id___project_id__datasets__dataset_id__variable_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"set_fn","in":"query","required":false,"schema":{"enum":["union","grouped","intersect"],"type":"string","default":"union","title":"Set Fn"}},{"name":"combinations","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"},"description":"List of modelling combinations to get variables for.","title":"Combinations"},"description":"List of modelling combinations to get variables for."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"}},{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}],"title":"Response List Variables Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/sales_economics":{"get":{"tags":["Datasets"],"summary":"Get Sales Economics","description":"Pair each product's units sold with its price, cost and profit variables.\n\nLists what a revenue or profit optimization target lacks in this dataset,\nusing the pairing the optimization submit validates against.","operationId":"get_sales_economics_projects__team_id___project_id__datasets__dataset_id__sales_economics_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"set_fn","in":"query","required":false,"schema":{"enum":["union","grouped","intersect"],"type":"string","default":"union","title":"Set Fn"}},{"name":"combinations","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"},"description":"List of modelling combinations to get variables for.","title":"Combinations"},"description":"List of modelling combinations to get variables for."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesEconomics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/importantce":{"post":{"tags":["Datasets"],"summary":"List Variable Importance","description":"List variable importance for a dataset.\n\nCalculates importance of variables in a dataset for a model within a\nproject, using specified settings.","operationId":"list_variable_importance_projects__team_id___project_id__datasets__dataset_id__importantce_post","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"country_code","in":"query","required":true,"schema":{"type":"string","description":"Three letters of country code","title":"Country Code"},"description":"Three letters of country code"},{"name":"region_code","in":"query","required":true,"schema":{"type":"string","description":"Region code","title":"Region Code"},"description":"Region code"},{"name":"grouping","in":"query","required":true,"schema":{"type":"string","description":"Grouping","title":"Grouping"},"description":"Grouping"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSetImportance"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/correlation":{"post":{"tags":["Datasets"],"summary":"List Variable Correlation","description":"List variable correlation for a dataset.\n\nCalculates correlation of variables in a dataset for a model within\na project, using specified settings.","operationId":"list_variable_correlation_projects__team_id___project_id__datasets__dataset_id__correlation_post","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"country_code","in":"query","required":true,"schema":{"type":"string","description":"Three letters of country code","title":"Country Code"},"description":"Three letters of country code"},{"name":"region_code","in":"query","required":true,"schema":{"type":"string","description":"Region code","title":"Region Code"},"description":"Region code"},{"name":"grouping","in":"query","required":true,"schema":{"type":"string","description":"Grouping","title":"Grouping"},"description":"Grouping"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSetCorrelationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/modelling_combinations":{"get":{"tags":["Datasets"],"summary":"List Modelling Combinations","description":"List modelling combinations for a dataset.\n\nThis endpoint retrieves the intersection or union of all modelling combinations\n(Country/Region/Grouping) across the specified datasets within a project.\n\nWithout ``dataset_names``, the union is the combinations the dataset itself holds\n(exact when it was built with filters or from other datasets).","operationId":"list_modelling_combinations_projects__team_id___project_id__datasets__dataset_id__modelling_combinations_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_names","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Dataset Names"}},{"name":"column_names","in":"query","required":false,"schema":{"type":"array","items":{"enum":["Country","Region","Grouping"],"type":"string"},"default":["Country","Region","Grouping"],"title":"Column Names"}},{"name":"join_op","in":"query","required":false,"schema":{"enum":["union","intersect","both"],"type":"string","default":"union","title":"Join Op"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"array","items":{"type":"string"}}}],"title":"Response List Modelling Combinations Projects  Team Id   Project Id  Datasets  Dataset Id  Modelling Combinations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/dates":{"post":{"tags":["Datasets"],"summary":"Get Dates Multiple Modeling Combintions","description":"Get dates for multiple modelling combinations.\n\nThis endpoint retrieves the intersection of dates across the specified datasets and\nmodelling combinations within a project. Optionally, the dates can be extended by a\nspecified percentage.","operationId":"get_dates_multiple_modeling_combintions_projects__team_id___project_id__datasets__dataset_id__dates_post","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_names","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Dataset Names"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"}},{"type":"null"}],"title":"Modelling Combinations"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Datasets"],"summary":"Get Dates","description":"List dates for a dataset for a single modelling combination.\n\nThis endpoint retrieves the intersection of dates across the specified datasets\nfor a single modelling combination within a project. Optionally, the dates can be\nextended by a specified percentage.","operationId":"get_dates_projects__team_id___project_id__datasets__dataset_id__dates_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_names","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Dataset Names"}},{"name":"country_code","in":"query","required":false,"schema":{"type":"string","description":"Three letters of country code","title":"Country Code"},"description":"Three letters of country code"},{"name":"region_code","in":"query","required":false,"schema":{"type":"string","description":"Region code","title":"Region Code"},"description":"Region code"},{"name":"grouping","in":"query","required":false,"schema":{"type":"string","description":"Grouping","title":"Grouping"},"description":"Grouping"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/dates_min_max":{"get":{"tags":["Datasets"],"summary":"Get Dataset Dates Min Max","description":"Get min and max dates from dataset data.\n\nEvery table but Events answers from ``DataSetMetricsCache``, which the\ndependency already loaded: its two dates are a MIN/MAX over ``VariableStats``,\nfrozen once the dataset is COMPLETE. Events have no ``VariableStats`` rows,\nso their ``StartDate`` / ``EndDate`` still take one query. A dataset whose\ncache is missing, or predates ``EarliestDataPointDate`` and has not been\nthrough ``backfill_dataset_variable_interpolation`` yet, scans every table.","operationId":"get_dataset_dates_min_max_projects__team_id___project_id__datasets__dataset_id__dates_min_max_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRange-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/valid_models":{"get":{"tags":["Datasets"],"summary":"List Valid Models","description":"List of valid models for a dataset.\n\nRetrieves valid machine learning models for a dataset in a project,\nwith optional model ID filters.","operationId":"list_valid_models_projects__team_id___project_id__datasets__dataset_id__valid_models_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"model_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Model Ids"}},{"name":"country_code","in":"query","required":false,"schema":{"type":"string","description":"Three letters of country code","title":"Country Code"},"description":"Three letters of country code"},{"name":"region_code","in":"query","required":false,"schema":{"type":"string","description":"Region code","title":"Region Code"},"description":"Region code"},{"name":"grouping","in":"query","required":false,"schema":{"type":"string","description":"Grouping","title":"Grouping"},"description":"Grouping"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Models"},"title":"Response List Valid Models Projects  Team Id   Project Id  Datasets  Dataset Id  Valid Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/importance":{"post":{"tags":["Feature Importance"],"summary":"Submit Feature Importance Calculation","description":"Submit a feature importance job.\n\nCreates a job to calculate feature importance for variables in a\ndataset using a model within a project.","operationId":"submit_feature_importance_calculation_projects__team_id___project_id__importance_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"country_code","in":"query","required":false,"schema":{"type":"string","description":"Three letters of country code","title":"Country Code"},"description":"Three letters of country code"},{"name":"region_code","in":"query","required":false,"schema":{"type":"string","description":"Region code","title":"Region Code"},"description":"Region code"},{"name":"grouping","in":"query","required":false,"schema":{"type":"string","description":"Grouping","title":"Grouping"},"description":"Grouping"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSetImportanceJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureImportance"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Feature Importance"],"summary":"List Feature Importance","description":"List feature importance jobs.\n\nRetrieves a paginated list of jobs calculating feature importance\nfor models in a project, with optional filters.","operationId":"list_feature_importance_projects__team_id___project_id__importance_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_FeatureImportance_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/importance/{importance_id}":{"delete":{"tags":["Feature Importance"],"summary":"Delete Feature Importance","description":"Delete a feature importance job.\n\nRemoves a specific job calculating feature importance for a model\nfrom a project.","operationId":"delete_feature_importance_projects__team_id___project_id__importance__importance_id__delete","parameters":[{"name":"importance_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide feature importance job IId.","title":"Importance Id"},"description":"Provide feature importance job IId."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Feature Importance"],"summary":"Get Feature Importance","description":"Get details of a feature importance job.\n\nRetrieves detailed information about a job calculating feature\nimportance for a model in a project.","operationId":"get_feature_importance_projects__team_id___project_id__importance__importance_id__get","parameters":[{"name":"importance_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide feature importance job IId.","title":"Importance Id"},"description":"Provide feature importance job IId."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedFeatureImportance"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/importance/{importance_id}/data":{"get":{"tags":["Feature Importance"],"summary":"Download Feature Importance","description":"Download feature importance job data.\n\nRetrieves data for a feature importance job of a model in a project,\nwith optional filters on the result columns.","operationId":"download_feature_importance_projects__team_id___project_id__importance__importance_id__data_get","parameters":[{"name":"importance_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide feature importance job IId.","title":"Importance Id"},"description":"Provide feature importance job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter feature importance result data rows.\n\n        Filterable columns: Quantile, Target, Variable, Importance.\n\n        Examples:\n        - By target: result_filters='{\"Target\": [[\"=\", \"sales\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter feature importance result data rows.\n\n        Filterable columns: Quantile, Target, Variable, Importance.\n\n        Examples:\n        - By target: result_filters='{\"Target\": [[\"=\", \"sales\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/variable_overwrites":{"get":{"tags":["Variables"],"summary":"List Variable Overwrites","description":"List variable overwrites for a variable.","operationId":"list_variable_overwrites_projects__team_id___project_id__variable_overwrites_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"\n        Usage:\n        - filters='{\"IId\" : [[ \"in\", \"[1,2,3]\"]]}'\n        - filters='{\"Slug\" : [[ \"contains\", \"term\"]]}'\n        ","title":"Filters"},"description":"\n        Usage:\n        - filters='{\"IId\" : [[ \"in\", \"[1,2,3]\"]]}'\n        - filters='{\"Slug\" : [[ \"contains\", \"term\"]]}'\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableOverwrite"},"title":"Response List Variable Overwrites Projects  Team Id   Project Id  Variable Overwrites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Variables"],"summary":"Post Variable Overwrites","description":"Add variable overwrites in a project.\n\nyou can bulk upsert variable overwrites by passing a list of objects with VarIId, Combinations, Price and Profit.\nif both Price and Profit are null, the overwrite will be deleted.\n\nExample:\n```\n[\n  // Created or Updated\n  {\"VarIId\": 1, \"Country\": \"DEN\", \"Region\": \"all\", \"Grouping\": \"all\", \"Price\": 100.0, \"Profit\": 20.0},\n  // Deleted\n  {\"VarIId\": 1, \"Country\": \"DEN\", \"Region\": \"all\", \"Grouping\": \"all\", \"Price\": null, \"Profit\": null},\n]\n```","operationId":"post_variable_overwrites_projects__team_id___project_id__variable_overwrites_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PostVariableOverwrite"},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableOverwrite"},"title":"Response Post Variable Overwrites Projects  Team Id   Project Id  Variable Overwrites Post"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/variables":{"get":{"tags":["Variables"],"summary":"List Variables","description":"List variables.\n\nThis endpoint retrieves a paginated list of variables based on the provided filters\nwithin a specified project.","operationId":"list_variables_projects__team_id___project_id__variables_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By name: filters='{\"Name\": [[\"contains\", \"Sales\"]]}'\n        - By slug: filters='{\"Slug\": [[\"contains\", \"media-tv\"]]}'\n        - By type: filters='{\"Type\": [[\"=\", \"Media\"]]}'\n        - By group: filters='{\"Group\": [[\"=\", \"KPI\"]]}'\n        - Multiple types: filters='{\"Type\": [[\"in\", \"[\\\"Media\\\", \\\"Sales\\\"]\"]]}'\n        - Name search: filters='{\"Name\": [[\"similarity\", \"television\"]]}'\n\n        Operators: =, !=, contains, startswith, endswith, ilike, in, notin, similarity\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By name: filters='{\"Name\": [[\"contains\", \"Sales\"]]}'\n        - By slug: filters='{\"Slug\": [[\"contains\", \"media-tv\"]]}'\n        - By type: filters='{\"Type\": [[\"=\", \"Media\"]]}'\n        - By group: filters='{\"Group\": [[\"=\", \"KPI\"]]}'\n        - Multiple types: filters='{\"Type\": [[\"in\", \"[\\\"Media\\\", \\\"Sales\\\"]\"]]}'\n        - Name search: filters='{\"Name\": [[\"similarity\", \"television\"]]}'\n\n        Operators: =, !=, contains, startswith, endswith, ilike, in, notin, similarity\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Variable_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/variables/all":{"get":{"tags":["Variables"],"summary":"List All Variables","description":"List all variables.\n\nThis endpoint retrieves every variable in a project as-is, with no\nfiltering, ordering, or pagination.\n\nOnly selects ``Variables``' own primitive columns — unlike a plain\n``select(Variables)``, this skips the mapper-level ``lazy=\"joined\"``\nUtility relationships (one join per variable ``Type``), which would\notherwise be pulled in on every row regardless of whether the response\nuses them.","operationId":"list_all_variables_projects__team_id___project_id__variables_all_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response List All Variables Projects  Team Id   Project Id  Variables All Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/variables/{var_id}":{"patch":{"tags":["Variables"],"summary":"Update Varaible","description":"Update a variable.\n\nThis endpoint updates the attributes of an existing variable based on the provided\nupdate data.","operationId":"update_varaible_projects__team_id___project_id__variables__var_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"var_id","in":"path","required":true,"schema":{"type":"integer","description":"Variable IId.","title":"Var Id"},"description":"Variable IId."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchVariable"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variable-Output"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/variable_util_overrides":{"get":{"tags":["Variables"],"summary":"List Variable Util Overrides","description":"List util_attr relabels for the project, optionally filtered by Type.","operationId":"list_variable_util_overrides_projects__team_id___project_id__variable_util_overrides_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/VariableTypes"},{"type":"null"}],"description":"Filter to one variable Type.","title":"Type"},"description":"Filter to one variable Type."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableUtilOverride"},"title":"Response List Variable Util Overrides Projects  Team Id   Project Id  Variable Util Overrides Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Variables"],"summary":"Post Variable Util Overrides","description":"Bulk upsert per-type util_attr relabels.\n\nEach item relabels one ``(Type, Attribute, OriginalValue)`` to\n``OverrideValue``; a null ``OverrideValue`` deletes that relabel. Repeating\na key within one batch is allowed and the last item wins, so a batch that\nsets and then clears the same key ends up cleared.\n\n``Sales.Metric``, ``Media.Metric``, ``Media.Channel`` and\n``CompetitorMedia.Channel`` are not relabelable — their base values are a\nfixed enum validated on import — and a non-null ``OverrideValue`` for them\nis rejected with 400. Clearing one is still allowed. A blank\n``OverrideValue`` is rejected; use null to clear.\n\nExample:\n```\n[\n  {\"Type\": \"Brand\", \"Attribute\": \"Brand\",\n   \"OriginalValue\": \"b1\", \"OverrideValue\": \"b2\"},\n  {\"Type\": \"Brand\", \"Attribute\": \"Metric\",\n   \"OriginalValue\": \"m1\", \"OverrideValue\": null}\n]\n```","operationId":"post_variable_util_overrides_projects__team_id___project_id__variable_util_overrides_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PostVariableUtilOverride"},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableUtilOverride"},"title":"Response Post Variable Util Overrides Projects  Team Id   Project Id  Variable Util Overrides Post"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/variable_util_overrides/{var_type}":{"patch":{"tags":["Variables"],"summary":"Patch Variable Util Overrides","description":"Set or clear util_attr relabels for a single variable Type.\n\nBody maps ``{Attribute: {OriginalValue: OverrideValue}}``; a null\n``OverrideValue`` clears that relabel. Returns the Type's relabels after the\nchange. The locked attributes and blank-value rules of the bulk POST apply\nhere too: ``Sales.Metric``, ``Media.Metric``, ``Media.Channel`` and\n``CompetitorMedia.Channel`` accept only null.\n\nExample body for ``PATCH .../variable_util_overrides/Brand``:\n```\n{\"Brand\": {\"b1\": \"b2\"}, \"Metric\": {\"m1\": \"Volume\"}}\n```","operationId":"patch_variable_util_overrides_projects__team_id___project_id__variable_util_overrides__var_type__patch","parameters":[{"name":"var_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/VariableTypes","description":"Variable Type to relabel, e.g. 'Brand'."},"description":"Variable Type to relabel, e.g. 'Brand'."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchVariableUtilOverride"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableUtilOverride"},"title":"Response Patch Variable Util Overrides Projects  Team Id   Project Id  Variable Util Overrides  Var Type  Patch"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/variable_hide_plan_input":{"get":{"tags":["Variables"],"summary":"List Variable Hide Plan Input","description":"List variables hidden from plan (predict/simulate/optimize) input.","operationId":"list_variable_hide_plan_input_projects__team_id___project_id__variable_hide_plan_input_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableHidePlanInput"},"title":"Response List Variable Hide Plan Input Projects  Team Id   Project Id  Variable Hide Plan Input Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Variables"],"summary":"Post Variable Hide Plan Input","description":"Hide variables from plan (predict/simulate/optimize) input.\n\nPass a list of Variable IIds to hide. Already-hidden variables are left as-is.","operationId":"post_variable_hide_plan_input_projects__team_id___project_id__variable_hide_plan_input_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableHidePlanInput"},"title":"Response Post Variable Hide Plan Input Projects  Team Id   Project Id  Variable Hide Plan Input Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Variables"],"summary":"Delete Variable Hide Plan Input","description":"Unhide variables from plan (predict/simulate/optimize) input.","operationId":"delete_variable_hide_plan_input_projects__team_id___project_id__variable_hide_plan_input_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"},"description":"Variable IIds to unhide.","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableHidePlanInput"},"title":"Response Delete Variable Hide Plan Input Projects  Team Id   Project Id  Variable Hide Plan Input Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graphs":{"get":{"tags":["Models"],"summary":"List Graphs","description":"List saved graph structures for model building.\n\nGraphs define the causal structure (nodes and edges) used for model training.\nThey can be reused across multiple models to ensure consistent methodology.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results\n      Example: '{\"Id\": [[\"=\", \"1\"]]}'\n\nResponse:\n    Paginated list of graphs with their model instances.\n\nRelated:\n    - POST /build/graphs: Save a new graph\n    - POST /build/model: Use a graph to train a model","operationId":"list_graphs_projects__team_id___project_id__build_graphs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By ID: filters='{\"Id\": [[\"=\", \"1\"]]}'\n        - By instances job: filters='{\"InstancesJobId\": [[\"isnot\", \"NULL\"]]}'\n        - Multiple IDs: filters='{\"Id\": [[\"in\", \"[1, 2, 3]\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By ID: filters='{\"Id\": [[\"=\", \"1\"]]}'\n        - By instances job: filters='{\"InstancesJobId\": [[\"isnot\", \"NULL\"]]}'\n        - Multiple IDs: filters='{\"Id\": [[\"in\", \"[1, 2, 3]\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Graphs_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Models"],"summary":"Save Graph","description":"Save a graph structure for reuse in model building.\n\nGraphs define causal relationships between variables using nodes (variables)\nand edges (relationships). Save graphs to reuse across multiple models\nor share methodology across team members.\n\nResponse:\n    The ID of the saved graph (use as graph_id in POST /build/model)\n\nRelated:\n    - GET /build/graphs: List saved graphs\n    - POST /build/model: Use graph_id to build a model","operationId":"save_graph_projects__team_id___project_id__build_graphs_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid model build request: invalid graph, missing variables, conflicting dates, or invalid hyperparameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The requested attribution name is already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graphs/{graph_id}":{"get":{"tags":["Models"],"summary":"Get Graph","description":"Get a graph by ID.\n\nThis endpoint retrieves a graph by its ID within a specified project.\n\nResponse:\n    The graph's `nodes` and `edges`, with its `Name`, `Note`, `CreatedAt`,\n    `CreatorId`, `NodeCount` and `EdgeCount` beside them.","operationId":"get_graph_projects__team_id___project_id__build_graphs__graph_id__get","parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"integer","title":"Graph Id"}},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Models"],"summary":"Update Graph","description":"Update a graph.\n\nThis endpoint updates an existing graph with the provided data. Send only\n`name` and `note` to rename or annotate it; its nodes and edges stay as\nthey are unless `graph` is sent.","operationId":"update_graph_projects__team_id___project_id__build_graphs__graph_id__patch","parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"integer","title":"Graph Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/model":{"post":{"tags":["Models"],"summary":"Build A Model","description":"Train a new ML model for forecasting business KPIs.\n\nInitiates model training using a causal graph structure and historical data.\nModels learn relationships between input variables (media spend, pricing, etc.)\nand target KPIs (sales, revenue, etc.) to enable forecasting and attribution.\n\nWorkflow:\n    1. Ensure you have a dataset with required variables (see POST /dataset)\n    2. Define the model graph (nodes/edges) or use graph_variables\n    3. Submit model build with this endpoint\n    4. Poll GET /models/{model_id} until Status is COMPLETED\n    5. Use the trained model for predictions, simulations, or optimizations\n\nResponse:\n    Returns the created model. Poll status until COMPLETED.\n\nRelated:\n    - GET /models/{model_id}: Poll training status\n    - POST /models/{model_id}/refit: Retrain with different data/parameters\n    - POST /predictions: Use trained model for forecasting\n    - POST /simulations: Use trained model for scenario analysis","operationId":"build_a_model_projects__team_id___project_id__build_model_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelBuildRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"}}}},"400":{"description":"Invalid model build request: invalid graph, missing variables, conflicting dates, or invalid hyperparameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The requested attribution name is already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/model_multiple":{"post":{"tags":["Models"],"summary":"Build Multiple Models","description":"Train multiple ML models for different market segments in batch.\n\nEfficient batch training for scenarios requiring models across multiple\nmodelling combinations (country/region/grouping). All models share the\nsame graph structure and training parameters but are trained independently\non their respective data segments.\n\nUse Cases:\n    - Train models for multiple countries simultaneously\n    - Create region-specific models with consistent methodology\n    - Build product-line specific models in parallel\n\nResponse:\n    List of created model objects. Use GET /models/{model_id} to check status.\n\nNotes:\n    - Models train in parallel for efficiency\n    - Failure of one model does not affect others\n    - Use GET /models/{model_id} to check individual model status\n\nRelated:\n    - POST /build/model: Train a single model\n    - GET /models: List all models with filtering","operationId":"build_multiple_models_projects__team_id___project_id__build_model_multiple_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelBuildMultipleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Models"},"title":"Response Build Multiple Models Projects  Team Id   Project Id  Build Model Multiple Post"}}}},"400":{"description":"Invalid model build request: invalid graph, missing variables, conflicting dates, or invalid hyperparameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The requested attribution name is already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graph_basic":{"post":{"tags":["Models"],"summary":"Get Basic Graph","description":"Get default graph.\n\nThis endpoint generates a basic graph based on the provided request data, project,\nand session.","operationId":"get_basic_graph_projects__team_id___project_id__build_graph_basic_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicGraphRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graph_basic/job":{"post":{"tags":["Models"],"summary":"Submit Basic Graph Task","description":"Get default graph.\n\nThis endpoint generates a basic graph based on the provided request data, project,\nand session. This will be done as a job in the backgroud.","operationId":"submit_basic_graph_task_projects__team_id___project_id__build_graph_basic_job_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicGraphJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphsBasicJob"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Models"],"summary":"List Basic Graph Tasks","description":"Get list of graph jobs.\n\nThis endpoint get list of graph basic job based on the provided\nrequest data and project.","operationId":"list_basic_graph_tasks_projects__team_id___project_id__build_graph_basic_job_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"completed\"]]}'\n        - By graph ID: filters='{\"Graph.Id\": [[\"=\", \"42\"]]}'\n        - By model usage: filters='{\"Models.Name\": [[\"contains\", \"US_Model\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"completed\"]]}'\n        - By graph ID: filters='{\"Graph.Id\": [[\"=\", \"42\"]]}'\n        - By model usage: filters='{\"Models.Name\": [[\"contains\", \"US_Model\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_GraphsBasicJob_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graph_basic/job/{job_id}":{"delete":{"tags":["Models"],"summary":"Delete Basic Graph Task","description":"Delete graph job.","operationId":"delete_basic_graph_task_projects__team_id___project_id__build_graph_basic_job__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide graph basic job path.","title":"Job Id"},"description":"Provide graph basic job path."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Models"],"summary":"Get Graph Basic Task","description":"Get graph job result from capability via drun.","operationId":"get_graph_basic_task_projects__team_id___project_id__build_graph_basic_job__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide graph basic job path.","title":"Job Id"},"description":"Provide graph basic job path."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedGraphJob"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graph_synergy_models":{"post":{"tags":["Models"],"summary":"Get Synergy Models Graph","description":"Get synergy models graph.\n\nThis endpoint generates a synergy models graph based on the provided request data,\nproject, and session.","operationId":"get_synergy_models_graph_projects__team_id___project_id__build_graph_synergy_models_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicGraphRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graph_synergy_models/job":{"post":{"tags":["Models"],"summary":"Submit Synergy Graph Task","description":"Submit synergy models graph job.\n\nThis endpoint generates a synergy models graph based on the provided request data,\nproject, and session. This will be done as a job in the background.","operationId":"submit_synergy_graph_task_projects__team_id___project_id__build_graph_synergy_models_job_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicGraphJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GraphsBasicJob"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Models"],"summary":"List Synergy Graph Tasks","description":"Get list of synergy models graph jobs.\n\nThis endpoint gets a list of synergy graph jobs based on the provided\nrequest data and project.","operationId":"list_synergy_graph_tasks_projects__team_id___project_id__build_graph_synergy_models_job_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"completed\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"completed\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_GraphsBasicJob_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graph_synergy_models/job/{job_id}":{"delete":{"tags":["Models"],"summary":"Delete Synergy Graph Task","description":"Delete synergy models graph job.","operationId":"delete_synergy_graph_task_projects__team_id___project_id__build_graph_synergy_models_job__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide graph synergy job path.","title":"Job Id"},"description":"Provide graph synergy job path."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Models"],"summary":"Get Synergy Graph Task","description":"Get synergy models graph job result.","operationId":"get_synergy_graph_task_projects__team_id___project_id__build_graph_synergy_models_job__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide graph synergy job path.","title":"Job Id"},"description":"Provide graph synergy job path."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedGraphJob"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/quality":{"get":{"tags":["Models"],"summary":"Get Models Quality","description":"Batch-fetch everything the model-quality verdict needs, for many models.\n\nReplaces per-model calls to GET /models/{model_id} plus the four\nattribution metrics endpoints (group_metrics, variable_metrics, group_roi,\nvariable_roi) with a single round trip for an entire table page — showing\nthe quality column for N rows otherwise fires up to 5*N requests.\n\nThe query itself lives in `utils.model_quality`, shared with the MCP\n`get_model_quality` tool, which evaluates the verdict these rows feed.\n\nQuery Parameters:\n    - model_ids: Repeated model IId query params, e.g.\n      ?model_ids=1&model_ids=2\n\nResponse:\n    Dict keyed by model IId. Ids that don't resolve to a model in this\n    project (wrong project, deleted, unknown id) are simply absent from\n    the result rather than erroring.\n\nRelated:\n    - GET /models/{model_id}: Full model details for a single model\n    - GET /attributions/{attributionjob_id}/group_metrics: Per-model,\n      non-batched equivalent of one slice of this response","operationId":"get_models_quality_projects__team_id___project_id__models_quality_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"model_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer"},"description":"Model IIds to fetch quality-verdict inputs for.","title":"Model Ids"},"description":"Model IIds to fetch quality-verdict inputs for."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ModelQualitySummary"},"title":"Response Get Models Quality Projects  Team Id   Project Id  Models Quality Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models":{"get":{"tags":["Models"],"summary":"List Models","description":"List all trained models in the project with optional filtering.\n\nReturns a paginated list of models, useful for finding trained models\nto use in predictions, simulations, or optimizations.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results\n      Example: '{\"Status\": [[\"=\", \"COMPLETED\"]], \"Country\": [[\"=\", \"USA\"]]}'\n\nResponse:\n    Paginated list of models.\n\nRelated:\n    - GET /models/{model_id}: Get full model details\n    - POST /build/model: Train a new model\n    - POST /models/{model_id}/activate: Set as active model","operationId":"list_models_projects__team_id___project_id__models_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By country: filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By name pattern: filters='{\"Name\": [[\"ilike\", \"%Q4%\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Active models only: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By related dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Combined: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n        - Best name match first:\n          filters='{\"Name\": [[\"ilike\", \"%Q4%\"], [\"orderbyrelevance\", \"Q4\"]]}'\n          orderbyrelevance takes the raw term, not a LIKE pattern.\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By country: filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By name pattern: filters='{\"Name\": [[\"ilike\", \"%Q4%\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Active models only: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By related dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Combined: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n        - Best name match first:\n          filters='{\"Name\": [[\"ilike\", \"%Q4%\"], [\"orderbyrelevance\", \"Q4\"]]}'\n          orderbyrelevance takes the raw term, not a LIKE pattern.\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ListedModels_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Models"],"summary":"Bulk Delete Models","description":"Bulk delete models matching the given filters.\n\nMarks all matching models for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.\nActive models and models with active attribution sets are excluded.","operationId":"bulk_delete_models_projects__team_id___project_id__models_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /models.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By country: filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /models.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By country: filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/active-history":{"get":{"tags":["Models"],"summary":"List Model Active History","description":"List the history of active model changes for this project.","operationId":"list_model_active_history_projects__team_id___project_id__models_active_history_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), ModelId (=, in), Country (=), Region (=), Grouping (=). Example: filters='{\"Country\": [[\"=\", \"SWE\"]]}'","title":"Filters"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), ModelId (=, in), Country (=), Region (=), Grouping (=). Example: filters='{\"Country\": [[\"=\", \"SWE\"]]}'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ModelActiveHistory_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}":{"get":{"tags":["Models"],"summary":"Get Model","description":"Get detailed information about a specific model.\n\nUse this endpoint to check training status, view model configuration,\nreview performance metrics, and see associated jobs (predictions,\nsimulations, attributions).\n\nPath Parameters:\n    - model_id: The IId of the model to retrieve\n\nResponse:\n    Detailed model object with related jobs and performance metrics.\n\nRelated:\n    - POST /predictions: Create a prediction with this model\n    - POST /simulations: Create a simulation with this model\n    - POST /models/{model_id}/refit: Retrain with different parameters","operationId":"get_model_projects__team_id___project_id__models__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedModel"}}}},"404":{"description":"Model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Models"],"summary":"Delete Model","description":"Delete a model and its associated data.\n\nMarks the model for deletion and triggers background cleanup. The deletion\nis asynchronous - the model is immediately hidden from listings but data\ncleanup happens in the background.\n\nPath Parameters:\n    - model_id: The IId of the model to delete\n\nRestrictions:\n    - Cannot delete the currently active (Selected=True) model\n    - Cannot delete models with active attribution sets\n\nResponse:\n    - message: Confirmation that deletion is in progress\n\nNotes:\n    - Deletion is permanent and cannot be undone\n    - All predictions and simulations using this model are also deleted\n    - Deactivate the model first if it's currently active","operationId":"delete_model_projects__team_id___project_id__models__model_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Cannot delete model: model is currently active (Selected=True) or has active attribution sets. Deactivate first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Models"],"summary":"Update Model","description":"Update metadata attributes of a model.\n\nAllows modification of mutable fields like Name and Note. Cannot modify\ntraining parameters or model weights after training.\n\nResponse:\n    Updated model object with all current attributes.","operationId":"update_model_projects__team_id___project_id__models__model_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchModels"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"}}}},"404":{"description":"Model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Another model in the project already has this name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/activate":{"post":{"tags":["Models"],"summary":"Activate Model","description":"Set a model as the active model for its market segment.\n\nThe active model is the default used by the UI for dashboards and\ncan be referenced using \"active\" in API requests. Only one model\nper modelling combination (country/region/grouping) can be active.\n\nPath Parameters:\n    - model_id: The IId of the model to activate\n\nEffects:\n    - Sets Selected=True for this model\n    - Deactivates any previously active model in the same segment\n    - UI dashboards will reflect the new active model\n\nPrerequisites:\n    Model Status should be COMPLETED for meaningful activation.\n\nRelated:\n    - GET /models: List models to find one to activate\n    - DELETE /models/{model_id}: Cannot delete active models","operationId":"activate_model_projects__team_id___project_id__models__model_id__activate_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Models"],"summary":"Deactivate Model","description":"Deactivate the active model for its market segment.\n\nClears the active state of the specified model. After this call the\nmarket segment (country/region/grouping) will have no active model\nuntil a new one is activated.\n\nPath Parameters:\n    - model_id: The IId of the model to deactivate\n\nErrors:\n    - 400 if the model is not currently active","operationId":"deactivate_model_projects__team_id___project_id__models__model_id__activate_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/node_map":{"get":{"tags":["Models"],"summary":"Node Map","description":"Map a renamed graph node's own variable to the one it stands for.\n\nA result file names its rows by graph node id, and `utils.variables.\npush_variables` registers every id it finds as a `Type=Model` variable of\nits own. So a node the graph renamed ends up with two Variables rows: the\none it is named after, and the one it actually means. Both sides here are\nIIds.\n\nOnly renamed nodes appear — for the rest the two rows are the same one.\nSo does a node no result file has named yet: it has no variable of its own\nto key on, and no caller can be holding an IId that was never issued.","operationId":"node_map_projects__team_id___project_id__models__model_id__node_map_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Node Map Projects  Team Id   Project Id  Models  Model Id  Node Map Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/node_slugs":{"get":{"tags":["Models"],"summary":"Node Slugs","description":"Map each renamed node id in the model's results to its dataset slug.\n\nUnrenamed nodes are left out, so `{}` means nothing to translate.","operationId":"node_slugs_projects__team_id___project_id__models__model_id__node_slugs_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Node Slugs Projects  Team Id   Project Id  Models  Model Id  Node Slugs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/model_target_nodes":{"get":{"tags":["Models"],"summary":"Project Model Target Nodes","description":"Get the distinct target Variables across all models in a project.\n\nReturns the union of Variables flagged ``TargetNode=True`` in any\nnon-deleted model that belongs to the given project.","operationId":"project_model_target_nodes_projects__team_id___project_id__model_target_nodes_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Project Model Target Nodes Projects  Team Id   Project Id  Model Target Nodes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/model_result_nodes":{"get":{"tags":["Models"],"summary":"Project Model Result Nodes","description":"Get the distinct result Variables across all models in a project.\n\nReturns the union of Variables flagged ``ResultNode=True`` in any\nnon-deleted model that belongs to the given project.","operationId":"project_model_result_nodes_projects__team_id___project_id__model_result_nodes_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Project Model Result Nodes Projects  Team Id   Project Id  Model Result Nodes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/model_input_nodes":{"get":{"tags":["Models"],"summary":"Project Model Input Nodes","description":"Get the distinct input Variables across all models in a project.\n\nReturns the union of Variables flagged ``InputNode=True`` in any\nnon-deleted model that belongs to the given project.","operationId":"project_model_input_nodes_projects__team_id___project_id__model_input_nodes_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Project Model Input Nodes Projects  Team Id   Project Id  Model Input Nodes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/valid_datasets":{"get":{"tags":["Models"],"summary":"Get Valid Datasets","description":"List datasets compatible with this model for refit or prediction.\n\nA dataset is compatible if it contains all variables required by the\nmodel's graph structure for the model's modelling combination\n(country/region/grouping).\n\nPath Parameters:\n    - model_id: The IId of the model\n\nResponse:\n    List of compatible datasets.\n\nUse Cases:\n    - Find datasets for model refit\n    - Verify dataset compatibility before prediction\n    - Select alternative data sources for forecasting\n\nRelated:\n    - POST /models/{model_id}/refit: Retrain with a compatible dataset\n    - POST /predictions: Use compatible dataset for forecasting","operationId":"get_valid_datasets_projects__team_id___project_id__models__model_id__valid_datasets_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataSet"},"title":"Response Get Valid Datasets Projects  Team Id   Project Id  Models  Model Id  Valid Datasets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/refit":{"post":{"tags":["Models"],"summary":"Refit Model","description":"Retrain an existing model with new data or parameters.\n\nCreates a new model using the same graph structure as an existing model\nbut with updated training data, date ranges, or hyperparameters. Useful\nfor model refresh workflows when new data is available.\n\nUse Cases:\n    - Refresh model with latest data while preserving graph structure\n    - Experiment with different training parameters\n    - Retrain on a different dataset\n\nResponse:\n    Returns the NEW model created from refit (not the original model).\n\nNotes:\n    - Creates a new model; does not modify the source model\n    - The source model must have COMPLETED training\n    - New model inherits the graph structure but not weights\n\nRelated:\n    - POST /build/model: Build a completely new model\n    - GET /models/{model_id}/valid_datasets: Find compatible datasets","operationId":"refit_model_projects__team_id___project_id__models__model_id__refit_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRefitRequest","default":{"model_param":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30},"model_detail":{"activate":false}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"}}}},"400":{"description":"Invalid refit request: source model not completed, invalid configuration, or dataset incompatible with model graph","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Source model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/simulations":{"post":{"tags":["Simulations"],"summary":"Submit Simulation","description":"Submit a simulation job to compare baseline vs scenario forecasts.\n\nUse simulations for \"what-if\" analysis comparing a baseline scenario against\none or more alternative scenarios with modified input variables (e.g., increased\nmarketing spend, pricing changes). Unlike predictions which forecast absolute\nvalues, simulations emphasize the differential impact between scenarios.\n\nWorkflow:\n    1. Ensure you have a trained model (see POST /build/model)\n    2. Define BaseScenario and Scenario variable updates in updated_values\n    3. Submit simulation with this endpoint\n    4. Poll GET /simulations/{simulation_id} until Status is COMPLETED\n    5. Retrieve comparative results via GET /simulations/{simulation_id}/data\n\nResponse:\n    Returns the created simulation job. Poll status until COMPLETED.\n\nRelated:\n    - GET /simulations/{simulation_id}: Poll job status\n    - GET /simulations/{simulation_id}/data: Download comparison results\n    - POST /predictions: Use for absolute forecasts (not comparative)\n    - POST /optimizations: Use for budget allocation optimization","operationId":"submit_simulation_projects__team_id___project_id__simulations_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationJobs"}}}},"400":{"description":"Invalid simulation request: model not found, invalid date range, invalid scenario configuration, or dataset incompatible with model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Simulations"],"summary":"List Simulations","description":"List all simulation jobs in the project with optional filtering.\n\nReturns a paginated list of simulation jobs, useful for monitoring job\nstatus, reviewing scenario analyses, or auditing simulation history.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results\n      Example: '{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n\nResponse:\n    Paginated list of simulation jobs.\n\nRelated:\n    - GET /simulations/{simulation_id}: Get full details for a specific job\n    - POST /simulations: Create a new simulation job","operationId":"list_simulations_projects__team_id___project_id__simulations_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - By scenario dates: filters='{\"ScenarioStartDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Recent simulations: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - With notes only: filters='{\"Note\": [[\"isnot\", \"NULL\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        - Name search: filters='{\"Name\": [[\"similarity\", \"scenario analysis\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - By scenario dates: filters='{\"ScenarioStartDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Recent simulations: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - With notes only: filters='{\"Note\": [[\"isnot\", \"NULL\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        - Name search: filters='{\"Name\": [[\"similarity\", \"scenario analysis\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_SimulationJobs_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Simulations"],"summary":"Bulk Delete Simulations","description":"Bulk delete simulation jobs matching the given filters.\n\nMarks all matching jobs for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.","operationId":"bulk_delete_simulations_projects__team_id___project_id__simulations_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /simulations.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /simulations.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/simulations/{simulation_id}":{"get":{"tags":["Simulations"],"summary":"Get Simulation","description":"Get detailed information about a specific simulation job.\n\nUse this endpoint to check job status, view scenario configurations,\nand access metadata. Poll this endpoint until Status is COMPLETED\nbefore downloading results.\n\nPath Parameters:\n    - simulation_id: The IId of the simulation job to retrieve\n\nResponse:\n    Detailed simulation job object with scenario configurations and task progress.\n\nRelated:\n    - GET /simulations/{simulation_id}/data: Download results (after COMPLETED)\n    - DELETE /simulations/{simulation_id}: Remove the simulation job","operationId":"get_simulation_projects__team_id___project_id__simulations__simulation_id__get","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide simulation IId","title":"Simulation Id"},"description":"Provide simulation IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedSimulationJobs"}}}},"404":{"description":"Simulation job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Simulations"],"summary":"Delete Simulation","description":"Delete a simulation job and its associated data.\n\nMarks the simulation job for deletion and triggers background cleanup.\nThe deletion is asynchronous - the job is immediately hidden from\nlistings but data cleanup happens in the background.\n\nPath Parameters:\n    - simulation_id: The IId of the simulation job to delete\n\nResponse:\n    - success: Boolean indicating deletion was initiated\n    - message: Confirmation with the deleted job's IId\n\nNotes:\n    - Deletion is permanent and cannot be undone\n    - Associated attribution jobs linked to this simulation are also deleted\n    - Results data is purged from storage","operationId":"delete_simulation_projects__team_id___project_id__simulations__simulation_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"simulation_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide simulation IId","title":"Simulation Id"},"description":"Provide simulation IId"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Simulation job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Simulations"],"summary":"Update Simulation","description":"Update metadata attributes of a simulation job.\n\nAllows modification of mutable fields like Name and Note. Cannot modify\ncomputational parameters or scenario configurations after job creation.\n\nResponse:\n    Updated simulation job object with all current attributes.","operationId":"update_simulation_projects__team_id___project_id__simulations__simulation_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"simulation_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide simulation IId","title":"Simulation Id"},"description":"Provide simulation IId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSimulationJobs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationJobs"}}}},"404":{"description":"Simulation job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/simulations/{simulation_id}/dates_min_max":{"get":{"tags":["Simulations"],"summary":"Get Simulation Dates Min Max","description":"Get min and max dates from simulation result data.\n\nAnswered from the recorded statistics of the stored result.","operationId":"get_simulation_dates_min_max_projects__team_id___project_id__simulations__simulation_id__dates_min_max_get","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide simulation IId","title":"Simulation Id"},"description":"Provide simulation IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRange-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/simulations/{simulation_id}/data":{"get":{"tags":["Simulations"],"summary":"Download Simulation","description":"Download simulation results as a CSV file.\n\nReturns comparative forecast data showing baseline vs scenario outcomes.\nThe CSV contains time-series results with uncertainty quantiles for\neach scenario, enabling impact analysis.\n\nPrerequisites:\n    Job Status must be COMPLETED. Poll GET /simulations/{simulation_id}\n    until Status is COMPLETED before calling this endpoint.\n\nPath Parameters:\n    - simulation_id: The IId of the simulation job\n\nQuery Parameters:\n    - result_filters: JSON filter expressions to subset results\n      Example: '{\"Country\": [[\"=\", \"USA\"]], \"Type\": [[\"=\", \"Scenario\"]]}'\n\nResponse:\n    CSV file stream with columns:\n    - Variable: KPI/metric name (dataset slug)\n    - Effect: Simulated value\n    - Quantile: Uncertainty percentile\n    - Type: \"BaseScenario\" or \"Scenario\" (for comparison)\n    - Date: Forecast date\n    - Country/Region/Grouping: Geographic dimensions (if applicable)\n\nRelated:\n    - GET /simulations/{simulation_id}: Check job status first\n    - GET /simulations/{simulation_id}/variables: List available variables","operationId":"download_simulation_projects__team_id___project_id__simulations__simulation_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"simulation_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide simulation IId","title":"Simulation Id"},"description":"Provide simulation IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"\n        Filter the simulation result data rows (not the job metadata).\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - Scenario vs baseline: result_filters='{\"Type\": [[\"=\", \"Scenario\"]]}'\n        - Combined: result_filters='{\"Type\": [[\"=\", \"BaseScenario\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter the simulation result data rows (not the job metadata).\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - Scenario vs baseline: result_filters='{\"Type\": [[\"=\", \"Scenario\"]]}'\n        - Combined: result_filters='{\"Type\": [[\"=\", \"BaseScenario\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/simulations/{simulation_id}/data_query":{"post":{"tags":["Simulations"],"summary":"Download Simulation Query","description":"Download simulation results — POST variant for large filter payloads.\n\nAccepts the same filters as GET /simulations/{simulation_id}/data but\nin the request body, avoiding URL length limits.","operationId":"download_simulation_query_projects__team_id___project_id__simulations__simulation_id__data_query_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"simulation_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide simulation IId","title":"Simulation Id"},"description":"Provide simulation IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFiltersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/predictions":{"post":{"tags":["Predictions"],"summary":"Submit Prediction","description":"Submit a prediction job to forecast KPIs using trained ML models.\n\nUse this endpoint to generate time-series forecasts for business metrics\n(e.g., sales, revenue, churn) based on a trained model. Predictions support\nuncertainty quantification via configurable quantiles and can include\nscenario-based forecasts with modified input variables.\n\nWorkflow:\n    1. Ensure you have a trained model (see POST /build/model)\n    2. Optionally specify updated_values to create scenario forecasts\n    3. Submit prediction with this endpoint\n    4. Poll GET /predictions/{prediction_id} until Status is COMPLETED\n    5. Retrieve results via GET /predictions/{prediction_id}/data (CSV format)\n\nResponse:\n    Returns the created prediction job. Poll status until COMPLETED.\n\nRelated:\n    - GET /predictions/{prediction_id}: Poll job status and view details\n    - GET /predictions/{prediction_id}/data: Download forecast results as CSV\n    - POST /simulations: Compare baseline vs scenario (use for A/B scenarios)\n    - POST /build/model: Train a model before running predictions","operationId":"submit_prediction_projects__team_id___project_id__predictions_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionJobs"}}}},"400":{"description":"Invalid prediction request: model not found, invalid date range, quantile out of range (1-100), or dataset incompatible with model variables","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Predictions"],"summary":"List Predictions","description":"List all prediction jobs in the project with optional filtering.\n\nReturns a paginated list of prediction jobs, useful for monitoring job\nstatus, finding completed predictions, or auditing forecast history.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results by attributes\n      like DataSet.Name, Model.Name, Status, or date fields.\n      Example: '{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n\nResponse:\n    Paginated list of prediction jobs.\n\nRelated:\n    - GET /predictions/{prediction_id}: Get full details for a specific job\n    - POST /predictions: Create a new prediction job","operationId":"list_predictions_projects__team_id___project_id__predictions_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - By date: filters='{\"StartDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Exclude failed: filters='{\"Status\": [[\"notin\", \"[\\\"FAILED\\\"]\"]]}'\n        - Sort newest first: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        - Fuzzy name search: filters='{\"Name\": [[\"similarity\", \"Q4 forecast\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - By date: filters='{\"StartDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Exclude failed: filters='{\"Status\": [[\"notin\", \"[\\\"FAILED\\\"]\"]]}'\n        - Sort newest first: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        - Fuzzy name search: filters='{\"Name\": [[\"similarity\", \"Q4 forecast\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PredictionJobs_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Predictions"],"summary":"Bulk Delete Predictions","description":"Bulk delete prediction jobs matching the given filters.\n\nMarks all matching jobs for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.","operationId":"bulk_delete_predictions_projects__team_id___project_id__predictions_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /predictions.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /predictions.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/predictions/{prediction_id}":{"get":{"tags":["Predictions"],"summary":"Get Prediction","description":"Get detailed information about a specific prediction job.\n\nUse this endpoint to check job status, view configuration parameters,\nand access metadata. Poll this endpoint until Status is COMPLETED\nbefore downloading results.\n\nPath Parameters:\n    - prediction_id: The IId of the prediction job to retrieve\n\nResponse:\n    Detailed prediction job object with scenario configurations and task progress.\n\nRelated:\n    - GET /predictions/{prediction_id}/data: Download results (after COMPLETED)\n    - DELETE /predictions/{prediction_id}: Remove the prediction job","operationId":"get_prediction_projects__team_id___project_id__predictions__prediction_id__get","parameters":[{"name":"prediction_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide prediction IId","title":"Prediction Id"},"description":"Provide prediction IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedPredictionJobs"}}}},"404":{"description":"Prediction job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Predictions"],"summary":"Delete Prediction","description":"Delete a prediction job and its associated data.\n\nMarks the prediction job for deletion and triggers background cleanup\nof all associated resources (results, attributions). The deletion is\nasynchronous - the job is immediately hidden from listings but data\ncleanup happens in the background.\n\nPath Parameters:\n    - prediction_id: The IId of the prediction job to delete\n\nResponse:\n    - success: Boolean indicating deletion was initiated\n    - message: Confirmation with the deleted job's IId\n\nNotes:\n    - Deletion is permanent and cannot be undone\n    - Associated attribution jobs linked to this prediction are also deleted\n    - Results data is purged from storage","operationId":"delete_prediction_projects__team_id___project_id__predictions__prediction_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"prediction_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide prediction IId","title":"Prediction Id"},"description":"Provide prediction IId"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Prediction job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Predictions"],"summary":"Update Prediction","description":"Update metadata attributes of a prediction job.\n\nAllows modification of mutable fields like Name and Note. Cannot modify\ncomputational parameters or results after job creation.\n\nResponse:\n    Updated prediction job object with all current attributes.","operationId":"update_prediction_projects__team_id___project_id__predictions__prediction_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"prediction_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide prediction IId","title":"Prediction Id"},"description":"Provide prediction IId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPredictionJobs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionJobs"}}}},"404":{"description":"Prediction job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/predictions/{prediction_id}/dates_min_max":{"get":{"tags":["Predictions"],"summary":"Get Prediction Dates Min Max","description":"Get min and max dates from prediction result data.\n\nAnswered from the recorded statistics of the stored result.","operationId":"get_prediction_dates_min_max_projects__team_id___project_id__predictions__prediction_id__dates_min_max_get","parameters":[{"name":"prediction_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide prediction IId","title":"Prediction Id"},"description":"Provide prediction IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRange-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/predictions/{prediction_id}/data":{"get":{"tags":["Predictions"],"summary":"Download Prediction","description":"Download prediction results as a CSV file.\n\nReturns forecast data for a completed prediction job. The CSV contains\ntime-series forecasts with uncertainty quantiles for each variable\nin the model's output.\n\nPrerequisites:\n    Job Status must be COMPLETED. Poll GET /predictions/{prediction_id}\n    until Status is COMPLETED before calling this endpoint.\n\nPath Parameters:\n    - prediction_id: The IId of the prediction job\n\nQuery Parameters:\n    - result_filters: JSON filter expressions to subset results\n      Example: '{\"Country\": [[\"=\", \"USA\"]], \"Variable\": [[\"contains\", \"sales\"]]}'\n\nResponse:\n    CSV file stream with columns:\n    - Variable: KPI/metric name (dataset slug)\n    - Effect: Predicted value\n    - Quantile: Uncertainty percentile (matches requested quantiles)\n    - Scenario: Scenario name (from updated_values)\n    - Date: Forecast date\n    - Country/Region/Grouping: Geographic dimensions (if applicable)\n\nRelated:\n    - GET /predictions/{prediction_id}: Check job status first\n    - GET /predictions/{prediction_id}/variables: List available variables","operationId":"download_prediction_projects__team_id___project_id__predictions__prediction_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"prediction_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide prediction IId","title":"Prediction Id"},"description":"Provide prediction IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter the prediction result data rows (not the job metadata).\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By scenario: result_filters='{\"Scenario\": [[\"=\", \"Baseline\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter the prediction result data rows (not the job metadata).\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By scenario: result_filters='{\"Scenario\": [[\"=\", \"Baseline\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/predictions/{prediction_id}/data_query":{"post":{"tags":["Predictions"],"summary":"Download Prediction Query","description":"Download prediction results — POST variant for large filter payloads.\n\nAccepts the same filters as GET /predictions/{prediction_id}/data but\nin the request body, avoiding URL length limits.","operationId":"download_prediction_query_projects__team_id___project_id__predictions__prediction_id__data_query_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"prediction_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide prediction IId","title":"Prediction Id"},"description":"Provide prediction IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadPredictionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions":{"post":{"tags":["Attributions"],"summary":"Submit Attribution","description":"Submit an attribution job.\n\nThis endpoint submits an attribution job based on the provided request data.","operationId":"submit_attribution_projects__team_id___project_id__attributions_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attribution"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Attributions"],"summary":"List Attributions","description":"List attributions.\n\nRetrieves a paginated list of attribution jobs that analyze variable\nimpacts within a project, with optional filters like model name.","operationId":"list_attributions_projects__team_id___project_id__attributions_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Attribution_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Attributions"],"summary":"Bulk Delete Attributions","description":"Bulk delete attribution jobs matching the given filters.\n\nMarks all matching jobs for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.\nAttribution jobs used in an active attribution set are excluded.","operationId":"bulk_delete_attributions_projects__team_id___project_id__attributions_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /attributions.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /attributions.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions_from_job":{"post":{"tags":["Attributions"],"summary":"Submit Attribution From Job","description":"Submit an attribution job using a simulation/prediction/optimization as input.\n\n`job_input` is required. The source job is validated (exists, COMPLETED,\nmatching modelling_combination, and result rows present in Postgres or S3);\ndataset and (for prediction sources) fit model are derived from it.\nShares `create_attribution` with `POST /attributions`, so everything that\nroute does applies here too: `seed` and `auto_activate` are honoured, an\nexpress model's attribution is submitted inline without a task, the dataset's\nvariable limits are seeded before the job is registered, and a blocked\ndataset or a baseline outside those limits is refused on a strict project\nor with `validate_limits`, and returned in `LimitWarnings` otherwise.","operationId":"submit_attribution_from_job_projects__team_id___project_id__attributions_from_job_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionFromJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attribution"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions_multiple":{"post":{"tags":["Attributions"],"summary":"Submit Multiple Attributions","description":"Submit multiple attribution jobs.\n\nCreates multiple attribution jobs to analyze variable impacts within\na project, using specified data and settings.","operationId":"submit_multiple_attributions_projects__team_id___project_id__attributions_multiple_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionMultipleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Attribution"},"title":"Response Submit Multiple Attributions Projects  Team Id   Project Id  Attributions Multiple Post"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}":{"get":{"tags":["Attributions"],"summary":"Get Attribution","description":"Get an attribution.\n\nThis endpoint retrieves detailed information about a specific attribution.","operationId":"get_attribution_projects__team_id___project_id__attributions__attributionjob_id__get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"with_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variable Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedAttribution"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Attributions"],"summary":"Update Attribution","description":"Update attribution attributes.\n\nModifies attributes like name or note for a specific attribution job\nwithin a project.","operationId":"update_attribution_projects__team_id___project_id__attributions__attributionjob_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAttribution"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attribution"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Attributions"],"summary":"Delete Attribution","description":"Delete an attribution.\n\nRemoves a specific attribution job and its data from a project.","operationId":"delete_attribution_projects__team_id___project_id__attributions__attributionjob_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/dates_min_max":{"get":{"tags":["Attributions"],"summary":"Get Attribution Dates Min Max","description":"Get min and max dates from attribution results.","operationId":"get_attribution_dates_min_max_projects__team_id___project_id__attributions__attributionjob_id__dates_min_max_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRange-Output"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/baseline":{"get":{"tags":["Attributions"],"summary":"Get Attribution Baseline","description":"Get baseline values for an attribution.\n\nReturns the per-variable baseline values used in the attribution decomposition.","operationId":"get_attribution_baseline_projects__team_id___project_id__attributions__attributionjob_id__baseline_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttrBaseline"},"title":"Response Get Attribution Baseline Projects  Team Id   Project Id  Attributions  Attributionjob Id  Baseline Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/data":{"get":{"tags":["Attributions"],"summary":"Download Attribution","description":"Get attribution job result data.\n\nRetrieves results of a specific attribution job in CSV or Parquet\nformat, with optional filters. Variable and Response are dataset slugs.","operationId":"download_attribution_projects__team_id___project_id__attributions__attributionjob_id__data_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter attribution result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By response: result_filters='{\"Response\": [[\"=\", \"sales\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter attribution result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By response: result_filters='{\"Response\": [[\"=\", \"sales\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/data_query":{"post":{"tags":["Attributions"],"summary":"Download Attribution Query","description":"Get attribution job result data — POST variant for large filter payloads.","operationId":"download_attribution_query_projects__team_id___project_id__attributions__attributionjob_id__data_query_post","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFiltersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/group_metrics":{"get":{"tags":["Attributions"],"summary":"Get Attribution Group Metrics","description":"Get effect/share rows from AttributionGroupMetrics for a completed attribution.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default;\npass a Type filter to narrow to one.","operationId":"get_attribution_group_metrics_projects__team_id___project_id__attributions__attributionjob_id__group_metrics_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionGroupMetric"},"title":"Response Get Attribution Group Metrics Projects  Team Id   Project Id  Attributions  Attributionjob Id  Group Metrics Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/variable_metrics":{"get":{"tags":["Attributions"],"summary":"Get Attribution Variable Metrics","description":"Get effect/share rows from AttributionVariableMetrics for a completed attribution.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default;\npass a Type filter to narrow to one.","operationId":"get_attribution_variable_metrics_projects__team_id___project_id__attributions__attributionjob_id__variable_metrics_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"var_group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by variable group (e.g. Media, CustomerExperience).","title":"Var Group"},"description":"Filter by variable group (e.g. Media, CustomerExperience)."},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include VarUtilAttr/RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include VarUtilAttr/RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionVariableMetric"},"title":"Response Get Attribution Variable Metrics Projects  Team Id   Project Id  Attributions  Attributionjob Id  Variable Metrics Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/totals":{"get":{"tags":["Attributions"],"summary":"Get Attribution Totals","description":"Get TotalEffect rows from AttributionTotals for a completed attribution.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default;\npass a Type filter to narrow to one.","operationId":"get_attribution_totals_projects__team_id___project_id__attributions__attributionjob_id__totals_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - Grand totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - Grand totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionTotal"},"title":"Response Get Attribution Totals Projects  Team Id   Project Id  Attributions  Attributionjob Id  Totals Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/group_roi":{"get":{"tags":["Attributions"],"summary":"Get Attribution Group Roi","description":"Get investment/ROI rows from AttributionGroupROI for a completed attribution.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default;\npass a Type filter to narrow to one.","operationId":"get_attribution_group_roi_projects__team_id___project_id__attributions__attributionjob_id__group_roi_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - High ROI: filters='{\"EffectROI\": [[\">=\", \"2\"]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - High ROI: filters='{\"EffectROI\": [[\">=\", \"2\"]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionGroupROIMetric"},"title":"Response Get Attribution Group Roi Projects  Team Id   Project Id  Attributions  Attributionjob Id  Group Roi Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/variable_roi":{"get":{"tags":["Attributions"],"summary":"Get Attribution Variable Roi","description":"Get investment/ROI rows from AttributionVariableROI for a completed attribution.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default;\npass a Type filter to narrow to one.","operationId":"get_attribution_variable_roi_projects__team_id___project_id__attributions__attributionjob_id__variable_roi_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - High ROI: filters='{\"EffectROI\": [[\">=\", \"2\"]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - High ROI: filters='{\"EffectROI\": [[\">=\", \"2\"]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include VarUtilAttr/RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include VarUtilAttr/RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionVariableROIMetric"},"title":"Response Get Attribution Variable Roi Projects  Team Id   Project Id  Attributions  Attributionjob Id  Variable Roi Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset":{"post":{"tags":["Attribution Sets"],"summary":"Create Attribution Set","description":"Create an attribution set from attribution jobs for dashboard display.\n\nAttribution sets aggregate results from multiple attribution jobs into a\nunified view for the Effect Dashboard. Use this to combine attributions\nacross time periods, models, or market segments.\n\nUse Cases:\n    - Combine quarterly attributions into annual view\n    - Merge attributions from multiple models for cross-market analysis\n    - Create filtered views focusing on specific variables or date ranges\n\nWorkflow:\n    1. Run attribution jobs (from predictions/simulations/models)\n    2. Wait for attribution jobs to reach COMPLETED status\n    3. Create attribution set using this endpoint\n    4. Poll GET /attributionset/{attributionset_id} until Status is COMPLETE\n    5. Activate to display in Effect Dashboard\n\nResponse:\n    Returns the created attribution set. Poll status until COMPLETE.\n\nRelated:\n    - GET /attributionset/{attributionset_id}: Poll status\n    - PATCH /attributionset/{attributionset_id}/activate: Set as active\n    - GET /attributionset/{attributionset_id}/data: Download merged results","operationId":"create_attribution_set_projects__team_id___project_id__attributionset_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionSetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionSet"}}}},"400":{"description":"Invalid attribution set request: referenced attribution job not found or not in COMPLETED status, invalid variable filters, circular reference, or an attribution created from a simulation/prediction/optimization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Attribution Sets"],"summary":"List Attribution Sets","description":"List all attribution sets in the project with optional filtering.\n\nReturns a paginated list of attribution sets, useful for finding\navailable dashboard views or auditing attribution history.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results\n      Example: '{\"Status\": [[\"=\", \"COMPLETE\"]], \"Selected\": [[\"=\", true]]}'\n\nResponse:\n    Paginated list of attribution sets.\n\nRelated:\n    - GET /attributionset/{attributionset_id}: Get full details\n    - POST /attributionset: Create a new attribution set","operationId":"list_attribution_sets_projects__team_id___project_id__attributionset_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"with_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variable Ids"}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - Active sets only: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - Recent sets: filters='{\"CreatedDate\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - Active sets only: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - Recent sets: filters='{\"CreatedDate\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AttributionSet_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Attribution Sets"],"summary":"Bulk Delete Attribution Sets","description":"Bulk delete attribution sets matching the given filters.\n\nMarks all matching sets for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.\nThe active (Selected) attribution set is excluded.","operationId":"bulk_delete_attribution_sets_projects__team_id___project_id__attributionset_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /attributionset.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /attributionset.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset_align_dates":{"post":{"tags":["Attribution Sets"],"summary":"Create Attribution Set Align Dates","description":"Create an attribution set ordered by start date to avoid double-counting.\n\nUse Case:\n    When you have multiple attributions with overlapping time periods\n    (e.g., monthly attributions that overlap at boundaries), this endpoint\n    orders them so the earlier one wins each overlap.\n\nDate Alignment Logic:\n    - Attributions are sorted by start date\n    - For each (Country, Region, Grouping, Date) that several attributions\n      cover, the one that starts earlier contributes all of its effects\n      there and the others contribute none\n    - Dates or segments only a later attribution covers come from it\n\nResponse:\n    Returns the created attribution set.\n\nRelated:\n    - POST /attributionset: Create without automatic date alignment","operationId":"create_attribution_set_align_dates_projects__team_id___project_id__attributionset_align_dates_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionSetRequestAlignDates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionSet"}}}},"400":{"description":"Invalid attribution set request: referenced attribution job not found or not in COMPLETED status, invalid variable filters, circular reference, or an attribution created from a simulation/prediction/optimization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/active-history":{"get":{"tags":["Attribution Sets"],"summary":"List Attribution Set Active History","description":"List the history of active attribution set changes for this project.","operationId":"list_attribution_set_active_history_projects__team_id___project_id__attributionset_active_history_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), AttributionSetId (=, in). Example: filters='{\"UpdatedByUser\": [[\"=\", \"alice\"]]}'","title":"Filters"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), AttributionSetId (=, in). Example: filters='{\"UpdatedByUser\": [[\"=\", \"alice\"]]}'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AttributionSetActiveHistory_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set","description":"Get detailed information about a specific attribution set.\n\nUse this endpoint to check processing status, view included attributions,\nand access metadata. Poll until Status is COMPLETE before downloading\nresults or activating for dashboard.\n\nPath Parameters:\n    - attributionset_id: The IId of the attribution set (or \"active\")\n\nResponse:\n    Detailed attribution set object with task progress info.\n\nRelated:\n    - GET /attributionset/{attributionset_id}/data: Download results\n    - PATCH /attributionset/{attributionset_id}/activate: Set as active","operationId":"get_attribution_set_projects__team_id___project_id__attributionset__attributionset_id__get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"with_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variable Ids"}},{"name":"with_attribution_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Attribution Variable Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedAttributionSet"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Attribution Sets"],"summary":"Update Attribution Set","description":"Update metadata attributes of an attribution set.\n\nAllows modification of mutable fields like Name and Note. Cannot modify\nthe included attributions after creation.\n\nResponse:\n    Updated attribution set object.","operationId":"update_attribution_set_projects__team_id___project_id__attributionset__attributionset_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAttributionSet"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionSet"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Attribution Sets"],"summary":"Delete Attribution Set","description":"Delete an attribution set.\n\nRemoves the attribution set and its aggregated results. The underlying\nattribution jobs are NOT deleted - only the aggregated view.\n\nPath Parameters:\n    - attributionset_id: The IId of the attribution set to delete\n\nRestrictions:\n    - Cannot delete the currently active (Selected=True) attribution set\n\nResponse:\n    - success: Boolean indicating deletion completed\n    - message: Confirmation with the deleted set's IId\n\nNotes:\n    - Deletion is permanent and cannot be undone\n    - Deactivate the set first if it's currently active\n    - Source attribution jobs remain available for new sets","operationId":"delete_attribution_set_projects__team_id___project_id__attributionset__attributionset_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Cannot delete attribution set: set is currently active (Selected=True). Activate a different set first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/node_slugs":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Node Slugs","description":"Map each renamed node id in the set's results to its dataset slug.\n\nMerged across the set's models. When they map one node id to different\nslugs, 409 with those ids in `detail.node_ids` rather than guess.","operationId":"get_attribution_set_node_slugs_projects__team_id___project_id__attributionset__attributionset_id__node_slugs_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Attribution Set Node Slugs Projects  Team Id   Project Id  Attributionset  Attributionset Id  Node Slugs Get"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/dates_min_max":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Dates Min Max","description":"Get min and max dates from attribution results within this attribution set.","operationId":"get_attribution_set_dates_min_max_projects__team_id___project_id__attributionset__attributionset_id__dates_min_max_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRange-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/activate":{"patch":{"tags":["Attribution Sets"],"summary":"Activate Attribtuion Set","description":"Set an attribution set as the active dashboard view.\n\nThe active attribution set is displayed in the Effect Dashboard and\ncan be referenced using \"active\" in API requests. Only one attribution\nset per project can be active at a time.\n\nPath Parameters:\n    - attributionset_id: The IId of the attribution set to activate\n\nPrerequisites:\n    Attribution set Status must be COMPLETE.\n\nEffects:\n    - Sets Selected=True for this attribution set\n    - Deactivates any previously active attribution set\n    - Effect Dashboard immediately reflects the change\n    - Sends notification to the user\n\nResponse:\n    Updated attribution set with Selected=True.\n\nRelated:\n    - GET /attributionset: Find attribution sets to activate\n    - DELETE /attributionset/{attributionset_id}: Cannot delete active sets","operationId":"activate_attribtuion_set_projects__team_id___project_id__attributionset__attributionset_id__activate_patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionSet"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Attribution Sets"],"summary":"Deactivate Attribution Set","description":"Deactivate the active attribution set.\n\nClears the active state of the specified attribution set. After this\ncall the project will have no active attribution set until a new one\nis activated.\n\nPath Parameters:\n    - attributionset_id: The IId of the attribution set to deactivate\n\nErrors:\n    - 400 if the attribution set is not currently active\n\nResponse:\n    Updated attribution set with Selected=False.","operationId":"deactivate_attribution_set_projects__team_id___project_id__attributionset__attributionset_id__activate_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributionSet"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/data":{"get":{"tags":["Attribution Sets"],"summary":"Download Attribution Set","description":"Download aggregated attribution results as a CSV file.\n\nReturns the merged effect data from all included attribution jobs.\nThe CSV shows how each input variable contributes to the target KPI\nover time, enabling marketing mix analysis.\n\nPrerequisites:\n    Attribution set Status must be COMPLETE.\n\nPath Parameters:\n    - attributionset_id: The IId of the attribution set (or \"active\")\n\nQuery Parameters:\n    - result_filters: JSON filter expressions to subset results\n      Example: '{\"Country\": [[\"=\", \"USA\"]], \"Variable\": [[\"contains\", \"tv\"]]}'\n\nResponse:\n    CSV file stream with columns:\n    - Variable: Input variable slug; a node id the set's models map to\n      different variables stays as the engine named it\n    - Response: Target KPI slug\n    - Effect: Attributed impact value\n    - Date: Time period\n    - Quantile: Uncertainty percentile\n    - Group: Variable group category\n    - Type: Variable type\n    - Country/Region/Grouping: Geographic dimensions\n\nRelated:\n    - GET /attributionset/{attributionset_id}/variables: List available variables\n    - GET /attributionset/{attributionset_id}/parquet_data: Get Parquet format","operationId":"download_attribution_set_projects__team_id___project_id__attributionset__attributionset_id__data_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter attribution result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By response type: result_filters='{\"Response\": [[\"=\", \"sales\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter attribution result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By response type: result_filters='{\"Response\": [[\"=\", \"sales\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Attribution set not in COMPLETE status - poll status first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/group_metrics":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Group Metrics","description":"Get effect/share rows from AttributionSetGroupMetrics for a completed set.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default and\nspans every modelling combination in the set; pass filters to narrow.","operationId":"get_attribution_set_group_metrics_projects__team_id___project_id__attributionset__attributionset_id__group_metrics_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionSetGroupMetric"},"title":"Response Get Attribution Set Group Metrics Projects  Team Id   Project Id  Attributionset  Attributionset Id  Group Metrics Get"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/variable_metrics":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Variable Metrics","description":"Get effect/share rows from AttributionSetVariableMetrics for a completed set.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default and\nspans every modelling combination in the set; pass filters to narrow.","operationId":"get_attribution_set_variable_metrics_projects__team_id___project_id__attributionset__attributionset_id__variable_metrics_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"var_group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by variable group (e.g. Media, CustomerExperience).","title":"Var Group"},"description":"Filter by variable group (e.g. Media, CustomerExperience)."},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include VarUtilAttr/RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include VarUtilAttr/RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionSetVariableMetric"},"title":"Response Get Attribution Set Variable Metrics Projects  Team Id   Project Id  Attributionset  Attributionset Id  Variable Metrics Get"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/totals":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Totals","description":"Get TotalEffect rows from AttributionSetTotals for a completed set.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default and\nspans every modelling combination in the set; pass filters to narrow.","operationId":"get_attribution_set_totals_projects__team_id___project_id__attributionset__attributionset_id__totals_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - Grand totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - Grand totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionSetTotal"},"title":"Response Get Attribution Set Totals Projects  Team Id   Project Id  Attributionset  Attributionset Id  Totals Get"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/group_roi":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Group Roi","description":"Get investment/ROI rows from AttributionSetGroupROI for a completed set.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default and\nspans every modelling combination in the set; pass filters to narrow.","operationId":"get_attribution_set_group_roi_projects__team_id___project_id__attributionset__attributionset_id__group_roi_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - High ROI: filters='{\"EffectROI\": [[\">=\", \"2\"]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By group: filters='{\"VarGroup\": [[\"=\", \"Media\"]]}'\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - High ROI: filters='{\"EffectROI\": [[\">=\", \"2\"]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionSetGroupROIMetric"},"title":"Response Get Attribution Set Group Roi Projects  Team Id   Project Id  Attributionset  Attributionset Id  Group Roi Get"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/variable_roi":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Variable Roi","description":"Get investment/ROI rows from AttributionSetVariableROI for a completed set.\n\nReturns rows for every effect Type (Total, Direct, Indirect) by default and\nspans every modelling combination in the set; pass filters to narrow.","operationId":"get_attribution_set_variable_roi_projects__team_id___project_id__attributionset__attributionset_id__variable_roi_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - High ROI: filters='{\"EffectROI\": [[\">=\", \"2\"]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - Totals only: filters='{\"RespId\": [[\"is\", null]]}'\n        - High ROI: filters='{\"EffectROI\": [[\">=\", \"2\"]]}'\n        - By effect type: filters='{\"Type\": [[\"=\", \"Total\"]]}'\n        "},{"name":"include_util_attr","in":"query","required":false,"schema":{"type":"boolean","description":"If true, include VarUtilAttr/RespUtilAttr (parsed util attributes) per row.","default":true,"title":"Include Util Attr"},"description":"If true, include VarUtilAttr/RespUtilAttr (parsed util attributes) per row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttributionSetVariableROIMetric"},"title":"Response Get Attribution Set Variable Roi Projects  Team Id   Project Id  Attributionset  Attributionset Id  Variable Roi Get"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations":{"post":{"tags":["Optimizations"],"summary":"Submit Optiomization","description":"Submit an optimization job to find optimal variable allocations.\n\nUse optimization to automatically determine the best allocation of input\nvariables (e.g., marketing budget across channels) to maximize or achieve\na target for an objective (e.g., maximize sales, hit revenue goal) while\nrespecting constraints.\n\nWorkflow:\n    1. Ensure you have a trained model (see POST /build/model)\n    2. Define optimization targets (maximize, goal-seek)\n    3. Specify variables to optimize (opt_nodes)\n    4. Add constraints (boundary, equality/inequality)\n    5. Submit optimization with this endpoint\n    6. Poll GET /optimizations/{optimization_id} until Status is COMPLETED\n    7. Download optimal allocation via GET /optimizations/{optimization_id}/data\n\nResponse:\n    Returns the created optimization job. Poll status until COMPLETED.\n\nRelated:\n    - GET /optimizations/{optimization_id}: Poll job status\n    - GET /optimizations/{optimization_id}/data: Download optimal allocation\n    - POST /optimizations/{optimization_id}/simulate: Run simulation with results","operationId":"submit_optiomization_projects__team_id___project_id__optimizations_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizationPost"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizationJobs"}}}},"400":{"description":"Invalid optimization request: model not found, opt_nodes variables not in model/dataset, invalid constraints (boundary, equality/inequality), invalid target configuration, or date range outside dataset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Optimizations"],"summary":"List Optimizations","description":"List all optimization jobs in the project with optional filtering.\n\nReturns a paginated list of optimization jobs, useful for monitoring\njob status and reviewing optimization history.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results\n      Example: '{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n\nResponse:\n    Paginated list of optimization jobs.\n\nRelated:\n    - GET /optimizations/{optimization_id}: Get full details\n    - POST /optimizations: Create a new optimization job","operationId":"list_optimizations_projects__team_id___project_id__optimizations_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - Recent optimizations: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By improvement: filters='{\"Improvement\": [[\">=\", \"0.1\"]]}'\n        - High performers: filters='{\"TargetResult\": [[\">=\", \"100000\"]]}'\n        - Sort by improvement: filters='{\"Improvement\": [[\"orderby\", \"desc\"]]}'\n        - Name search: filters='{\"Name\": [[\"similarity\", \"budget optimization\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - Recent optimizations: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By improvement: filters='{\"Improvement\": [[\">=\", \"0.1\"]]}'\n        - High performers: filters='{\"TargetResult\": [[\">=\", \"100000\"]]}'\n        - Sort by improvement: filters='{\"Improvement\": [[\"orderby\", \"desc\"]]}'\n        - Name search: filters='{\"Name\": [[\"similarity\", \"budget optimization\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OptimizationJobs_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Optimizations"],"summary":"Bulk Delete Optimizations","description":"Bulk delete optimization jobs matching the given filters.\n\nMarks all matching jobs for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.","operationId":"bulk_delete_optimizations_projects__team_id___project_id__optimizations_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations/{optimization_id}":{"get":{"tags":["Optimizations"],"summary":"Get Optimization","description":"Get detailed information about a specific optimization job.\n\nUse this endpoint to check job status, view optimization configuration,\nand review results. Poll until Status is COMPLETED before downloading\noptimal allocations.\n\nPath Parameters:\n    - optimization_id: The IId of the optimization job\n\nResponse:\n    Detailed optimization job with results and constraint information.\n\nRelated:\n    - GET /optimizations/{optimization_id}/data: Download optimal allocation\n    - POST /optimizations/{optimization_id}/simulate: Run simulation with results","operationId":"get_optimization_projects__team_id___project_id__optimizations__optimization_id__get","parameters":[{"name":"optimization_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide optimization IId","title":"Optimization Id"},"description":"Provide optimization IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedOptimization"}}}},"404":{"description":"Optimization job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Optimizations"],"summary":"Update Optimization","description":"Update metadata attributes of an optimization job.\n\nAllows modification of mutable fields like Name and Note. Cannot modify\noptimization parameters or results after job creation.\n\nResponse:\n    Updated optimization job object.","operationId":"update_optimization_projects__team_id___project_id__optimizations__optimization_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"optimization_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide optimization IId","title":"Optimization Id"},"description":"Provide optimization IId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchOptimizationJobs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizationJobs"}}}},"404":{"description":"Optimization job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Optimizations"],"summary":"Delete Optimization","description":"Delete an optimization job and its associated data.\n\nMarks the optimization job for deletion and triggers background cleanup.\nThe deletion is asynchronous - the job is immediately hidden from\nlistings but data cleanup happens in the background.\n\nPath Parameters:\n    - optimization_id: The IId of the optimization job to delete\n\nNotes:\n    - Deletion is permanent and cannot be undone\n    - Associated simulation and attribution jobs are also deleted\n    - Results data is purged from storage","operationId":"delete_optimization_projects__team_id___project_id__optimizations__optimization_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"optimization_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide optimization IId","title":"Optimization Id"},"description":"Provide optimization IId"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Optimization job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations/{optimization_id}/dates_min_max":{"get":{"tags":["Optimizations"],"summary":"Get Optimization Dates Min Max","description":"Get min and max dates from optimization result data.\n\nAnswered from the recorded statistics of the stored result.","operationId":"get_optimization_dates_min_max_projects__team_id___project_id__optimizations__optimization_id__dates_min_max_get","parameters":[{"name":"optimization_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide optimization IId","title":"Optimization Id"},"description":"Provide optimization IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRange-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations/{optimization_id}/data":{"get":{"tags":["Optimizations"],"summary":"Download Optimzation","description":"Download optimal variable allocations as a CSV file.\n\nReturns the optimized values for each variable across the time range.\nUse these values in predictions or simulations to see the impact of\nthe optimal allocation.\n\nPrerequisites:\n    Job Status must be COMPLETED. Poll GET /optimizations/{optimization_id}\n    until Status is COMPLETED before calling this endpoint.\n\nPath Parameters:\n    - optimization_id: The IId of the optimization job\n\nQuery Parameters:\n    - result_filters: JSON filter expressions to subset results\n\nResponse:\n    CSV file stream with columns:\n    - Date: Time period\n    - Variable: Variable slug that was optimized\n    - Value: Optimal value for that variable/date\n\nRelated:\n    - POST /optimizations/{optimization_id}/simulate: Run simulation\n    - GET /optimizations/{optimization_id}/predict_simulate_input","operationId":"download_optimzation_projects__team_id___project_id__optimizations__optimization_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"optimization_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide optimization IId","title":"Optimization Id"},"description":"Provide optimization IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter optimization result data rows.\n\n        Filterable columns are Date, Variable, Value and VarTable.Type;\n        anything else is rejected. The result holds one value per variable\n        per date, with no market-segment columns of its own.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media_spend\"]]}'\n        - By date: result_filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By type: result_filters='{\"VarTable.Type\": [[\"=\", \"Media\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter optimization result data rows.\n\n        Filterable columns are Date, Variable, Value and VarTable.Type;\n        anything else is rejected. The result holds one value per variable\n        per date, with no market-segment columns of its own.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media_spend\"]]}'\n        - By date: result_filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By type: result_filters='{\"VarTable.Type\": [[\"=\", \"Media\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Optimization job not in COMPLETED status - poll status first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Optimization job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations/{optimization_id}/data_query":{"post":{"tags":["Optimizations"],"summary":"Download Optimization Query","description":"Download optimal variable allocations — POST variant for large filter payloads.","operationId":"download_optimization_query_projects__team_id___project_id__optimizations__optimization_id__data_query_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"optimization_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide optimization IId","title":"Optimization Id"},"description":"Provide optimization IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFiltersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Optimization job not in COMPLETED status - poll status first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Optimization job not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations/{optimization_id}/simulate":{"post":{"tags":["Optimizations"],"summary":"Simulate With Optimization Result","description":"Create a simulation using the optimal variable allocation.\n\nAutomatically creates and submits a simulation job using the optimized\nvariable values as the scenario. This allows you to visualize the full\nforecast under the optimal allocation and compare against baseline.\n\nPrerequisites:\n    Optimization job must be COMPLETED.\n\nPath Parameters:\n    - optimization_id: The IId of the optimization job\n\nWorkflow:\n    1. Call this endpoint to create the simulation\n    2. Poll GET /simulations/{simulation_id} until COMPLETED\n    3. Download results via GET /simulations/{simulation_id}/data\n\nResponse:\n    Updated optimization job with SimulationJob reference populated.\n\nNotes:\n    - Uses the same model and date range as the optimization\n    - Optimal values become the \"Scenario\" in the simulation\n    - Baseline values become \"BaseScenario\" for comparison\n\nRelated:\n    - GET /optimizations/{optimization_id}/data: Download optimal allocation\n    - GET /simulations/{simulation_id}/data: Download simulation results","operationId":"simulate_with_optimization_result_projects__team_id___project_id__optimizations__optimization_id__simulate_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"optimization_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide optimization IId","title":"Optimization Id"},"description":"Provide optimization IId"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedOptimization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curve":{"post":{"tags":["Response Curves"],"summary":"Submit Response Curve","description":"Submit a response curve job.\n\nThis endpoint submits a response curve job based on the provided request data,\nproject, and session.","operationId":"submit_response_curve_projects__team_id___project_id__response_curve_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseCurvePost"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseCurve"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Response Curves"],"summary":"List Response Curves","description":"List response curve jobs.\n\nThis endpoint retrieves a paginated list of response curve jobs based on\nthe provided filters within a specified project.","operationId":"list_response_curves_projects__team_id___project_id__response_curve_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ResponseCurve_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Response Curves"],"summary":"Bulk Delete Response Curves","description":"Bulk delete response curve jobs matching the given filters.\n\nMarks all matching jobs for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.","operationId":"bulk_delete_response_curves_projects__team_id___project_id__response_curve_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curve/{curve_id}":{"get":{"tags":["Response Curves"],"summary":"Get Response Curve","description":"Get detailed response curve job.\n\nThis endpoint retrieves detailed information about a specific response curve job.","operationId":"get_response_curve_projects__team_id___project_id__response_curve__curve_id__get","parameters":[{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseCurveDetailed"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Response Curves"],"summary":"Update Response Curve Job","description":"Update a response curve job.\n\nThis endpoint updates the attributes of an existing response curve job based on\nthe provided update data.","operationId":"update_response_curve_job_projects__team_id___project_id__response_curve__curve_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchResponseCurveJobs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseCurve"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Response Curves"],"summary":"Delete Response Curve","description":"Delete a response curve job.\n\nThis endpoint deletes a specified response curve job.","operationId":"delete_response_curve_projects__team_id___project_id__response_curve__curve_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curve/{curve_id}/dates_min_max":{"get":{"tags":["Response Curves"],"summary":"Get Response Curve Dates Min Max","description":"Get min and max dates from temporal curve result data.\n\nA job with no stored result, or none with temporal rows (every job predating\nthe temporal curves), answers ``{null, null}`` rather than raising.","operationId":"get_response_curve_dates_min_max_projects__team_id___project_id__response_curve__curve_id__dates_min_max_get","parameters":[{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRange-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curve/{curve_id}/data":{"get":{"tags":["Response Curves"],"summary":"Download Response Curve","description":"Get response curve result as CSV file.\n\nThis endpoint retrieves the results of a specified response curve job and returns\nthe data as a CSV file. Variable and Response are dataset slugs.","operationId":"download_response_curve_projects__team_id___project_id__response_curve__curve_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter response curve result data rows.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter response curve result data rows.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curve/{curve_id}/data_query":{"post":{"tags":["Response Curves"],"summary":"Download Response Curve Query","description":"Get response curve results — POST variant for large filter payloads.","operationId":"download_response_curve_query_projects__team_id___project_id__response_curve__curve_id__data_query_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFiltersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curve/{curve_id}/temporal":{"get":{"tags":["Response Curves"],"summary":"Get Temporal Csv Output","description":"Get response curve temporal result as CSV file.\n\nThis endpoint retrieves the temporal results of a specified response curve job and\nreturns the data as a CSV file. Variable and Response are dataset slugs.","operationId":"get_temporal_csv_output_projects__team_id___project_id__response_curve__curve_id__temporal_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter response curve data rows.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"=\", \"media_tv_spend\"]]}'\n        - Multiple: result_filters='{\"Variable\": [[\"in\", \"[\\\"media_tv\\\"]\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter response curve data rows.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"=\", \"media_tv_spend\"]]}'\n        - Multiple: result_filters='{\"Variable\": [[\"in\", \"[\\\"media_tv\\\"]\"]]}'\n        "},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curve/{curve_id}/temporal_query":{"post":{"tags":["Response Curves"],"summary":"Get Temporal Csv Output Query","description":"Get response curve temporal results — POST variant for large filter payloads.","operationId":"get_temporal_csv_output_query_projects__team_id___project_id__response_curve__curve_id__temporal_query_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFiltersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/prior_posterior":{"post":{"tags":["Prior Posterior"],"summary":"Submit Prior Vs Posterior","description":"Submit a prior posterior job.\n\nThis endpoint submits a prior posterior job based on the provided request data,\nproject, and session.","operationId":"submit_prior_vs_posterior_projects__team_id___project_id__prior_posterior_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriorPosteriorPost"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriorPosterior-Output"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Prior Posterior"],"summary":"List Prior Vs Posterior","description":"List prior vs posterior jobs.\n\nThis endpoint retrieves a paginated list of prior vs posterior jobs based on\nthe provided filters within a specified project.","operationId":"list_prior_vs_posterior_projects__team_id___project_id__prior_posterior_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PriorPosterior_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Prior Posterior"],"summary":"Bulk Delete Prior Posterior","description":"Bulk delete prior vs posterior jobs matching the given filters.\n\nMarks all matching jobs for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.","operationId":"bulk_delete_prior_posterior_projects__team_id___project_id__prior_posterior_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/prior_posterior/{prior_posterior_id}":{"get":{"tags":["Prior Posterior"],"summary":"Get Prior Vs Poterior","description":"Get detailed prior vs posterior job.\n\nThis endpoint retrieves detailed information about\na specific prior vs posterior job.","operationId":"get_prior_vs_poterior_projects__team_id___project_id__prior_posterior__prior_posterior_id__get","parameters":[{"name":"prior_posterior_id","in":"path","required":true,"schema":{"type":"integer","description":"Prior vs posterior job IId.","title":"Prior Posterior Id"},"description":"Prior vs posterior job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedPriorPosterior"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Prior Posterior"],"summary":"Update Prior Posterior Job","description":"Update a prior posterior job.\n\nThis endpoint updates the attributes of an existing prior posterior job based on\nthe provided update data.","operationId":"update_prior_posterior_job_projects__team_id___project_id__prior_posterior__prior_posterior_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"prior_posterior_id","in":"path","required":true,"schema":{"type":"integer","description":"Prior vs posterior job IId.","title":"Prior Posterior Id"},"description":"Prior vs posterior job IId."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPriorPosteriorJobs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriorPosterior-Output"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Prior Posterior"],"summary":"Delete Prior Posterior","description":"Delete a prior posterior job.\n\nThis endpoint deletes a specified prior posterior job.","operationId":"delete_prior_posterior_projects__team_id___project_id__prior_posterior__prior_posterior_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"prior_posterior_id","in":"path","required":true,"schema":{"type":"integer","description":"Prior vs posterior job IId.","title":"Prior Posterior Id"},"description":"Prior vs posterior job IId."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/prior_posterior/{prior_posterior_id}/data":{"get":{"tags":["Prior Posterior"],"summary":"Download Prior Posterior","description":"Get prior posterior job result as CSV file.\n\nThis endpoint retrieves the results of a specified prior posterior job and returns\nthe data as a CSV file. Variable and Target are dataset slugs.","operationId":"download_prior_posterior_projects__team_id___project_id__prior_posterior__prior_posterior_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"prior_posterior_id","in":"path","required":true,"schema":{"type":"integer","description":"Prior vs posterior job IId.","title":"Prior Posterior Id"},"description":"Prior vs posterior job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter prior/posterior result data rows.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By distribution type: result_filters='{\"Type\": [[\"=\", \"posterior\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter prior/posterior result data rows.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By distribution type: result_filters='{\"Type\": [[\"=\", \"posterior\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/prior_posterior/{prior_posterior_id}/data_query":{"post":{"tags":["Prior Posterior"],"summary":"Download Prior Posterior Query","description":"Get prior posterior results — POST variant for large filter payloads.","operationId":"download_prior_posterior_query_projects__team_id___project_id__prior_posterior__prior_posterior_id__data_query_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"prior_posterior_id","in":"path","required":true,"schema":{"type":"integer","description":"Prior vs posterior job IId.","title":"Prior Posterior Id"},"description":"Prior vs posterior job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFiltersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/excel":{"post":{"tags":["Excel Jobs"],"summary":"Submit Excel Export Task","description":"Submit an Excel export task.\n\nThis endpoint submits an Excel job based on the provided request data, project,\nand session.","operationId":"submit_excel_export_task_projects__team_id___project_id__excel_post","deprecated":true,"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExcelPostDataUpload"},{"$ref":"#/components/schemas/ExcelPostDataset"},{"$ref":"#/components/schemas/ExcelPostAttributionSet"},{"$ref":"#/components/schemas/ExcelPostAttribution"},{"$ref":"#/components/schemas/ExcelPostSimulation"},{"$ref":"#/components/schemas/ExcelPostPrediction"},{"$ref":"#/components/schemas/ExcelPostOptimization"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcelJobs"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Excel Jobs"],"summary":"List Excel Export Tasks","description":"List Excel jobs.\n\nThis endpoint retrieves a paginated list of Excel jobs based on the provided filters\nwithin a specified project.","operationId":"list_excel_export_tasks_projects__team_id___project_id__excel_get","deprecated":true,"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Usage:\n        filters='{\"Models.Name\" : [[ \"contains\", \"SomeName\"]]}'\n        ","title":"Filters"},"description":"\n        Usage:\n        filters='{\"Models.Name\" : [[ \"contains\", \"SomeName\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ExcelJobs_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Excel Jobs"],"summary":"Bulk Delete Excel Jobs","description":"Bulk delete Excel jobs matching the given filters.\n\nHard-deletes all matching jobs immediately and cancels their drun jobs\nin the background in a single batch call.","operationId":"bulk_delete_excel_jobs_projects__team_id___project_id__excel_delete","deprecated":true,"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n        "}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/excel/{excel_job_id}":{"delete":{"tags":["Excel Jobs"],"summary":"Delete Excel Export Task","description":"Delete an Excel job.\n\nThis endpoint deletes a specified Excel job.","operationId":"delete_excel_export_task_projects__team_id___project_id__excel__excel_job_id__delete","deprecated":true,"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"excel_job_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide excel job path.","title":"Excel Job Id"},"description":"Provide excel job path."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/excel/{excel_job_id}/output":{"get":{"tags":["Excel Jobs"],"summary":"Download Excel Export","description":"Get Excel job output.\n\nThis endpoint retrieves the output of a specified Excel job.","operationId":"download_excel_export_projects__team_id___project_id__excel__excel_job_id__output_get","deprecated":true,"parameters":[{"name":"excel_job_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide excel job path.","title":"Excel Job Id"},"description":"Provide excel job path."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/lineage/{kind}/{iid}":{"get":{"tags":["Lineage"],"summary":"Get Lineage","description":"Upstream and downstream objects of one object, of the kinds the caller reads.\n\nReturns:\n    The lineage graph rooted at the object, bridged over hidden kinds.\n\nRaises:\n    HTTPException: If the object does not exist.","operationId":"get_lineage_projects__team_id___project_id__lineage__kind___iid__get","parameters":[{"name":"kind","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LineageKind"}},{"name":"iid","in":"path","required":true,"schema":{"type":"integer","title":"Iid"}},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineageGraph"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Lineage"],"summary":"Cascade Delete Lineage","description":"Delete one object and everything built on it.\n\nForcing past active objects needs the delete permission of each one's kind.\n\nReturns:\n    The objects that were deleted, or a 409 with the preview that blocked it.\n\nRaises:\n    HTTPException: 403 if forcing needs delete permissions the caller lacks.","operationId":"cascade_delete_lineage_projects__team_id___project_id__lineage__kind___iid__delete","parameters":[{"name":"kind","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LineageKind"}},{"name":"iid","in":"path","required":true,"schema":{"type":"integer","title":"Iid"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineageDeletePreview"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineageDeleteBlocked"}}},"description":"Conflict"},"503":{"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/lineage/{kind}/{iid}/delete-preview":{"post":{"tags":["Lineage"],"summary":"Preview Lineage Delete","description":"What a cascade delete of one object would remove.\n\nReturns:\n    The objects the delete removes and the active ones blocking it.","operationId":"preview_lineage_delete_projects__team_id___project_id__lineage__kind___iid__delete_preview_post","parameters":[{"name":"kind","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LineageKind"}},{"name":"iid","in":"path","required":true,"schema":{"type":"integer","title":"Iid"}},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineageDeletePreview"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{team_id}":{"post":{"tags":["Templates"],"summary":"Create Template","description":"Create a template.\n\nThis endpoint creates a new template based on the provided request data.","operationId":"create_template_templates__team_id__post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Operation not permitted (limit reached or conflict)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Templates"],"summary":"List Templates","description":"Get list of templates.\n\nThis endpoint retrieves a paginated list of templates based on the provided filters.","operationId":"list_templates_templates__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By name: filters='{\"Name\": [[\"contains\", \"Marketing Mix\"]]}'\n        - Recent templates: filters='{\"CreatedDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By name: filters='{\"Name\": [[\"contains\", \"Marketing Mix\"]]}'\n        - Recent templates: filters='{\"CreatedDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Template_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{team_id}/{template_id}":{"get":{"tags":["Templates"],"summary":"Get Template","description":"Get a template.\n\nThis endpoint retrieves detailed information about a specific template.","operationId":"get_template_templates__team_id___template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Templates"],"summary":"Delete Template","description":"Delete a template.\n\nThis endpoint deletes a specified template.","operationId":"delete_template_templates__team_id___template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Templates"],"summary":"Update Template","description":"Patch template attributes.\n\nThis endpoint updates the attributes of an existing template based on\nthe provided update data.","operationId":"update_template_templates__team_id___template_id__patch","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchTemplate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams":{"get":{"tags":["Teams"],"summary":"List ","description":"List or search for multiple teams.","operationId":"list__teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/GetListTeamResponse"},"type":"array","title":"Response List  Teams Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/me/permissions":{"get":{"tags":["Teams"],"summary":"My Permissions","description":"Every permission the caller holds, keyed by team id.\n\nThe same composition `api.permission_check._check_permissions` performs —\nthe role's grant minus the team's blocked permissions — evaluated for\nevery membership rather than for one team. Keeping it to one expression\nis what stops this and the forward-auth check disagreeing about what a\nrole grants.\n\nA suspended team contributes nothing for an ordinary member, because\n`_check_permissions` refuses one outright whatever the role.\n\nA superuser holds the owner grant in every team, unioned over whatever\ntheir own membership grants them there, with the team's blocked\npermissions not subtracted. That is what `_resolve_access` does: it\nresolves superadmin status whether or not a membership exists, and\nanswers 204 before `_check_permissions` runs.","operationId":"my_permissions_teams_me_permissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/MyPermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/me/superuser":{"get":{"tags":["Teams"],"summary":"My Superuser Status","description":"Whether the caller is a platform superuser.","operationId":"my_superuser_status_teams_me_superuser_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SuperuserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}":{"get":{"tags":["Teams"],"summary":"Get","description":"Get detailed information on a single team.","operationId":"get_teams__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/GetCurrentTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Teams"],"summary":"Delete","description":"Delete a team.","operationId":"delete_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Teams"],"summary":"Update","description":"Update a team.","operationId":"update_teams__team_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/TeamUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/TeamWithMemberships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/ntfy-token":{"get":{"tags":["Teams"],"summary":"Get Ntfy Token","description":"Get a short-lived ntfy token for the team's job status notifications.\n\nThe token can subscribe to the team's topics only. It is cached until just\nbefore it expires, so a new one is issued about once per TTL per team. If\nntfy is rate limiting or down, a cached token is still returned; without one\nthe request fails with a 503 and `Retry-After`.","operationId":"get_ntfy_token_teams__team_id__ntfy_token_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/NtfyTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/member":{"post":{"tags":["Teams"],"summary":"Add Member","description":"Add a member to a team.","operationId":"add_member_teams__team_id__member_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/Body_add_member_teams__team_id__member_post"}}}},"responses":{"204":{"description":"Successful Response"},"201":{"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/Invitation"}}},"description":"Created"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Teams"],"summary":"List Members","description":"List members of a team with additional details from user service.","operationId":"list_members_teams__team_id__member_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/MembershipWithDetails"},"title":"Response List Members Teams  Team Id  Member Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Teams"],"summary":"Remove Member","description":"Remove a member from a team.","operationId":"remove_member_teams__team_id__member_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"user_id","in":"query","required":true,"schema":{"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Teams"],"summary":"Update Member Role","description":"Assign a new role to a team member.","operationId":"update_member_role_teams__team_id__member_patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"user_id","in":"query","required":true,"schema":{"title":"User Id"}},{"name":"new_role","in":"query","required":true,"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/leave":{"delete":{"tags":["Teams"],"summary":"Leave Team","description":"Leave your currently active team.","operationId":"leave_team_teams__team_id__leave_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/roles":{"get":{"tags":["Teams"],"summary":"Get Roles","description":"Get all available roles and their permissions.","operationId":"get_roles_teams__team_id__roles_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/RoleDescription"},"title":"Response Get Roles Teams  Team Id  Roles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/permissions":{"get":{"tags":["Permissions"],"summary":"Get Permission Names","description":"Get every permission and role name the deployed config defines.\n\nThe names come from `PERMISSIONS_CONFIG` and `ROLES_CONFIG`, loaded once at\nboot. The UI generates its own name lists from the same files and compares\nthem with this answer in dev to catch a stale copy.","operationId":"get_permission_names_permissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/PermissionNames"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/invitations":{"get":{"tags":["Manage Invitations"],"summary":"List Invitations","description":"List all team invitations.","operationId":"list_invitations_teams__team_id__invitations_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/Invitation"},"title":"Response List Invitations Teams  Team Id  Invitations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/invitations/{invitation_id}":{"patch":{"tags":["Manage Invitations"],"summary":"Update Invitation","description":"Update a team invitation's role.","operationId":"update_invitation_teams__team_id__invitations__invitation_id__patch","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/Body_update_invitation_teams__team_id__invitations__invitation_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/Invitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Manage Invitations"],"summary":"Delete Invitation","description":"Delete a team invitation.","operationId":"delete_invitation_teams__team_id__invitations__invitation_id__delete","parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/invitations/{code}":{"get":{"tags":["Invitations"],"summary":"Get Invitation","description":"Get a team invitation.","operationId":"get_invitation_invitations__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/UserInvitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Invitations"],"summary":"Accept Invitation","description":"Accept a team invitation.","operationId":"accept_invitation_invitations__code__post","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/UserInvitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Invitations"],"summary":"Decline Invitation","description":"Decline a team invitation.","operationId":"decline_invitation_invitations__code__delete","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/invitations":{"get":{"tags":["Invitations"],"summary":"Get Invitations","description":"Get all team invitations for a user.","operationId":"get_invitations_invitations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/UserInvitation"},"type":"array","title":"Response Get Invitations Invitations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/sso/connections":{"get":{"tags":["SSO"],"summary":"List Connections","description":"List the team's SSO connections, without their IdP config.","operationId":"list_connections_teams__team_id__sso_connections_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoConnection"},"title":"Response List Connections Teams  Team Id  Sso Connections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["SSO"],"summary":"Create Connection","description":"Create an SSO connection with no IdP config yet.\n\nThe response carries the values the customer enters into their IdP;\nthe IdP config follows in a PATCH once they have it.","operationId":"create_connection_teams__team_id__sso_connections_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoConnectionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/sso/connections/{connection_id}":{"get":{"tags":["SSO"],"summary":"Get Connection","description":"Get an SSO connection with its IdP config, secrets excluded.","operationId":"get_connection_teams__team_id__sso_connections__connection_id__get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SSO"],"summary":"Update Connection","description":"Update an SSO connection, its IdP config, or whether it is enabled.","operationId":"update_connection_teams__team_id__sso_connections__connection_id__patch","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoConnectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SSO"],"summary":"Delete Connection","description":"Delete an SSO connection and its Logto connector.\n\nMembers who joined through it stay in the team.","operationId":"delete_connection_teams__team_id__sso_connections__connection_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/sso/connections/{connection_id}/domains":{"post":{"tags":["SSO"],"summary":"Add Domain","description":"Claim an email domain for an SSO connection.\n\nA domain belongs to at most one connection across all teams.","operationId":"add_domain_teams__team_id__sso_connections__connection_id__domains_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoDomainCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/sso/connections/{connection_id}/domains/{domain}":{"delete":{"tags":["SSO"],"summary":"Remove Domain","description":"Release an email domain from an SSO connection.","operationId":"remove_domain_teams__team_id__sso_connections__connection_id__domains__domain__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/mfa_enforcement":{"put":{"tags":["MFA"],"summary":"Update Mfa Enforcement","description":"Require MFA from every member of the team, or stop requiring it.\n\nEnabling is refused unless the caller is compliant themselves, so they\ncannot lock themselves out.","operationId":"update_mfa_enforcement_teams__team_id__mfa_enforcement_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/MfaEnforcementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/MfaEnforcement"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/user/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Basic liveness check.\n\nReturns 200 OK if the service is running.\nUse this for Kubernetes liveness probes.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/user/ready":{"get":{"tags":["Health"],"summary":"Readiness Check","description":"Readiness check with dependency verification.\n\nVerifies database and Redis connectivity.\nUse this for Kubernetes readiness probes.","operationId":"readiness_check_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/user/access_tokens":{"get":{"tags":["Access Token"],"summary":"Get User Tokens","description":"Get user tokens.","operationId":"get_user_tokens_access_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/AccessToken"},"type":"array","title":"Response Get User Tokens Access Tokens Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Access Token"],"summary":"Create User Token","description":"Create user token.","operationId":"create_user_token_access_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/CreateAccessTokenBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/CreateAccessTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/user/access_tokens/{token_id}":{"delete":{"tags":["Access Token"],"summary":"Revoke User Token","description":"Revoke user token.","operationId":"revoke_user_token_access_tokens__token_id__delete","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/user/current":{"get":{"tags":["User"],"summary":"Get Current User","description":"Get current user.","operationId":"get_current_user_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["User"],"summary":"Delete","description":"Delete current user.","operationId":"delete_current_delete","responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["User"],"summary":"Update","description":"Update current user.","operationId":"update_current_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/UpdateUserBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/user/avatar/{user_id}":{"get":{"tags":["User"],"summary":"Get Avatar","description":"Get the avatar of a user by user_id.","operationId":"get_avatar_avatar__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"if-none-match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-None-Match"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.io/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActiveHistoryAction":{"type":"string","enum":["activated","deactivated"],"title":"ActiveHistoryAction","description":"Active-history event action."},"ActiveHistoryEntry":{"properties":{"Id":{"type":"integer","title":"Id"},"IId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Iid"},"Action":{"$ref":"#/components/schemas/ActiveHistoryAction"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["Id","IId","Action","UpdatedByUser","UpdatedAt"],"title":"ActiveHistoryEntry","description":"A dataset or attribution-set activation/deactivation event."},"ActiveHistoryResponse":{"properties":{"dataset":{"anyOf":[{"items":{"$ref":"#/components/schemas/ActiveHistoryEntry"},"type":"array"},{"type":"null"}],"title":"Dataset"},"model":{"anyOf":[{"items":{"$ref":"#/components/schemas/ModelActiveHistoryEntry"},"type":"array"},{"type":"null"}],"title":"Model"},"attribution_set":{"anyOf":[{"items":{"$ref":"#/components/schemas/ActiveHistoryEntry"},"type":"array"},{"type":"null"}],"title":"Attribution Set"}},"type":"object","title":"ActiveHistoryResponse","description":"Grouped active-history events across entity types."},"ActiveHistoryType":{"type":"string","enum":["dataset","model","attribution_set"],"title":"ActiveHistoryType","description":"Entity types tracked in project active-history."},"ActiveModelMetrics":{"properties":{"country":{"type":"string","title":"Country"},"region":{"type":"string","title":"Region"},"grouping":{"type":"string","title":"Grouping"},"targets":{"type":"integer","title":"Targets"},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score"}},"type":"object","required":["country","region","grouping","targets"],"title":"ActiveModelMetrics","description":"Per-active-model targets + quality score, one entry per Selected model."},"ActivityDasboardMode":{"type":"string","enum":["EFFECTS","ACTIVE"],"title":"ActivityDasboardMode","description":"Type of activity dasboard."},"AttrBaseline":{"properties":{"Variable":{"$ref":"#/components/schemas/_Variable"},"Baseline":{"type":"number","title":"Baseline"}},"type":"object","required":["Variable","Baseline"],"title":"AttrBaseline","description":"Schema for attribution baseline values."},"AttrEffectTypes":{"type":"string","enum":["Direct","Indirect","Total"],"title":"AttrEffectTypes","description":"Attribution Effect Types."},"Attribution":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for attribution"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Start of the attribution date range."},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"End of the attribution date range."},"Source":{"anyOf":[{"type":"string","enum":["manual","fit","optimization","simulation","prediction"]},{"type":"null"}],"title":"Source","description":"What produced this attribution: manual, fit, optimization, simulation or prediction. Filled on the list endpoint only."},"Fit":{"type":"boolean","title":"Fit","description":"Whether this is a fit attribution (FitModelId is set)","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Model","Date","Fit"],"title":"Attribution","description":"Response schema for attribution analysis jobs.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00Z","Fit":false,"IId":1,"JobId":123,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"Marketing Model","Region":"all"},"Name":"Q4 Attribution Analysis","Note":"Attribution analysis for Q4 marketing data","Status":"completed"}]},"AttributionAfterJob":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","description":"Set predicted targets as data.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed. If omitted, the chained attribution inherits the parent job's seed."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."}},"type":"object","title":"AttributionAfterJob","description":"Run attribution after a job."},"AttributionFilters":{"properties":{"attribution_id":{"type":"integer","title":"Attribution Id","description":"The id of the attribution job."},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order","description":"Priority order for overlapping results (lower = higher priority). Defaults to list position."}},"type":"object","required":["attribution_id"],"title":"AttributionFilters","description":"Attribution filters for the attribution set."},"AttributionFromJobRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"model_id":{"type":"integer","title":"Model Id","description":"The id of the model that should be used to do the attribution with."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","default":true},"fit_attribution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fit Attribution","description":"Set attribution as fit attribution of the model.","default":false},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"The updated values variable."},"job_input":{"anyOf":[{"$ref":"#/components/schemas/SimulationAttributionInput"},{"$ref":"#/components/schemas/PredictionAttributionInput"},{"$ref":"#/components/schemas/OptimizationAttributionInput"}],"title":"Job Input","description":"Source job (simulation/prediction/optimization) for attribution."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"auto_activate":{"type":"boolean","title":"Auto Activate","description":"If true, automatically creates and activates an attribution set from this job once it completes.","default":false},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserDecomposePayload"},{"type":"null"}],"description":"A `decompose` result computed in the browser against this express model's portable engine. When set on an express model, the attribution is materialized from this payload instead of dispatched as a job. Ignored for non-express models."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree."}},"type":"object","required":["model_id","job_input"],"title":"AttributionFromJobRequest","description":"Schema for an attribution job using another job as input.\n\nSame as `AttributionRequest`, but `job_input` is required. The dataset (and\nthe prediction fit model, when applicable) is derived from the source job —\n`dataset_id` is ignored.","examples":[{"baseline":[{"baseline":1000.0,"variable":"base_sales"}],"dataset_id":"active","end_date":"2024-12-31T00:00:00","fit_attribution":false,"job_input":{"id":1,"job_type":"simulation","quantile":50,"scenario":"Scenario"},"model_id":1,"name":"USA Market Attribution Q4","note":"Attribution analysis for USA market Q4 2024","predicted_targets_as_data":true,"priority":30,"quantiles":[1,25,50,75,99],"referece_point_fallback":"Min","samples":20,"start_date":"2024-01-01T00:00:00"}]},"AttributionGroupMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"SumEffect":{"type":"number","title":"Sumeffect"},"ShareOfEffect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shareofeffect"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","VarGroup","RespIId","Type","SumEffect","ShareOfEffect"],"title":"AttributionGroupMetric","description":"Response schema for AttributionGroupMetrics — effect/share per group."},"AttributionGroupROIMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"Investment":{"type":"number","title":"Investment"},"CPX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpx"},"EffectROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectroi"},"RevenueROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueroi"},"ProfitROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitroi"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","VarGroup","RespIId","Type","Investment","CPX","EffectROI","RevenueROI","ProfitROI"],"title":"AttributionGroupROIMetric","description":"Response schema for AttributionGroupROI — investment/ROI for Media/CX groups."},"AttributionMultipleRequest":{"properties":{"names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Names","description":"Name list for the model, the list needs to be the same length with modelling_combinations."},"notes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notes","description":"Description for the model/dataset"},"prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Prefixes","description":"Prefix for the name."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"dataset_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}]},"type":"array"},{"type":"null"}],"title":"Dataset Ids","description":"List of dataset id to be used for attribution calculation for each model_id, set to None to use active dataset"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","default":true},"model_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Model Ids","description":"The ids of the model that should be used to do the attribution with. If no one is selected, the `active` models will be used."},"fit_attribution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fit Attribution","description":"Set attribution as fit attribution of the model.","default":false},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"The updated values variable."},"job_inputs":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/SimulationAttributionInput"},{"$ref":"#/components/schemas/PredictionAttributionInput"},{"$ref":"#/components/schemas/OptimizationAttributionInput"}],"description":"job_type"},"type":"array"},{"type":"null"}],"title":"Job Inputs","description":"Run attribution from other job result."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed shared across the batch."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false}},"type":"object","required":["model_ids"],"title":"AttributionMultipleRequest","description":"Schemas of attribution multiple request endpoint.","examples":[{"baseline":[{"baseline":1000.0,"variable":"base_sales"}],"dataset_ids":["active","active","active"],"end_date":"2024-12-31T00:00:00","fit_attribution":false,"model_ids":[1,2,3],"names":["USA Attribution","GBR Attribution","DE Attribution"],"notes":["USA market analysis","GBR market analysis","DE market analysis"],"predicted_targets_as_data":true,"priority":30,"quantiles":[1,25,50,75,99],"referece_point_fallback":"Min","samples":20,"start_date":"2024-01-01T00:00:00"}]},"AttributionOptimizationAssociation":{"properties":{"OptimizationJob":{"$ref":"#/components/schemas/OptimizationJobsRef"}},"type":"object","required":["OptimizationJob"],"title":"AttributionOptimizationAssociation","description":"Reference schema for attribution optimization association."},"AttributionPredictionAssociation":{"properties":{"PredictionJob":{"$ref":"#/components/schemas/PredictionJobsRef"},"Quantile":{"type":"number","title":"Quantile"},"Scenario":{"type":"string","title":"Scenario"}},"type":"object","required":["PredictionJob","Quantile","Scenario"],"title":"AttributionPredictionAssociation","description":"Reference schema for attribution prediction association."},"AttributionRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Date":{"type":"string","format":"date-time","title":"Date"},"Status":{"$ref":"#/components/schemas/JobState"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate"},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate"},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids"},"DataSet":{"$ref":"#/components/schemas/DataSetRef"},"Model":{"$ref":"#/components/schemas/ModelsRef"},"ReferencePointSource":{"$ref":"#/components/schemas/ReferencePointSource","default":"DataMin"},"ReferencePointFallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}]}},"type":"object","required":["IId","Date","Status","DataSet","Model"],"title":"AttributionRef","description":"Schema for Attribution jobs."},"AttributionRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"model_id":{"type":"integer","title":"Model Id","description":"The id of the model that should be used to do the attribution with."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","default":true},"fit_attribution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fit Attribution","description":"Set attribution as fit attribution of the model.","default":false},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"The updated values variable."},"job_input":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/SimulationAttributionInput"},{"$ref":"#/components/schemas/PredictionAttributionInput"},{"$ref":"#/components/schemas/OptimizationAttributionInput"}],"description":"job_type"},{"type":"null"}],"title":"Job Input","description":"Run attribution from other job result."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"auto_activate":{"type":"boolean","title":"Auto Activate","description":"If true, automatically creates and activates an attribution set from this job once it completes.","default":false},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserDecomposePayload"},{"type":"null"}],"description":"A `decompose` result computed in the browser against this express model's portable engine. When set on an express model, the attribution is materialized from this payload instead of dispatched as a job. Ignored for non-express models."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree."}},"type":"object","required":["model_id"],"title":"AttributionRequest","description":"Schemas of attribution request endpoint, samples priority, and model id.","examples":[{"baseline":[{"baseline":1000.0,"variable":"base_sales"}],"dataset_id":"active","end_date":"2024-12-31T00:00:00","fit_attribution":false,"model_id":1,"name":"USA Market Attribution Q4","note":"Attribution analysis for USA market Q4 2024","predicted_targets_as_data":true,"priority":30,"quantiles":[1,25,50,75,99],"referece_point_fallback":"Min","samples":20,"start_date":"2024-01-01T00:00:00"}]},"AttributionRequestNoValidation":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"attributionjob_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionFilters"}]},"type":"array"},{"type":"null"}],"title":"Attributionjob Ids","description":"List of attribution job IDs (integers) or filter objects to include. Referenced jobs must be in COMPLETED status. Use filter objects to apply variable/date filters when merging."},"activate":{"type":"boolean","title":"Activate","description":"Set to true to make this the active attribution set for the Effects Dashboard immediately after creation completes.","default":false},"attributionset_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionSetType"},{"$ref":"#/components/schemas/AttributionSetFilters"}]},"type":"array"},{"type":"null"}],"title":"Attributionset Ids","description":"List of existing attribution set IDs to merge into this set. Use 'active' to reference the currently active set, or filter objects to apply variable filters when merging."}},"type":"object","title":"AttributionRequestNoValidation","description":"Attribution set request wihtout validation."},"AttributionSet":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active attribution set for the dashboard"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Set creation timestamp"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the set"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/TaskState","description":"Processing state: PENDING, PROCESSING, COMPLETE, or FAILED"},"CreationFilters":{"anyOf":[{},{"type":"null"}],"title":"Creationfilters","description":"Filters for auto-generating attributions (Country/Region)"},"Attributions":{"items":{"$ref":"#/components/schemas/AttributionRef"},"type":"array","title":"Attributions","description":"List of attribution jobs included in this set"},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable across all attributions in this set, when requested with `with_variable_ids=true`. NULL when not requested."},"DataSet":{"anyOf":[{"$ref":"#/components/schemas/DataSetRef"},{"type":"null"}],"description":"Reference to the associated dataset"}},"type":"object","required":["IId","Selected","CreatedDate","Status","Attributions"],"title":"AttributionSet","description":"Response schema for attribution sets (grouped attribution analyses).","examples":[{"Attributions":[{"DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00Z","IId":1,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"Marketing Model","Region":"all"},"Name":"Attribution 1","Status":"completed"}],"CreatedDate":"2024-01-15T10:30:00Z","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"IId":1,"Name":"Q4 Attribution Set","Note":"Combined attribution analysis for Q4","Selected":true,"Status":"complete"}]},"AttributionSetActiveHistory":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attributionsetid"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["Id","AttributionSetId","UpdatedByUser","UpdatedAt"],"title":"AttributionSetActiveHistory","description":"Response schema for attribution set active history records."},"AttributionSetFilters":{"properties":{"attributionset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionSetType"}],"title":"Attributionset Id","description":"The id of the attribution set."},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order","description":"Priority order for overlapping results (lower = higher priority). Defaults to list position."}},"type":"object","required":["attributionset_id"],"title":"AttributionSetFilters","description":"Attribution set filters for the attribution set."},"AttributionSetGroupMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"SumEffect":{"type":"number","title":"Sumeffect"},"ShareOfEffect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shareofeffect"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","VarGroup","RespIId","Type","SumEffect","ShareOfEffect"],"title":"AttributionSetGroupMetric","description":"Response schema for AttributionSetGroupMetrics — effect/share per group."},"AttributionSetGroupROIMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"Investment":{"type":"number","title":"Investment"},"CPX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpx"},"EffectROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectroi"},"RevenueROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueroi"},"ProfitROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitroi"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","VarGroup","RespIId","Type","Investment","CPX","EffectROI","RevenueROI","ProfitROI"],"title":"AttributionSetGroupROIMetric","description":"Response schema for AttributionSetGroupROI — investment/ROI for Media/CX groups."},"AttributionSetRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Selected":{"type":"boolean","title":"Selected"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"},"Status":{"$ref":"#/components/schemas/TaskState"}},"type":"object","required":["IId","Selected","CreatedDate","Status"],"title":"AttributionSetRef","description":"reference schema for Attribution set."},"AttributionSetRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"attributionjob_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionFilters"}]},"type":"array"},{"type":"null"}],"title":"Attributionjob Ids","description":"List of attribution job IDs (integers) or filter objects to include. Referenced jobs must be in COMPLETED status. Use filter objects to apply variable/date filters when merging."},"activate":{"type":"boolean","title":"Activate","description":"Set to true to make this the active attribution set for the Effects Dashboard immediately after creation completes.","default":false},"attributionset_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionSetType"},{"$ref":"#/components/schemas/AttributionSetFilters"}]},"type":"array"},{"type":"null"}],"title":"Attributionset Ids","description":"List of existing attribution set IDs to merge into this set. Use 'active' to reference the currently active set, or filter objects to apply variable filters when merging."}},"type":"object","title":"AttributionSetRequest","description":"Schema for attribution set creation.","examples":[{"activate":true,"attributionjob_ids":[1,2,{"attribution_id":3,"variable_filters":[{"end_date":"2024-06-30T00:00:00","start_date":"2024-01-01T00:00:00","variable_id":101}]}],"attributionset_ids":["active"],"creation_filter":["country:USA","region:all"],"name":"Q4 Attribution Set","note":"Combined attribution analysis for Q4 campaigns"}]},"AttributionSetRequestAlignDates":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"attributionjob_ids":{"items":{"type":"integer"},"type":"array","title":"Attributionjob Ids","description":"List of attribution job IDs to include. Order matters - earlier jobs take precedence for overlapping date periods. Jobs must be in COMPLETED status."},"activate":{"type":"boolean","title":"Activate","description":"Set to true to make this the active attribution set for the Effects Dashboard immediately after creation completes.","default":false}},"type":"object","required":["attributionjob_ids"],"title":"AttributionSetRequestAlignDates","description":"Attributionset request algining dates."},"AttributionSetTotal":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"TotalEffect":{"type":"number","title":"Totaleffect"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","RespIId","Type","TotalEffect"],"title":"AttributionSetTotal","description":"Response schema for AttributionSetTotals — shared TotalEffect denominator."},"AttributionSetType":{"type":"string","enum":["active"],"title":"AttributionSetType","description":"Attribution set type."},"AttributionSetVariableMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarIId":{"type":"integer","title":"Variid"},"VarSlug":{"type":"string","title":"Varslug"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"SumEffect":{"type":"number","title":"Sumeffect"},"ShareOfEffect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shareofeffect"},"VarUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","VarIId","VarSlug","VarGroup","RespIId","Type","SumEffect","ShareOfEffect"],"title":"AttributionSetVariableMetric","description":"Response schema for AttributionSetVariableMetrics — effect/share per variable."},"AttributionSetVariableROIMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarIId":{"type":"integer","title":"Variid"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"Investment":{"type":"number","title":"Investment"},"CPX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpx"},"EffectROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectroi"},"RevenueROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueroi"},"ProfitROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitroi"},"VarUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","VarIId","RespIId","Type","Investment","CPX","EffectROI","RevenueROI","ProfitROI"],"title":"AttributionSetVariableROIMetric","description":"Response schema for AttributionSetVariableROI — investment/ROI for Media/CX variables."},"AttributionSimulationAssociation":{"properties":{"SimulationJob":{"$ref":"#/components/schemas/SimulationJobsRef"},"Quantile":{"type":"number","title":"Quantile"},"Scenario":{"type":"string","title":"Scenario"}},"type":"object","required":["SimulationJob","Quantile","Scenario"],"title":"AttributionSimulationAssociation","description":"Reference schema for attribution simulation association."},"AttributionTotal":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"TotalEffect":{"type":"number","title":"Totaleffect"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","RespIId","Type","TotalEffect"],"title":"AttributionTotal","description":"Response schema for AttributionTotals — shared TotalEffect denominator."},"AttributionVariableMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarIId":{"type":"integer","title":"Variid"},"VarSlug":{"type":"string","title":"Varslug"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"SumEffect":{"type":"number","title":"Sumeffect"},"ShareOfEffect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shareofeffect"},"VarUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","VarIId","VarSlug","VarGroup","RespIId","Type","SumEffect","ShareOfEffect"],"title":"AttributionVariableMetric","description":"Response schema for AttributionVariableMetrics — effect/share per variable."},"AttributionVariableROIMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarIId":{"type":"integer","title":"Variid"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"Investment":{"type":"number","title":"Investment"},"CPX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpx"},"EffectROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectroi"},"RevenueROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueroi"},"ProfitROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitroi"},"VarUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","VarIId","RespIId","Type","Investment","CPX","EffectROI","RevenueROI","ProfitROI"],"title":"AttributionVariableROIMetric","description":"Response schema for AttributionVariableROI — investment/ROI for Media/CX variables."},"BasicGraphJobRequest":{"properties":{"modelling_combination":{"$ref":"#/components/schemas/ModellingCombinationBaseModel","description":"Modelling combination for the model."},"graph_variables":{"anyOf":[{"$ref":"#/components/schemas/BasicModelVariables"},{"type":"null"}],"description":"High-level effect information to use when auto-creating basic models."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates","description":"List of dates."},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30}},"type":"object","required":["modelling_combination"],"title":"BasicGraphJobRequest","description":"Schemas of basic graph job request endpoint."},"BasicGraphRequest":{"properties":{"modelling_combination":{"$ref":"#/components/schemas/ModellingCombinationBaseModel","description":"Modelling combination for the model."},"graph_variables":{"anyOf":[{"$ref":"#/components/schemas/BasicModelVariables"},{"type":"null"}],"description":"High-level effect information to use when auto-creating basic models."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates","description":"List of dates."}},"type":"object","required":["modelling_combination"],"title":"BasicGraphRequest","description":"Schemas of basic graph request endpoint."},"BasicModelVariables":{"properties":{"targets":{"anyOf":[{"$ref":"#/components/schemas/Target"},{"type":"null"}],"default":{"targets":[],"revenue_nodes":false,"profit_nodes":false}},"trend":{"anyOf":[{"$ref":"#/components/schemas/Trend"},{"type":"null"}],"default":{"influence":"neutral","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"}}},"season":{"anyOf":[{"$ref":"#/components/schemas/Season"},{"type":"null"}],"default":{"effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"shared":false,"multiplicative":false}},"holidays":{"anyOf":[{"$ref":"#/components/schemas/Holidays"},{"type":"null"}],"default":{"influence":"neutral","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"shared":false}},"media":{"anyOf":[{"$ref":"#/components/schemas/Media"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"effect_in_days":120,"variables":[],"match_product":false,"net_profit_node":false}},"customer_experience":{"anyOf":[{"$ref":"#/components/schemas/CustomerExperience"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"effect_in_days":120,"variables":[],"match_product":false,"net_profit_node":false}},"price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":{"influence":"negative","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"match_product":false,"variables":[]}},"distribution":{"anyOf":[{"$ref":"#/components/schemas/Distribution"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"match_product":false,"variables":[]}},"brand":{"anyOf":[{"$ref":"#/components/schemas/Brand"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"variables":[]}},"events":{"anyOf":[{"$ref":"#/components/schemas/Events"},{"type":"null"}],"default":{"influence":"neutral","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"variables":[]}},"macro":{"anyOf":[{"$ref":"#/components/schemas/Macro"},{"type":"null"}],"default":{"influence":"neutral","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"variables":[]}},"visits":{"anyOf":[{"$ref":"#/components/schemas/Visits"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"variables":[]}},"weather":{"anyOf":[{"$ref":"#/components/schemas/Weather"},{"type":"null"}],"default":{"influence":"neutral","variables":[]}},"extra":{"anyOf":[{"$ref":"#/components/schemas/Extra"},{"type":"null"}],"default":{"influence":"neutral","variables":[]}},"competitor_price":{"anyOf":[{"$ref":"#/components/schemas/CompetitorPrice"},{"type":"null"}],"default":{"influence":"positive","variables":[],"match_product":false}},"competitor_media":{"anyOf":[{"$ref":"#/components/schemas/CompetitorMedia"},{"type":"null"}],"default":{"influence":"negative","effect_in_days":120,"variables":[],"match_product":false}},"competitor_brand":{"anyOf":[{"$ref":"#/components/schemas/CompetitorBrand"},{"type":"null"}],"default":{"influence":"negative","variables":[]}},"competitor_distribution":{"anyOf":[{"$ref":"#/components/schemas/CompetitorDistribution"},{"type":"null"}],"default":{"influence":"negative","variables":[],"match_product":false}}},"type":"object","title":"BasicModelVariables","description":"Variables config for the basic model."},"Body_upload_data_projects__team_id___project_id__datauploads_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The file to upload. Only .csv, .xls, .xlsx, .xlsb is supported or or gzip file containing one supported file (.gz)"}},"type":"object","required":["file"],"title":"Body_upload_data_projects__team_id___project_id__datauploads_post"},"Brand":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the brand effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the brand effect"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Brand","description":"Control the brand."},"BrowserConstraintViolation":{"properties":{"violationRatio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Violationratio"},"lhs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lhs"},"violation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Violation"}},"additionalProperties":true,"type":"object","title":"BrowserConstraintViolation","description":"One constraint's final numbers, as the optimization ingest accepts them.\n\nThe strict sibling of `ConstraintViolation`, which stays permissive because it\nalso parses server results the engine produced. These three fields are written\nto `ConstraintViolations` rows and to a job column after `SAVING_RESULTS` is\nalready committed, so a boolean or a non-finite here has to be a 422 rather\nthan a wedged job."},"BrowserDecomposePayload":{"properties":{"responses":{"items":{"type":"string"},"type":"array","title":"Responses"},"types":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Types"},"variables":{"items":{"type":"string"},"type":"array","title":"Variables"},"n":{"type":"integer","title":"N"},"quantiles":{"items":{"type":"number"},"type":"array","minItems":1,"title":"Quantiles"},"quantiled":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":1},"type":"object","minProperties":1},"type":"object"},"type":"object","minProperties":1,"title":"Quantiled"}},"additionalProperties":true,"type":"object","required":["responses","types","variables","n","quantiles","quantiled"],"title":"BrowserDecomposePayload","description":"A browser-computed `decompose` result, as the attribution ingest accepts it.\n\nSame reasoning as `BrowserPredictMultiPayload`: client input that reaches the\nparquet writer through a hook which commits `SAVING_RESULTS` before it reads the\npayload, so anything the writer indexes is validated here while a 422 is still\nfree. `attribution_rows_from_decompose` reads only `quantiles` and `quantiled`;\n`responses`/`types`/`variables`/`n` are the engine's own account of what it ran and\nare declared so a misshaped payload is rejected rather than KeyError'd downstream.\n\nOne level deeper than the prediction payload: `quantiled` is keyed\ntype -> response -> variable, where type is `Total` (plus `Direct`/`Indirect` for a\nhierarchical model) and the variable set is the channels plus the base label."},"BrowserOptimizePayload":{"properties":{"optVars":{"items":{"type":"string"},"type":"array","title":"Optvars"},"n":{"type":"integer","title":"N"},"solution":{"additionalProperties":{"items":{"type":"number"},"type":"array","minItems":1},"type":"object","minProperties":1,"title":"Solution"},"objective":{"type":"number","title":"Objective"},"baselineTarget":{"type":"number","title":"Baselinetarget"},"baselineTargetResult":{"type":"number","title":"Baselinetargetresult"},"improvement":{"type":"number","title":"Improvement"},"iterations":{"type":"integer","title":"Iterations"},"constraintViolations":{"additionalProperties":{"$ref":"#/components/schemas/BrowserConstraintViolation"},"type":"object","title":"Constraintviolations"}},"additionalProperties":true,"type":"object","required":["optVars","n","solution","objective","baselineTarget","baselineTargetResult","improvement","iterations"],"title":"BrowserOptimizePayload","description":"A browser-computed `optimize` result, as the optimization ingest accepts it.\n\nSame standard as the three browser payloads above: `_materialize_optimization`\ncommits `SAVING_RESULTS` before it reads the payload and there is no worker to\nretry an inline call, so everything the row writer and the scalar columns index\nis a validation error here while a 422 is still free.\n\nAgreement with the op — that these are the right opt vars over the right window\n— is checked against the server-built op in `fe_actions`, since only it knows\nwhat was asked for. Field names are the engine's camelCase wire names, as\n`OptimizeResultPayload` reads them off a server run."},"BrowserPredictMultiPayload":{"properties":{"scenarios":{"items":{"type":"string"},"type":"array","title":"Scenarios"},"variables":{"items":{"type":"string"},"type":"array","title":"Variables"},"n":{"type":"integer","title":"N"},"quantiles":{"items":{"type":"number"},"type":"array","minItems":1,"title":"Quantiles"},"quantiled":{"additionalProperties":{"additionalProperties":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":1},"type":"object","minProperties":1},"type":"object","minProperties":1,"title":"Quantiled"}},"additionalProperties":true,"type":"object","required":["scenarios","variables","n","quantiles","quantiled"],"title":"BrowserPredictMultiPayload","description":"A browser-computed `predict_multi` result, as the ingest path accepts it.\n\nStricter than `PredictMultiResultPayload`, which describes the same shape\ncoming back from a drun worker. This one is client input that reaches the\nparquet writer through a hook committing `SAVING_RESULTS` before it reads\nthe payload, so a NaN, an infinity or an integer too large for an f64 would\nbe discovered only after the job is already wedged. Everything the writer\nindexes is therefore a validation error here, while a 422 is still free.\n\n`scenarios`/`variables`/`n` are the engine's own account of what it ran;\nthey are declared so a payload missing them is rejected as the wrong shape\nrather than KeyError'd downstream."},"BrowserResponseCurvePayload":{"properties":{"variable":{"type":"string","title":"Variable"},"responses":{"items":{"type":"string"},"type":"array","title":"Responses"},"types":{"items":{"type":"string"},"type":"array","title":"Types"},"values":{"items":{"type":"number"},"type":"array","minItems":1,"title":"Values"},"dates":{"items":{"type":"string"},"type":"array","title":"Dates"},"quantiles":{"items":{"type":"number"},"type":"array","minItems":1,"title":"Quantiles"},"static_curves":{"additionalProperties":{"additionalProperties":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":1},"type":"object","minProperties":1},"type":"object","minProperties":1,"title":"Static Curves"},"temporal":{"additionalProperties":{"additionalProperties":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":1},"type":"object","minProperties":1},"type":"object","minProperties":1,"title":"Temporal"}},"additionalProperties":true,"type":"object","required":["variable","responses","types","values","dates","quantiles","static_curves","temporal"],"title":"BrowserResponseCurvePayload","description":"A browser-computed `response_curve` result for one curve input, as ingested.\n\nThe response-curve sibling of `BrowserPredictMultiPayload`, held to the same\nstandard: the completion hook commits `SAVING_RESULTS` before it reads the\npayload, so everything the row writer indexes - the bands' count and\nlengths, every measurement being a finite number - is a validation error\nhere while a 422 is still free. Agreement with the op (variable, grid,\nwindow, targets) is checked against the server-built op in `fe_actions`,\nsince only it knows what was asked for.\n\nBoth curve maps are `type -> response -> [quantiles][...]`: static bands run\nover the `values` grid, temporal bands over the unique `dates`."},"Code":{"properties":{"variables":{"items":{"$ref":"#/components/schemas/Variable-Input"},"type":"array","minItems":1,"title":"Variables","description":"list of target variables"},"op":{"$ref":"#/components/schemas/OptimizationOp","description":"target operators"}},"type":"object","required":["variables","op"],"title":"Code","description":"Code body."},"CompetitorBrand":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the competitor brand effect","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the competitor brand effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"CompetitorBrand","description":"Control the competitor brand variables."},"CompetitorDistribution":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the competitor distribution effect","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the competitor distribution effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false}},"type":"object","title":"CompetitorDistribution","description":"Control the competitor distribution variables."},"CompetitorMedia":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the competitor media effect","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the competitor media effect; null (the default) adds no effect-size prior, so the data alone sets it"},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days into the future do we expect a media investment to have an impact","default":120},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false}},"type":"object","title":"CompetitorMedia","description":"Control the competitor media variables."},"CompetitorPrice":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the competitor price effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the competitor price effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false}},"type":"object","title":"CompetitorPrice","description":"Control the competitor price variables."},"ConstraintViolations":{"properties":{"Id":{"type":"integer","title":"Id"},"Value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"Violation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Violation"},"Constraint":{"title":"Constraint"}},"type":"object","required":["Id","Constraint"],"title":"ConstraintViolations","description":"Referenche schema for ConstraintViolations."},"CoutnryIndicatorDates":{"properties":{"country":{"type":"string","title":"Country"},"indicators":{"items":{"$ref":"#/components/schemas/_Indicator"},"type":"array","title":"Indicators"}},"type":"object","required":["country","indicators"],"title":"CoutnryIndicatorDates","description":"External ataimport's countries indicators and dates."},"CreateTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"graph":{"additionalProperties":true,"type":"object","title":"Graph"}},"type":"object","required":["graph"],"title":"CreateTemplate","description":"Schema for create template.","examples":[{"graph":{"edges":[{"arguments":["positive"],"source":"media","target":"sales"}],"nodes":[{"id":"sales","key":"File:Sales","type":"Node.Data"},{"id":"media","key":"File:Media","type":"Node.Data"}]},"name":"Marketing Mix Model Template","note":"Template for standard marketing mix analysis"}]},"Currency":{"properties":{"currency_code":{"type":"string","title":"Currency Code"},"symbol":{"type":"string","title":"Symbol"}},"type":"object","required":["currency_code","symbol"],"title":"Currency","description":"Schema for currency data."},"CustomerExperience":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the customer experience effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the customer experience effect"},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days into the future do we expect a media investment to have an impact","default":120},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false},"net_profit_node":{"type":"boolean","title":"Net Profit Node","description":"Construct a `NetProfit` node i.e. Profit-investments. This will be shown in the dashboards etc. as a `Response`","default":false}},"type":"object","title":"CustomerExperience","description":"Control the customer experience."},"DataImport":{"properties":{"Error":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Error"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /data-imports/{IId})"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Import creation timestamp"},"DatasetName":{"type":"string","title":"Datasetname","description":"Target dataset name where data will be imported"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the import"},"Status":{"$ref":"#/components/schemas/TaskState","description":"Import state: PENDING, PROCESSING, COMPLETE, or FAILED"},"External":{"type":"boolean","title":"External","description":"Whether data comes from external source (e.g., macro indicators)"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"UploadFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploadfilename","description":"Original filename of uploaded file"}},"type":"object","required":["IId","Date","DatasetName","Status","External"],"title":"DataImport","description":"Response schema for data import jobs.","examples":[{"CreatorId":"user_123","DatasetName":"sales","Date":"2024-01-15T10:30:00","External":false,"IId":1,"Name":"Q4 Sales Data","Note":"Monthly sales figures for Q4 2024","Status":"complete","UploadFilename":"sales_q4_2024.csv"}]},"DataImportRef":{"properties":{"MinDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mindate","description":"First date covered by the data. NULL for an entity whose cache has not been populated yet, and for one carrying no dated rows."},"MaxDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Maxdate","description":"Last date covered by the data."},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable present, when requested with `with_variable_ids=true`. Ids only: a wide upload carries over a thousand variables and a dataset several thousand, so the full objects are too large for a list page — resolve them against `GET /variables`. NULL when not requested."},"Error":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Error"},"IId":{"type":"integer","title":"Iid"},"Date":{"type":"string","format":"date-time","title":"Date"},"DatasetName":{"type":"string","title":"Datasetname"},"Status":{"$ref":"#/components/schemas/TaskState"},"External":{"type":"boolean","title":"External"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"ModellingCombinations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ModellingCombinationForDataImport"},"type":"array"},{"type":"null"}],"title":"Modellingcombinations"}},"type":"object","required":["IId","Date","DatasetName","Status","External"],"title":"DataImportRef","description":"Reference schema for data import."},"DataImportVariables":{"properties":{"MinDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mindate","description":"First date covered by the data. NULL for an entity whose cache has not been populated yet, and for one carrying no dated rows."},"MaxDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Maxdate","description":"Last date covered by the data."},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable present, when requested with `with_variable_ids=true`. Ids only: a wide upload carries over a thousand variables and a dataset several thousand, so the full objects are too large for a list page — resolve them against `GET /variables`. NULL when not requested."},"Error":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Error"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /data-imports/{IId})"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Import creation timestamp"},"DatasetName":{"type":"string","title":"Datasetname","description":"Target dataset name where data will be imported"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the import"},"Status":{"$ref":"#/components/schemas/TaskState","description":"Import state: PENDING, PROCESSING, COMPLETE, or FAILED"},"External":{"type":"boolean","title":"External","description":"Whether data comes from external source (e.g., macro indicators)"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"UploadFilename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploadfilename","description":"Original filename of uploaded file"},"ModellingCombinations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ModellingCombinationForDataImport"},"type":"array"},{"type":"null"}],"title":"Modellingcombinations"},"UploadProgress":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Uploadprogress"},"Variable":{"anyOf":[{"items":{"$ref":"#/components/schemas/VariableRef"},"type":"array"},{"type":"null"}],"title":"Variable"}},"type":"object","required":["IId","Date","DatasetName","Status","External"],"title":"DataImportVariables","description":"Data import with optional variables.","examples":[{"CreatorId":"user_123","DatasetName":"sales","Date":"2024-01-15T10:30:00","External":false,"IId":1,"Name":"Q4 Sales Data","Note":"Monthly sales figures for Q4 2024","Status":"complete","UploadFilename":"sales_q4_2024.csv"}]},"DataSet":{"properties":{"MinDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mindate","description":"First date covered by the data. NULL for an entity whose cache has not been populated yet, and for one carrying no dated rows."},"MaxDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Maxdate","description":"Last date covered by the data."},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable present, when requested with `with_variable_ids=true`. Ids only: a wide upload carries over a thousand variables and a dataset several thousand, so the full objects are too large for a list page — resolve them against `GET /variables`. NULL when not requested."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /datasets/{IId})"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active dataset for modeling"},"Name":{"type":"string","title":"Name","description":"Dataset display name"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Dataset creation timestamp"},"DataImports":{"items":{"$ref":"#/components/schemas/DataImportRef"},"type":"array","title":"Dataimports","description":"List of data imports included in this dataset"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/TaskState","description":"Processing state: PENDING, PROCESSING, COMPLETE, or FAILED"},"Blocked":{"type":"boolean","title":"Blocked","description":"True when at least one data value falls outside this dataset's variable limits. A sim/pred/attribution/optimize/response-curve submission on a strict project (or with `validate_limits`) rejects a Blocked dataset until the limits are patched to cover the data; otherwise the job runs with a warning.","default":false},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Start of the window the dataset was built with; NULL when unbounded. What it was *asked* for — `MinDate` is what the data actually covers."},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"End of the window the dataset was built with."},"MergeOrderBy":{"$ref":"#/components/schemas/MergeOrderBy","description":"What ranked duplicate rows when this dataset was merged."}},"type":"object","required":["IId","Selected","Name","CreatedDate","DataImports","Status","MergeOrderBy"],"title":"DataSet","description":"Response schema for datasets (collections of data imports).","examples":[{"CreatedDate":"2024-01-15T10:30:00Z","CreatorId":"user-123","DataImports":[{"DatasetName":"Sales","Date":"2024-01-15T10:30:00","External":false,"IId":1,"Status":"complete"}],"IId":1,"MergeOrderBy":"insert_date","Name":"Marketing Dataset Q4","Note":"Combined sales and marketing data","Selected":true,"Status":"complete"}]},"DataSetActiveHistory":{"properties":{"Id":{"type":"integer","title":"Id"},"DataSetId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Datasetid"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["Id","DataSetId","UpdatedByUser","UpdatedAt"],"title":"DataSetActiveHistory","description":"Response schema for dataset active history records."},"DataSetCorrelationRequest":{"properties":{"targets":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Targets"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Variables"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}},"type":"object","required":["targets"],"title":"DataSetCorrelationRequest","description":"Schema for dataset correlation request."},"DataSetFilterRule":{"properties":{"mode":{"$ref":"#/components/schemas/FilterMode","description":"`include` keeps matching rows, `exclude` drops them. A row survives when it matches at least one include — or no include was given at all — and no exclude."},"variable_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Variable Id","description":"`IId` of the variable this rule is about; unset means any."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Unset means any country."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"Unset means any region."},"grouping":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grouping","description":"Unset means any grouping."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Rule applies from this date; unset is unbounded."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"Rule applies until this date; unset is unbounded."}},"type":"object","required":["mode"],"title":"DataSetFilterRule","description":"One include/exclude rule applied while a dataset is built.\n\nEvery field but `mode` is optional and unset means \"any\", so a rule narrows\nonly the dimensions it names."},"DataSetImportance":{"properties":{"targets":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Targets"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Variables"},"quantiles":{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array","minItems":1,"title":"Quantiles","default":[10,25,50,75,90]},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}},"type":"object","required":["targets"],"title":"DataSetImportance","description":"Schema for dataset importance request."},"DataSetImportanceJobRequest":{"properties":{"targets":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Targets"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Variables"},"quantiles":{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array","minItems":1,"title":"Quantiles","default":[10,25,50,75,90]},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30}},"type":"object","required":["targets","dataset_id"],"title":"DataSetImportanceJobRequest","description":"Schema for dataset importance job request."},"DataSetRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"Name":{"type":"string","title":"Name"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"},"Status":{"$ref":"#/components/schemas/TaskState"},"Selected":{"type":"boolean","title":"Selected"}},"type":"object","required":["IId","Name","CreatedDate","Status","Selected"],"title":"DataSetRef","description":"Reference schema for DataSet."},"DataSetRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name, unique within the project: a taken name returns 400, send `prefix` instead to get a free one. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"activate":{"type":"boolean","title":"Activate","description":"Activate the model/dataset as soon as it is done training.","default":false},"upload_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Upload Ids","description":"List of data uploads to include in the new dataset, will be merged with the provided `dataset_ids`."},"dataset_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}]},"type":"array"},{"type":"null"}],"title":"Dataset Ids","description":"List of datasets to include in the new dataset where the data uploads they are comprised of will be merged with the provided upload_ids to form a new data set. Use the string active as a value if the to use the active dataset."},"external_datasets":{"anyOf":[{"items":{"$ref":"#/components/schemas/DataUploadsExternalPost"},"type":"array"},{"type":"null"}],"title":"External Datasets","description":"External dataset to merge with dataset."},"derivations":{"anyOf":[{"items":{"$ref":"#/components/schemas/DerivationPost"},"type":"array"},{"type":"null"}],"title":"Derivations","description":"Variables to build by aggregating existing ones. Each becomes a new variable in a data upload created for this dataset, holding only the derived variables — so the inputs stay available at their original granularity unless a filter excludes them."},"variable_limits":{"anyOf":[{"items":{"$ref":"#/components/schemas/PatchDatasetVariableLimit"},"type":"array"},{"type":"null"}],"title":"Variable Limits","description":"Optional per-row VariableStats limits applied at dataset creation. Each row targets a single (VariableIId, Country, Region, Grouping) tuple. A row whose tuple `filters` remove (no include names it, or an exclude without dates does) is dropped rather than refused, and listed under the dataset task's `dropped_variable_limits`. Any other row must name a tuple one of the sources holds, or the request is refused with a 400. User-supplied values take precedence over both the source-dataset min/max merge and the data-derived defaults."},"interpolation_priority":{"anyOf":[{"items":{"$ref":"#/components/schemas/InterpolationPriority"},"type":"array"},{"type":"null"}],"title":"Interpolation Priority","description":"Resolves interpolation-config conflicts between the sources: for the named variable, the named upload/dataset's config wins. Variables without an entry fall back to declaration order (upload_ids first, then dataset_ids)."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Drop data before this date from the whole dataset. Applied while the dataset is built, so it also narrows what a LINEAR interpolation chain has as a leading anchor. Unset means unbounded, and `filters` narrow it further on top."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"Drop data after this date from the whole dataset."},"filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/DataSetFilterRule"},"type":"array"},{"type":"null"}],"title":"Filters","description":"Include/exclude rules over variables, modelling combinations and dates. A row is kept when it matches at least one `include` — or none was given — and no `exclude`; a rule narrows only the dimensions it names. Combination match is exact, so `all` is a stored value rather than a wildcard. These bound the dataset further than `start_date` / `end_date`, never wider."},"merge_order_by":{"$ref":"#/components/schemas/MergeOrderBy","description":"What ranks duplicate rows; the last one wins. `insert_date` ranks by the date each row's upload landed, whatever order the sources were declared in (the historical behaviour). `source_order` ranks by the source's position in `upload_ids` + `dataset_ids`, with the insert date as tiebreak — so to keep the first declared source instead, declare them the other way round.","default":"insert_date"}},"type":"object","title":"DataSetRequest","description":"Schema for creating dataset request.","examples":[{"activate":true,"dataset_ids":["active",5],"external_datasets":[{"Name":"Macro Indicators","Note":"Economic indicators","dataset_name":"Macro","indicators":["Short-term interest rates","Consumer Confidence Index"]}],"filters":[{"country":"USA","grouping":"all","mode":"include","region":"all"},{"end_date":"2024-01-01T00:00:00","mode":"exclude","variable_id":101}],"name":"Marketing Dataset Q4","note":"Combined sales and marketing data for Q4 analysis","upload_ids":[1,2,3],"variable_limits":[{"Country":"USA","Grouping":"all","MaxLimit":100000,"MinLimit":0,"Region":"all","VariableIId":101}]}]},"DataUploadsExternalPost":{"properties":{"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"indicators":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Indicators","description":"List of indicators"},"dataset_name":{"type":"string","enum":["Macro","Weather"],"title":"Dataset Name"}},"type":"object","required":["dataset_name"],"title":"DataUploadsExternalPost","description":"Schema for creating external datasource.","examples":[{"Name":"Macro Economic Indicators","Note":"External macro data for Q4","dataset_name":"Macro","indicators":["Short-term interest rates","Long-term interest rates","Consumer Confidence Index"]}]},"DataUploadsUpdate":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"DataUploadsUpdate","description":"Schema for updating data uploads.","examples":[{"Name":"Updated Sales Data Q4","Note":"Corrected version with December figures"}]},"Dataset":{"type":"string","enum":["Brand","CompetitorBrand","Distribution","CompetitorDistribution","Events","Macro","Media","CustomerExperience","CompetitorMedia","Sales","CompetitorPrice","Visits","Weather","Extra"],"title":"Dataset","description":"User upload datasets."},"DatasetCheck":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/MergeIssue"},"type":"array","title":"Issues","default":[]},"truncated":{"type":"integer","title":"Truncated","description":"Issues beyond the listed ones","default":0},"checked":{"type":"boolean","title":"Checked","description":"False when the merge cannot break a rule and was skipped"},"reason":{"anyOf":[{"type":"string","enum":["no_media","single_media_source"]},{"type":"null"}],"title":"Reason"},"check_id":{"type":"integer","title":"Check Id"},"status":{"$ref":"#/components/schemas/TaskState"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["checked","check_id","status"],"title":"DatasetCheck","description":"A dataset merge check's progress and, once COMPLETE, its result."},"DatasetCheckSubmitted":{"properties":{"check_id":{"type":"integer","title":"Check Id","description":"IId of the check, for GET /datasets/check"}},"type":"object","required":["check_id"],"title":"DatasetCheckSubmitted","description":"A submitted dataset merge check."},"DatasetLimitViolation":{"properties":{"Slug":{"type":"string","title":"Slug","description":"Variable slug"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit","description":"The dataset's lower bound; null means unbounded"},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit","description":"The dataset's upper bound; null means unbounded"},"BelowCount":{"type":"integer","title":"Belowcount","description":"Rows strictly below MinLimit"},"Lowest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lowest","description":"The lowest value below MinLimit; null when none is"},"AboveCount":{"type":"integer","title":"Abovecount","description":"Rows strictly above MaxLimit"},"Highest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Highest","description":"The highest value above MaxLimit; null when none is"}},"type":"object","required":["Slug","Country","Region","Grouping","MinLimit","MaxLimit","BelowCount","Lowest","AboveCount","Highest"],"title":"DatasetLimitViolation","description":"One variable segment whose data falls outside its dataset-level limits."},"DatasetType":{"type":"string","enum":["active"],"title":"DatasetType","description":"Dataset type."},"DatasetVariableLimit":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid","description":"Variable IId within the project"},"Slug":{"type":"string","title":"Slug","description":"Variable slug"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit"},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit"},"ProjectMinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projectminlimit","description":"The project-level MinLimit this row falls back to"},"ProjectMaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projectmaxlimit","description":"The project-level MaxLimit this row falls back to"},"EffectiveMinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectiveminlimit","description":"The lower bound enforced: MinLimit, else ProjectMinLimit; null means unbounded"},"EffectiveMaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectivemaxlimit","description":"The upper bound enforced: MaxLimit, else ProjectMaxLimit; null means unbounded"}},"type":"object","required":["VariableIId","Slug","Country","Region","Grouping"],"title":"DatasetVariableLimit","description":"Per-variable, per-modelling-combination dataset-level limits."},"DateRange-Input":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"}},"type":"object","required":["start_date","end_date"],"title":"DateRange","description":"Date range selector.\n\n`NaiveDatetime`, like every date an optimization is built from: the dataset\nrows, the periodicity checks and the compiled `node[...]` slices are all\nnaive, so a trailing `Z` here used to reach `parse_dates` and raise\n`TypeError: can't compare offset-naive and offset-aware datetimes` as a 500.\nRefused as a 422 instead, rather than silently stripped - the caller means a\ndifferent instant than the one that would be stored."},"DateRange-Output":{"properties":{"min":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Max"}},"type":"object","required":["min","max"],"title":"DateRange","description":"Min and max dates for a resource collection."},"DateSelector":{"properties":{"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"$ref":"#/components/schemas/DateRange-Input"},{"type":"null"}],"title":"Dates","description":"Select all dates by set to None, select specific dates, or select range"}},"type":"object","title":"DateSelector","description":"Dates selector."},"DerivationOp":{"type":"string","enum":["sum","mean","add","mul","log","exp","power","running_sum","running_mean"],"title":"DerivationOp","description":"One operation in a derivation's list.\n\nEvery op produces a series keyed by modelling combination and date, built\nfrom variables, a constant, or earlier ops' results.\n\n``SUM``/``MEAN`` aggregate their variables' rows and so tolerate a variable\nhaving no row on a date; the row-wise ops join instead, where a missing\noperand makes the whole date missing. That difference is why both exist —\n``SUM`` over two variables is not ``ADD`` over the same two."},"DerivationOpPost":{"properties":{"order":{"type":"integer","minimum":0.0,"title":"Order","description":"Execution order, 0-based, no gaps."},"op":{"$ref":"#/components/schemas/DerivationOp"},"vars":{"items":{"type":"integer"},"type":"array","title":"Vars","description":"Variable IIds this operation reads."},"refs":{"items":{"type":"integer"},"type":"array","title":"Refs","description":"Earlier operations this one reads, by their order."},"const":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Const","description":"Constant operand. The exponent for power, the window size for the running ops (null meaning cumulative), a plain term for add/mul."}},"type":"object","required":["order","op"],"title":"DerivationOpPost","description":"One operation in a derivation, in execution order."},"DerivationPost":{"properties":{"ops":{"items":{"$ref":"#/components/schemas/DerivationOpPost"},"type":"array","minItems":1,"title":"Ops"},"source_import_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Source Import Ids","description":"Data upload IIds whose rows are read."},"attributes":{"additionalProperties":{"type":"string"},"type":"object","title":"Attributes","description":"Value for each dimension the variables read disagree on, e.g. {\"Campaign\": \"Discovery\"}. Dimensions they agree on are copied."},"exclude_inputs":{"type":"boolean","title":"Exclude Inputs","description":"Exclude the variables read from the dataset, so their values are counted once through the new variable rather than twice. Set false to keep both.","default":true}},"type":"object","required":["ops","source_import_ids"],"title":"DerivationPost","description":"One variable to build, as a list of operations.\n\nThe last operation's result is the new variable. Everything before it is an\nintermediate that exists only while the rows are built — never a variable,\nnever stored."},"DetailedAttribution":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for attribution"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Attribution analysis start date"},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"Attribution analysis end date"},"Source":{"anyOf":[{"type":"string","enum":["manual","fit","optimization","simulation","prediction"]},{"type":"null"}],"title":"Source","description":"What produced this attribution: manual, fit, optimization, simulation or prediction. Filled on the list endpoint only."},"AttributionSets":{"items":{"$ref":"#/components/schemas/AttributionSetRef"},"type":"array","title":"Attributionsets","description":"Attribution sets that include this job"},"FitModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}],"description":"Model used for fit-period attribution"},"ReferencePointFallback":{"$ref":"#/components/schemas/ReferencePointFallback","description":"How to handle missing reference points: 'zero' or 'mean'"},"ReferencePointSource":{"$ref":"#/components/schemas/ReferencePointSource","description":"Source of reference points not supplied by the caller","default":"DataMin"},"PredictedTargetsAsData":{"type":"boolean","title":"Predictedtargetsasdata","description":"Whether predicted target values are used as input data"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable present in this attribution. NULL when not requested."},"UpdateVariable":{"items":{"$ref":"#/components/schemas/UpdateVariable"},"type":"array","title":"Updatevariable","description":"Variable modifications applied during attribution"},"SimulationAssociation":{"anyOf":[{"$ref":"#/components/schemas/AttributionSimulationAssociation"},{"type":"null"}],"description":"Linked simulation job (if created from simulation)"},"PredictionAssociation":{"anyOf":[{"$ref":"#/components/schemas/AttributionPredictionAssociation"},{"type":"null"}],"description":"Linked prediction job (if created from prediction)"},"OptimizationAssociation":{"anyOf":[{"$ref":"#/components/schemas/AttributionOptimizationAssociation"},{"type":"null"}],"description":"Linked optimization job (if created from optimization)"},"Fit":{"type":"boolean","title":"Fit","description":"Whether this is a fit attribution (FitModelId is set)","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Model","Date","AttributionSets","ReferencePointFallback","PredictedTargetsAsData","UpdateVariable","Fit"],"title":"DetailedAttribution","description":"Detailed response schema for attribution jobs with configuration.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00Z","IId":1,"JobId":123,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"Marketing Model","Region":"all"},"Name":"Q4 Attribution Analysis","Note":"Attribution analysis for Q4","PredictedTargetsAsData":true,"ReferencePointFallback":"Zero","Status":"completed","UIFilterAttributionSets":[],"UpdateVariable":[]}]},"DetailedAttributionSet":{"properties":{"Error":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Error"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active attribution set for the dashboard"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Set creation timestamp"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the set"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/TaskState","description":"Processing state: PENDING, PROCESSING, COMPLETE, or FAILED"},"CreationFilters":{"anyOf":[{},{"type":"null"}],"title":"Creationfilters","description":"Filters for auto-generating attributions (Country/Region)"},"Attributions":{"items":{"$ref":"#/components/schemas/AttributionRef"},"type":"array","title":"Attributions","description":"List of attribution jobs included in this set"},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable across all attributions in this set, when requested with `with_variable_ids=true`. NULL when not requested."},"DataSet":{"anyOf":[{"$ref":"#/components/schemas/DataSetRef"},{"type":"null"}],"description":"Reference to the associated dataset"}},"type":"object","required":["IId","Selected","CreatedDate","Status","Attributions"],"title":"DetailedAttributionSet","description":"Detailed response schema for attribution sets with task progress.","examples":[{"Attributions":[{"DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00Z","IId":1,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"Marketing Model","Region":"all"},"Name":"Attribution 1","Status":"completed"}],"CreatedDate":"2024-01-15T10:30:00Z","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"IId":1,"Name":"Q4 Attribution Set","Note":"Combined attribution analysis for Q4","Selected":true,"Status":"complete"}]},"DetailedDataSet":{"properties":{"Error":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Error"},"MinDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mindate","description":"First date covered by the data. NULL for an entity whose cache has not been populated yet, and for one carrying no dated rows."},"MaxDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Maxdate","description":"Last date covered by the data."},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable present, when requested with `with_variable_ids=true`. Ids only: a wide upload carries over a thousand variables and a dataset several thousand, so the full objects are too large for a list page — resolve them against `GET /variables`. NULL when not requested."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /datasets/{IId})"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active dataset for modeling"},"Name":{"type":"string","title":"Name","description":"Dataset display name"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Dataset creation timestamp"},"DataImports":{"items":{"$ref":"#/components/schemas/DataImportRef"},"type":"array","title":"Dataimports","description":"List of data imports included in this dataset"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/TaskState","description":"Processing state: PENDING, PROCESSING, COMPLETE, or FAILED"},"Blocked":{"type":"boolean","title":"Blocked","description":"True when at least one data value falls outside this dataset's variable limits. A sim/pred/attribution/optimize/response-curve submission on a strict project (or with `validate_limits`) rejects a Blocked dataset until the limits are patched to cover the data; otherwise the job runs with a warning.","default":false},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Start of the window the dataset was built with; NULL when unbounded. What it was *asked* for — `MinDate` is what the data actually covers."},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"End of the window the dataset was built with."},"MergeOrderBy":{"$ref":"#/components/schemas/MergeOrderBy","description":"What ranked duplicate rows when this dataset was merged."},"Models":{"items":{"$ref":"#/components/schemas/ModelsRef"},"type":"array","title":"Models","description":"Models trained on this dataset"},"Attributions":{"items":{"$ref":"#/components/schemas/AttributionRef"},"type":"array","title":"Attributions","description":"Attribution jobs using this dataset"},"PredictionJobs":{"items":{"$ref":"#/components/schemas/PredictionJobsRef"},"type":"array","title":"Predictionjobs","description":"Prediction jobs using this dataset"},"SimulationJobs":{"items":{"$ref":"#/components/schemas/SimulationJobsRef"},"type":"array","title":"Simulationjobs","description":"Simulation jobs using this dataset"},"AttributionSets":{"items":{"$ref":"#/components/schemas/AttributionSetRef"},"type":"array","title":"Attributionsets","description":"Attribution sets using this dataset"},"Issues":{"anyOf":[{"$ref":"#/components/schemas/MergeIssues"},{"type":"null"}],"description":"Merge issues that failed the build; NULL when it did not"}},"type":"object","required":["IId","Selected","Name","CreatedDate","DataImports","Status","MergeOrderBy","Models","Attributions","PredictionJobs","SimulationJobs","AttributionSets"],"title":"DetailedDataSet","description":"Detailed response schema for datasets with related jobs and models.","examples":[{"CreatedDate":"2024-01-15T10:30:00Z","CreatorId":"user-123","DataImports":[{"DatasetName":"Sales","Date":"2024-01-15T10:30:00","External":false,"IId":1,"Status":"complete"}],"IId":1,"MergeOrderBy":"insert_date","Name":"Marketing Dataset Q4","Note":"Combined sales and marketing data","Selected":true,"Status":"complete","UIFilterAttributionSets":[],"UIFilterAttributions":[],"UIFilterModels":[],"UIFilterPredictionJobs":[],"UIFilterSimulationJobs":[]}]},"DetailedFeatureImportance":{"properties":{"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier for the feature importance job"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Quantiles":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Quantiles","description":"Uncertainty quantiles computed"},"Targets":{"items":{"$ref":"#/components/schemas/VariableRef"},"type":"array","title":"Targets","description":"Target variables analyzed"},"Variables":{"items":{"$ref":"#/components/schemas/VariableRef"},"type":"array","title":"Variables","description":"Input variables with importance scores"}},"type":"object","required":["IId","Status","Targets","Variables"],"title":"DetailedFeatureImportance","description":"Detailed response schema for feature importance analysis jobs."},"DetailedGraphJob":{"properties":{"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier for the graph job"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Response":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response","description":"Graph instantiation response data"}},"type":"object","required":["IId","Status"],"title":"DetailedGraphJob","description":"Detailed response schema for graph instantiation jobs."},"DetailedModel":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active model for its market segment"},"Country":{"type":"string","title":"Country","description":"Country code from modelling combination (e.g., 'USA', 'GBR')"},"Region":{"type":"string","title":"Region","description":"Region code from modelling combination (e.g., 'all', 'northeast')"},"Grouping":{"type":"string","title":"Grouping","description":"Grouping code from modelling combination (e.g., 'all', 'retail')"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Model training completion timestamp"},"LiveModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodelid","description":"Internal id of the LiveModels row this model was materialized from; null for drun-trained models. Discriminator only - not an API path id."},"LiveModelIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodeliid","description":"Public IId of the source express model (valid in /live_models/{id} paths and builder deep links); populated on the detail endpoint only, null for drun-trained models."},"Parameters":{"anyOf":[{},{"type":"null"}],"title":"Parameters","description":"Model training hyperparameters and configuration"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible model training"},"GraphInstance":{"anyOf":[{"$ref":"#/components/schemas/GraphsInstanceGraph"},{"type":"null"}],"description":"Graph instance defining model structure"},"SimulationJobs":{"items":{"$ref":"#/components/schemas/SimulationJobsRef"},"type":"array","title":"Simulationjobs","description":"Simulation jobs that used this model"},"PredictionJobs":{"items":{"$ref":"#/components/schemas/PredictionJobsRef"},"type":"array","title":"Predictionjobs","description":"Prediction jobs that used this model"},"FullPrediction":{"anyOf":[{"$ref":"#/components/schemas/PredictionJobsRef"},{"type":"null"}],"description":"Full-period prediction job (if generated)"},"OptimizationJobs":{"items":{"$ref":"#/components/schemas/OptimizationJobsRef"},"type":"array","title":"Optimizationjobs","description":"Optimization jobs that used this model"},"Attributions":{"items":{"$ref":"#/components/schemas/AttributionRef"},"type":"array","title":"Attributions","description":"Attribution jobs that used this model"},"FitAttribution":{"anyOf":[{"$ref":"#/components/schemas/AttributionRef"},{"type":"null"}],"description":"In-sample attribution job for model fit validation"},"ModelPerformance":{"anyOf":[{"items":{"$ref":"#/components/schemas/ModelPerformace"},"type":"array"},{"type":"null"}],"title":"Modelperformance","description":"Model accuracy metrics (R², MAPE, etc.)"},"FitPriorPosterior":{"anyOf":[{"$ref":"#/components/schemas/PriorPosteriorJobs"},{"type":"null"}],"description":"In-sample prior/posterior analysis for model fit"}},"type":"object","required":["IId","DataSet","Status","Selected","Country","Region","Grouping","CreatedDate","SimulationJobs","PredictionJobs","OptimizationJobs","Attributions"],"title":"DetailedModel","description":"Detailed response schema for trained models with related jobs.","examples":[{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Grouping":"all","IId":1,"JobId":123,"Name":"USA All Model","Note":"Model for USA market","Parameters":{"epochs":500,"learning_rate":0.01},"Region":"all","Selected":true,"Status":"completed","UIFilterAttributions":[],"UIFilterOptimizationJobs":[],"UIFilterPredictionJobs":[],"UIFilterSimulationJobs":[]}]},"DetailedOptimization":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for optimization"},"Params":{"anyOf":[{},{"type":"null"}],"title":"Params","description":"Full optimization configuration parameters"},"TargetResult":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Targetresult","description":"Final objective value achieved by optimization"},"BaselineTarget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baselinetarget","description":"Target goal value (for goal-seek optimizations)"},"BaselineTargetResult":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baselinetargetresult","description":"Objective value at baseline (before optimization)"},"Improvement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Improvement","description":"Percentage improvement over baseline"},"Loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loss","description":"Final objective function loss value"},"ConstraintLoss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Constraintloss","description":"Penalty from constraint violations"},"ConstraintViolations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConstraintViolations"},"type":"array"},{"type":"null"}],"title":"Constraintviolations","description":"List of violated constraints with details"},"ConstraintViolation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Constraintviolation","description":"Total constraint violation magnitude"},"AdditionalConfig":{"anyOf":[{},{"type":"null"}],"title":"Additionalconfig","description":"Additional optimization configuration"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"},"SimulationJob":{"anyOf":[{"$ref":"#/components/schemas/SimulationJobsRef"},{"type":"null"}],"description":"Simulation job created from optimization results"},"UpdateVariable":{"items":{"$ref":"#/components/schemas/UpdateVariable"},"type":"array","title":"Updatevariable","description":"Optimized variable values (the solution)"},"AttributionAssociation":{"items":{"$ref":"#/components/schemas/OptimizationAttributionAssociation"},"type":"array","title":"Attributionassociation","description":"Attribution jobs linked to this optimization"}},"type":"object","required":["IId","DataSet","Status","Date","Model","UpdateVariable","AttributionAssociation"],"title":"DetailedOptimization","description":"Detailed response schema for optimization jobs with results and constraints.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":456,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Budget Optimization","Note":"Optimizing marketing spend for Q4","Status":"completed","UIFilterAttributionAssociation":[],"UpdateVariable":[]}]},"DetailedPredictionJobs":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Forecast period start date"},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"Forecast period end date"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for this prediction"},"Scenarios":{"items":{"$ref":"#/components/schemas/_DetailedPredictionScenarios"},"type":"array","title":"Scenarios","description":"Named scenarios with variable modifications"},"AdditionalConfig":{"anyOf":[{},{"type":"null"}],"title":"Additionalconfig","description":"Additional prediction configuration parameters"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"},"AttributionAssociation":{"items":{"$ref":"#/components/schemas/PredictionAttributionAssociation"},"type":"array","title":"Attributionassociation","description":"Attribution jobs linked to this prediction"},"FullModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}],"description":"Model used for full-period prediction"},"FreezeNodes":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Freezenodes","description":"Variables frozen to data values during prediction"},"Quantiles":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Quantiles","description":"Uncertainty quantiles computed (e.g., [5, 50, 95])"},"TargetNodes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Targetnodes","description":"Target variables being predicted"},"Fit":{"type":"boolean","title":"Fit","description":"Whether this is a fit prediction (ModelFitId is set)","readOnly":true},"Source":{"type":"string","enum":["manual","fit","optimization","simulation","prediction"],"title":"Source","description":"What produced this prediction: manual or fit","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Date","Model","Scenarios","AttributionAssociation","Fit","Source"],"title":"DetailedPredictionJobs","description":"Detailed response schema for prediction jobs with scenarios and configuration.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":789,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Sales Prediction","Note":"Prediction for Q4 sales","Scenarios":[],"Status":"completed","UIFilterAttributionAssociation":[]}]},"DetailedPriorPosterior":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for analysis"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"ReferencePointFallback":{"$ref":"#/components/schemas/ReferencePointFallback","description":"How to handle missing reference points: 'zero' or 'mean'"},"FitModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}],"description":"Reference model for fit comparison (if analyzing model fit)"},"Baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttrBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline","description":"Baseline values for variables"}},"type":"object","required":["IId","DataSet","Status","Model","Date","ReferencePointFallback"],"title":"DetailedPriorPosterior","description":"Detailed response schema for prior/posterior distribution analysis.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":101,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Prior Posterior Analysis","Note":"Comparing prior and posterior distributions","ReferencePointFallback":"Zero","Status":"completed"}]},"DetailedSimulationJobs":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for this simulation"},"ScenarioStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scenariostartdate","description":"Start date for scenario comparison period"},"ScenarioEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scenarioenddate","description":"End date for scenario comparison period"},"UpdateVariable":{"items":{"$ref":"#/components/schemas/SimulationUpdateVariable"},"type":"array","title":"Updatevariable","description":"Variable modifications per scenario (baseline vs scenario values)"},"AdditionalConfig":{"anyOf":[{},{"type":"null"}],"title":"Additionalconfig","description":"Additional simulation configuration parameters"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"},"AttributionAssociation":{"items":{"$ref":"#/components/schemas/SimulationAttributionAssociation"},"type":"array","title":"Attributionassociation","description":"Attribution jobs linked to this simulation"},"OptimizationJob":{"anyOf":[{"$ref":"#/components/schemas/OptimizationJobsRef"},{"type":"null"}],"description":"Optimization job that created this simulation (if applicable)"},"Source":{"type":"string","enum":["manual","fit","optimization","simulation","prediction"],"title":"Source","description":"What produced this simulation: manual or optimization","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Date","Model","UpdateVariable","AttributionAssociation","Source"],"title":"DetailedSimulationJobs","description":"Detailed response schema for simulation jobs with scenario configurations.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":456,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Sales Simulation","Note":"Simulation for Q4 marketing scenarios","Status":"completed","UIFilterAttributionAssociation":[],"UpdateVariable":[]}]},"Direction":{"properties":{"op":{"$ref":"#/components/schemas/DirectionOP"},"variable":{"type":"string","title":"Variable","description":"Variable slug, named the same way as `targets.variables`"}},"type":"object","required":["op","variable"],"title":"Direction","description":"Define node directions."},"DirectionOP":{"type":"string","enum":["Minimize","Maximize","Neutral"],"title":"DirectionOP","description":"Equality and Inquality operators."},"Distribution":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the distribution effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the distribution effect"},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Distribution","description":"Control the distribution."},"DownloadPredictionBody":{"properties":{"result_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Result Filters"},"minimize_format":{"type":"boolean","title":"Minimize Format","default":false},"output_format":{"type":"string","enum":["csv","parquet"],"title":"Output Format","default":"csv"}},"type":"object","title":"DownloadPredictionBody","description":"Request body for prediction download _query endpoint."},"EarlyStopping":{"properties":{"patience":{"type":"integer","minimum":1.0,"title":"Patience","description":"How many of the last epochs should be used.","default":100},"absolute_tolerance":{"type":"number","minimum":0.0,"title":"Absolute Tolerance","description":"The absolute tolerance to use to determine to stop","default":0.1},"relative_tolerance":{"type":"number","minimum":0.0,"title":"Relative Tolerance","description":"The relative tolerance to use to determine to stop","default":0.1}},"type":"object","title":"EarlyStopping","description":"Config for early stopping."},"EffectType":{"type":"string","enum":["Effect.ImpactSize","Effect.ROISize"],"title":"EffectType","description":"How an effect prior's mean and std are read."},"EqualityInequalityConstraints":{"properties":{"constraint":{"$ref":"#/components/schemas/Code"},"op":{"$ref":"#/components/schemas/EqualityOP"},"value":{"type":"number","title":"Value"}},"type":"object","required":["constraint","op","value"],"title":"EqualityInequalityConstraints","description":"Defines equality and inequality constraint."},"EqualityOP":{"type":"string","enum":["<=",">=","=="],"title":"EqualityOP","description":"Equality and Inquality operators."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response schema.","examples":[{"detail":"Resource not found"}]},"Events":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the event effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the event effect"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Events","description":"Control the events."},"ExcelJobs":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier for the export job"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Export job creation timestamp"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Type":{"type":"string","title":"Type","description":"Export type identifier"}},"type":"object","required":["IId","Date","Status","Type"],"title":"ExcelJobs","description":"Response schema for Excel export jobs."},"ExcelPostAttribution":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"attribution","title":"Excel Type","default":"attribution"},"attribution_id":{"type":"integer","title":"Attribution Id"},"quantile":{"type":"integer","title":"Quantile","default":50}},"type":"object","required":["attribution_id"],"title":"ExcelPostAttribution","description":"Post attribution excel job."},"ExcelPostAttributionSet":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"attributionset","title":"Excel Type","default":"attributionset"},"attribution_set_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionSetType"}],"title":"Attribution Set Id"},"quantile":{"type":"integer","title":"Quantile","default":50}},"type":"object","required":["attribution_set_id"],"title":"ExcelPostAttributionSet","description":"Post attributionset excel job."},"ExcelPostDataUpload":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"dataupload","title":"Excel Type","default":"dataupload"},"upload_id":{"type":"integer","title":"Upload Id"}},"type":"object","required":["upload_id"],"title":"ExcelPostDataUpload","description":"Post dataset excel job."},"ExcelPostDataset":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"dataset","title":"Excel Type","default":"dataset"},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."}},"type":"object","title":"ExcelPostDataset","description":"Post dataset excel job."},"ExcelPostOptimization":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"optimization","title":"Excel Type","default":"optimization"},"optimization_id":{"type":"integer","title":"Optimization Id"}},"type":"object","required":["optimization_id"],"title":"ExcelPostOptimization","description":"Post optimization excel job."},"ExcelPostPrediction":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"prediction","title":"Excel Type","default":"prediction"},"prediction_id":{"type":"integer","title":"Prediction Id"}},"type":"object","required":["prediction_id"],"title":"ExcelPostPrediction","description":"Post prediction excel job."},"ExcelPostSimulation":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"simulation","title":"Excel Type","default":"simulation"},"simulation_id":{"type":"integer","title":"Simulation Id"}},"type":"object","required":["simulation_id"],"title":"ExcelPostSimulation","description":"Post simulation excel job."},"Extra":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the extra effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the extra effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Extra","description":"Control the extra variables."},"FeatureImportance":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Internal identifier for the feature importance job"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"}},"type":"object","required":["IId","Status"],"title":"FeatureImportance","description":"Response schema for feature importance analysis jobs."},"FileType":{"type":"string","enum":["csv","excel"],"title":"FileType","description":"File type enum."},"FilterMode":{"type":"string","enum":["include","exclude"],"title":"FilterMode","description":"Whether a dataset filter rule keeps rows or drops them.\n\nA row is kept when it matches at least one ``INCLUDE`` (or none is given)\nand no ``EXCLUDE``."},"FitMetric":{"properties":{"scope":{"type":"string","const":"fit","title":"Scope"},"kind":{"$ref":"#/components/schemas/FitMetricKind"},"stage":{"$ref":"#/components/schemas/Stage"}},"type":"object","required":["scope","kind","stage"],"title":"FitMetric","description":"Fit-scope rule metric."},"FitMetricKind":{"type":"string","enum":["r2_score","bayes_r2","mean_absolute_error","mean_absolute_percentage_error","weighted_mean_absolute_percentage_error","mean_squared_error","root_mean_squared_error"],"title":"FitMetricKind","description":"Goodness-of-fit metric kinds (model performance)."},"Graph":{"properties":{"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes"},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges"}},"type":"object","required":["nodes","edges"],"title":"Graph","description":"Schema for graph componens."},"GraphDetail":{"properties":{"graph":{"anyOf":[{"$ref":"#/components/schemas/Graph"},{"type":"null"}],"description":"Graph to build model for. The graph consists of nodes and edge, ex. {'nodes':[{'type':'Node.Data','id':'macro','key':'File:Macro|Indicator:CCI'},{'type':'Node.GraphGenerator.KPI','id':'sales', 'key':'File:Sales|Product:Health|Metric:UnitsSold'}],'edges':[{'arguments':['neutral'],'source':'macro','target':'sales'}]}"},"graph_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Graph Id","description":"The id of graph to use to create models."},"graph_variables":{"anyOf":[{"$ref":"#/components/schemas/BasicModelVariables"},{"type":"null"}],"description":"High-level effect information to use when auto-creating basic models."}},"type":"object","title":"GraphDetail","description":"schema class of graph detail. graph, graph id, and graph variables."},"GraphInstanceModel":{"properties":{"Id":{"type":"integer","title":"Id"},"HasFinished":{"type":"boolean","title":"Hasfinished"},"Models":{"items":{"$ref":"#/components/schemas/ModelsRef"},"type":"array","title":"Models"}},"type":"object","required":["Id","HasFinished","Models"],"title":"GraphInstanceModel","description":"Reference schema for graph instantiations with model info."},"GraphRequest":{"properties":{"graph":{"$ref":"#/components/schemas/Graph","description":"Graph structure defining variable relationships for modeling. Contains 'nodes' (variables) and 'edges' (causal relationships between variables). Each node has type, id, and key; edges define source→target connections."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name the graph is listed under, so it can be found again."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-text note on what the graph is for."}},"type":"object","required":["graph"],"title":"GraphRequest","description":"Request body for creating a new graph structure."},"GraphUpdate":{"properties":{"graph":{"anyOf":[{"$ref":"#/components/schemas/Graph"},{"type":"null"}],"description":"graph instances which want to be updated, consist of node and edge. Leave out to rename or annotate the graph without touching its nodes."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name the graph is listed under, so it can be found again."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-text note on what the graph is for."}},"type":"object","title":"GraphUpdate","description":"Schemas of graph patch request endpoint, consist of graph."},"Graphs":{"properties":{"Id":{"type":"integer","title":"Id","description":"Graph identifier"},"Graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph","description":"Graph structure with nodes (variables) and edges (relationships)"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name the graph was saved under"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Note saved with the graph"},"CreatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"When the graph was saved"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid","description":"User who saved the graph"},"NodeCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nodecount","description":"Nodes in the stored structure, once there is one"},"EdgeCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edgecount","description":"Edges in the stored structure, once there is one"},"InstancesJobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instancesjobid","description":"Background job ID for graph instantiation"},"Instantions":{"items":{"$ref":"#/components/schemas/GraphInstanceModel"},"type":"array","title":"Instantions","description":"List of graph instances created from this graph"}},"type":"object","required":["Id","Instantions"],"title":"Graphs","description":"Response schema for causal graph structures."},"GraphsBasicJob":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Internal identifier for the graph job"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"}},"type":"object","required":["IId","Status"],"title":"GraphsBasicJob","description":"Response schema for graph instantiation jobs."},"GraphsDetail":{"properties":{"graphs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Graph"},"type":"array"},{"type":"null"}],"title":"Graphs","description":"List of graphs to build models for. Each graph consists of nodes and edge, ex. {'nodes':[{'type':'Node.Data','id':'macro','key':'File:Macro|Indicator:CCI'},{'type':'Node.GraphGenerator.KPI','id':'sales', 'key':'File:Sales|Product:Health|Metric:UnitsSold'}],'edges':[{'arguments':['neutral'],'source':'macro','target':'sales'}]}"},"graph_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Graph Ids","description":"List of ids of graphs to use to create models."},"graph_variables":{"anyOf":[{"$ref":"#/components/schemas/BasicModelVariables"},{"type":"null"}],"description":"High-level effect information to use when auto-creating basic models."}},"type":"object","title":"GraphsDetail","description":"schema class of graphs detail. graphs, graph ids, and graph variables."},"GraphsInstanceGraph":{"properties":{"Id":{"type":"integer","title":"Id"},"HasFinished":{"type":"boolean","title":"Hasfinished"},"Graph":{"$ref":"#/components/schemas/GraphsRef"}},"type":"object","required":["Id","HasFinished","Graph"],"title":"GraphsInstanceGraph","description":"Reference schema for graph instantiations with graph info."},"GraphsRef":{"properties":{"Id":{"type":"integer","title":"Id"},"InstancesJobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instancesjobid"},"HasFinished":{"type":"boolean","title":"Hasfinished"}},"type":"object","required":["Id","HasFinished"],"title":"GraphsRef","description":"Reference schema for graphs."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Holidays":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the holiday effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the holiday effect"},"shared":{"type":"boolean","title":"Shared","description":"Should the effect be shared between the targets or should the effect be individual per targets.","default":false}},"type":"object","title":"Holidays","description":"Control the holidays."},"ImpactSize":{"properties":{"mean":{"type":"number","title":"Mean","description":"The mean impact of the variable","default":0.1},"std":{"type":"number","title":"Std","description":"Allowed Variation in the model","default":0.2},"type":{"$ref":"#/components/schemas/EffectType","description":"Effect.ImpactSize reads mean and std as the share of the KPI the group moves; Effect.ROISize, honoured on media and customer_experience only, as a return on investment","default":"Effect.ImpactSize"}},"type":"object","title":"ImpactSize","description":"How big impact will the varible group have on sales."},"InitValue":{"properties":{"variable":{"type":"string","title":"Variable","description":"variable name"},"value":{"$ref":"#/components/schemas/InitValues"}},"type":"object","required":["variable","value"],"title":"InitValue","description":"Define init values."},"InitValues":{"type":"string","enum":["random","min","max","mean","median","range10","range20","range30","range40","range60","range70","range80","range90"],"title":"InitValues","description":"Init value types."},"InterpStep":{"type":"string","enum":["ffill","bfill","linear","set_zero"],"title":"InterpStep","description":"One step of a variable's interpolation chain.\n\nAlso the ``InterpolationStep`` Postgres enum: the stored per-variable config\nis an ordered array of these, and the DuckDB fill engine dispatches on the\nsame values."},"InterpolateUploadBody":{"properties":{"data_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data Filters"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data."},"interpolation_overrides":{"anyOf":[{"items":{"$ref":"#/components/schemas/PreviewVariableInterpolation"},"type":"array"},{"type":"null"}],"title":"Interpolation Overrides","description":"Preview-only interpolation chains, applied to this request and never stored. Each row overrides the chain of one variable in one modelling combination; anything unlisted keeps its stored config. Rows are validated against the variables and combinations the entity carries, regardless of date — a variable with no data in the requested window is still a valid target, because the fill extrapolates into it."}},"type":"object","title":"InterpolateUploadBody","description":"Request body for interpolated upload _query endpoint."},"InterpolationPriority":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid"},"source_type":{"type":"string","enum":["upload","dataset"],"title":"Source Type"},"source_id":{"type":"integer","title":"Source Id","description":"Id of the upload or dataset, as passed in upload_ids/dataset_ids"}},"type":"object","required":["VariableIId","source_type","source_id"],"title":"InterpolationPriority","description":"Pin one variable's interpolation config to one source of the new dataset.\n\nOnly needed when two sources store *different* chains for the same\nvariable. Without an entry, declaration order decides: ``upload_ids``\nfirst (in order), then ``dataset_ids``."},"JobState":{"type":"string","enum":["pending","running","failed","saving_results","completed","processing_upload","submitted","stopped"],"title":"JobState","description":"Drun job states."},"LineageActivePeriod":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"},"by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"By"}},"type":"object","required":["start","end","by"],"title":"LineageActivePeriod","description":"A stretch of time during which an object was the active one."},"LineageBlocker":{"properties":{"key":{"type":"string","title":"Key"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["key","reason"],"title":"LineageBlocker","description":"An active object that a cascade delete would remove."},"LineageDeleteBlocked":{"properties":{"detail":{"$ref":"#/components/schemas/LineageDeletePreview"}},"type":"object","required":["detail"],"title":"LineageDeleteBlocked","description":"Body of a cascade delete refused because of active objects."},"LineageDeletePreview":{"properties":{"will_delete":{"items":{"type":"string"},"type":"array","title":"Will Delete"},"blockers":{"items":{"$ref":"#/components/schemas/LineageBlocker"},"type":"array","title":"Blockers"},"outside_nodes":{"items":{"$ref":"#/components/schemas/LineageNode"},"type":"array","title":"Outside Nodes"},"other_deleted":{"additionalProperties":{"type":"integer"},"type":"object","title":"Other Deleted"},"hidden_deleted":{"additionalProperties":{"type":"integer"},"type":"object","title":"Hidden Deleted"},"hidden_blockers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Hidden Blockers"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["will_delete","blockers","outside_nodes","other_deleted","hidden_deleted","hidden_blockers","truncated"],"title":"LineageDeletePreview","description":"What a cascade delete of the root would remove."},"LineageEdge":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"}},"type":"object","required":["source","target"],"title":"LineageEdge","description":"Parent to child link between two lineage nodes."},"LineageGraph":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/LineageNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/LineageEdge"},"type":"array","title":"Edges"},"truncated":{"type":"boolean","title":"Truncated"},"restricted":{"type":"boolean","title":"Restricted"}},"type":"object","required":["nodes","edges","truncated","restricted"],"title":"LineageGraph","description":"Upstream and downstream objects of a root object."},"LineageKind":{"type":"string","enum":["uploads","datasets","models","predictions","simulations","optimizations","response_curves","attributions","attribution_sets"],"title":"LineageKind","description":"Object kinds in the lineage graph."},"LineageNode":{"properties":{"key":{"type":"string","title":"Key"},"kind":{"$ref":"#/components/schemas/LineageKind"},"iid":{"type":"integer","title":"Iid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"selected":{"type":"boolean","title":"Selected"},"is_live":{"type":"boolean","title":"Is Live"},"is_root":{"type":"boolean","title":"Is Root"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"active_periods":{"items":{"$ref":"#/components/schemas/LineageActivePeriod"},"type":"array","title":"Active Periods"}},"type":"object","required":["key","kind","iid","name","created_at","selected","is_live","is_root","status"],"title":"LineageNode","description":"One object in a lineage graph."},"ListedModels":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active model for its market segment"},"Country":{"type":"string","title":"Country","description":"Country code from modelling combination (e.g., 'USA', 'GBR')"},"Region":{"type":"string","title":"Region","description":"Region code from modelling combination (e.g., 'all', 'northeast')"},"Grouping":{"type":"string","title":"Grouping","description":"Grouping code from modelling combination (e.g., 'all', 'retail')"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Model training completion timestamp"},"LiveModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodelid","description":"Internal id of the LiveModels row this model was materialized from; null for drun-trained models. Discriminator only - not an API path id."},"LiveModelIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodeliid","description":"Public IId of the source express model (valid in /live_models/{id} paths and builder deep links); populated on the detail endpoint only, null for drun-trained models."},"GraphInstanceId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Graphinstanceid","description":"Id of the graph instance the model was trained on; null for models materialized from an express model"},"GraphId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Graphid","description":"Id of the graph the model's graph instance was built from"}},"type":"object","required":["IId","DataSet","Status","Selected","Country","Region","Grouping","CreatedDate"],"title":"ListedModels","description":"Response schema for one row of the model list, with its graph lineage.\n\nKept off `Models` because the other routes returning that schema do not load\n`GraphInstance`, and its `lazy=\"raise\"` would fail them.","examples":[{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Grouping":"all","IId":1,"JobId":123,"Name":"USA All Model","Note":"Model for USA market","Region":"all","Selected":true,"Status":"completed"}]},"Macro":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the macro effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the macro effect"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Macro","description":"Control the macro variables."},"Media":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the media effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the media effect"},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days into the future do we expect a media investment to have an impact","default":120},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false},"net_profit_node":{"type":"boolean","title":"Net Profit Node","description":"Construct a `NetProfit` node i.e. Profit-investments. This will be shown in the dashboards etc. as a `Response`","default":false}},"type":"object","title":"Media","description":"Control the media."},"MergeIssue":{"properties":{"code":{"type":"string","enum":["media_multiple_metrics","media_inconsistent_dates"],"title":"Code"},"category":{"type":"string","const":"Media","title":"Category"},"group":{"additionalProperties":{"type":"string"},"type":"object","title":"Group","description":"The group's key columns"},"sources":{"items":{"$ref":"#/components/schemas/MergeIssueSource"},"type":"array","title":"Sources"}},"type":"object","required":["code","category","group","sources"],"title":"MergeIssue","description":"A merged group that breaks a dataset rule, with the sources behind it."},"MergeIssueSource":{"properties":{"upload_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Upload Id","description":"Upload IId"},"dataset_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dataset Id","description":"Source dataset IId"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The source's name when the issue was found"},"values":{"items":{"type":"string"},"type":"array","title":"Values","description":"Metrics (multiple metrics) or dates (inconsistent dates)"}},"type":"object","required":["values"],"title":"MergeIssueSource","description":"One source's share of a merge issue: the metrics or dates it contributes."},"MergeIssues":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/MergeIssue"},"type":"array","title":"Issues","default":[]},"truncated":{"type":"integer","title":"Truncated","description":"Issues beyond the listed ones","default":0}},"type":"object","title":"MergeIssues","description":"Merge issues, listed up to a cap; the groups beyond it are counted."},"MergeOrderBy":{"type":"string","enum":["insert_date","source_order"],"title":"MergeOrderBy","description":"What a dataset merge ranks duplicates by; the last one wins.\n\nAlso the ``MergeOrderBy`` Postgres enum. ``INSERT_DATE`` is the historical\nbehaviour; ``SOURCE_ORDER`` ranks by ``DataSetSource.Order``, so keeping the\nfirst declared source is a matter of declaring them the other way round."},"MissingUnitMetric":{"properties":{"UnitsSold":{"type":"string","title":"Unitssold"},"Product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"},"Metric":{"$ref":"#/components/schemas/SalesMetrics"}},"type":"object","required":["UnitsSold","Metric"],"title":"MissingUnitMetric","description":"A per-unit variable a derived optimization target needs and lacks."},"ModelActiveHistory":{"properties":{"Id":{"type":"integer","title":"Id"},"ModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Modelid"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"}},"type":"object","required":["Id","ModelId","UpdatedByUser","UpdatedAt","Country","Region","Grouping"],"title":"ModelActiveHistory","description":"Response schema for model active history records."},"ModelActiveHistoryEntry":{"properties":{"Id":{"type":"integer","title":"Id"},"IId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Iid"},"Action":{"$ref":"#/components/schemas/ActiveHistoryAction"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"}},"type":"object","required":["Id","IId","Action","UpdatedByUser","UpdatedAt","Country","Region","Grouping"],"title":"ModelActiveHistoryEntry","description":"A model activation/deactivation event with modelling-combination context."},"ModelAttribution":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","description":"Set predicted targets as data.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed. If omitted, the chained attribution inherits the parent job's seed."},"attribution_set":{"anyOf":[{"$ref":"#/components/schemas/AttributionRequestNoValidation"},{"type":"null"}],"description":"Auto-run attribution set after attribution finished."},"fit_attribution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fit Attribution","description":"Set attribution as fit attribution of the model.","default":true}},"type":"object","title":"ModelAttribution","description":"Model attribution request."},"ModelBuildMultipleRequest":{"properties":{"model_param":{"anyOf":[{"$ref":"#/components/schemas/ModelParams"},{"type":"null"}],"description":"The parameter for the model/models. Will use default values if it's empty.","default":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30}},"models_detail":{"$ref":"#/components/schemas/ModelsDetail","description":"Configuration for all models in the batch: dataset, training dates, and per-model settings (names, notes, modelling combinations). Each combination creates one model."},"graphs_detail":{"anyOf":[{"$ref":"#/components/schemas/GraphsDetail"},{"type":"null"}],"description":"Graph structure(s) defining variable relationships. Provide either graph objects directly, graph IDs to reference existing graphs, or graph_variables for auto-generation."},"add_prediction":{"type":"boolean","title":"Add Prediction","description":"If True, automatically creates a full prediction job after each model completes training. Useful for immediate model validation.","default":false},"add_priorposterior":{"anyOf":[{"$ref":"#/components/schemas/PriorPosterior-Input"},{"type":"null"}],"description":"If provided, automatically runs prior/posterior analysis after model completes. Compares learned parameters against prior distributions."},"add_attribution":{"anyOf":[{"$ref":"#/components/schemas/ModelAttribution"},{"type":"null"}],"description":"Auto-runs attribution analysis after model completes. Quantifies variable contributions to the target KPI."},"allow_no_sales":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow No Sales","description":"Allow submission without required dataset types (e.g., Sales). Set to True for models that don't require outcome data.","default":false},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible model training. If omitted, the server generates a random seed shared across all models in the batch."}},"type":"object","required":["models_detail"],"title":"ModelBuildMultipleRequest","description":"Request body for building multiple models in a single batch job.","examples":[{"add_attribution":{"fit_attribution":true,"name":"Auto Attribution","priority":30,"quantiles":[1,25,50,75,99],"samples":20},"add_prediction":true,"allow_no_sales":false,"graphs_detail":{"graph_ids":[1]},"model_param":{"epochs":500,"grad_clip":10,"learning_rate":0.01,"priority":30,"samples":2},"models_detail":{"activate":true,"dataset_id":1,"early_stopping":{"absolute_tolerance":0.1,"patience":100,"relative_tolerance":0.1},"modelling_combinations":[{"country_code":"USA","grouping":"all","region_code":"all"},{"country_code":"GBR","grouping":"all","region_code":"all"}],"names":["USA National Model","GBR National Model"],"notes":["USA market model","GBR market model"]}}]},"ModelBuildRequest":{"properties":{"model_param":{"anyOf":[{"$ref":"#/components/schemas/ModelParams"},{"type":"null"}],"description":"The parameter for the model/models. Will use default values if it's empty.","default":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30}},"model_detail":{"$ref":"#/components/schemas/ModelDetail","description":"Core model configuration: dataset reference, training/evaluation dates, modelling combination (filters), and metadata (name, note)."},"graph_detail":{"anyOf":[{"$ref":"#/components/schemas/GraphDetail"},{"type":"null"}],"description":"Graph structure defining variable relationships. Provide either a graph object directly, a graph_id to reference an existing graph, or graph_variables for auto-generation."},"add_prediction":{"type":"boolean","title":"Add Prediction","description":"If True, automatically creates a full prediction job after model completes training. Useful for immediate model validation.","default":false},"add_priorposterior":{"anyOf":[{"$ref":"#/components/schemas/PriorPosterior-Input"},{"type":"null"}],"description":"If provided, automatically runs prior/posterior analysis after model completes. Compares learned parameters against prior distributions."},"add_attribution":{"anyOf":[{"$ref":"#/components/schemas/ModelAttribution"},{"type":"null"}],"description":"Auto-runs attribution analysis after model completes. Quantifies variable contributions to the target KPI."},"allow_no_sales":{"type":"boolean","title":"Allow No Sales","description":"Allow submission without required dataset types (e.g., Sales). Set to True for models that don't require outcome data.","default":false},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible model training. If omitted, the server generates a random seed."}},"type":"object","required":["model_detail"],"title":"ModelBuildRequest","description":"Request body for building a single ML model.","examples":[{"add_attribution":{"fit_attribution":true,"name":"Fit Attribution","priority":30,"quantiles":[1,25,50,75,99],"samples":20},"add_prediction":true,"add_priorposterior":{"epochs":200,"grad_clip":3,"lr":0.01,"name":"Prior Posterior Analysis","priority":30,"samples":100,"sub_samples":3},"graph_detail":{"graph_id":1},"model_detail":{"activate":true,"dataset_id":1,"early_stopping":{"absolute_tolerance":0.1,"patience":100,"relative_tolerance":0.1},"modelling_combination":{"country_code":"USA","grouping":"all","region_code":"all"},"name":"USA National Marketing Mix Model","note":"Primary model for US market analysis"},"model_param":{"epochs":500,"grad_clip":10,"learning_rate":0.01,"priority":30,"samples":2}}]},"ModelDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"train_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Train Dates","description":"List of train dates."},"eval_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Eval Dates","description":"List of eval dates."},"activate":{"type":"boolean","title":"Activate","description":"Activate the model/dataset as soon as it is done training.","default":false},"early_stopping":{"anyOf":[{"$ref":"#/components/schemas/EarlyStopping"},{"type":"null"}],"description":"Early stopping configuration for the model training."},"modelling_combination":{"$ref":"#/components/schemas/ModellingCombinationBaseModel","description":"Modelling combination for the model."}},"type":"object","required":["modelling_combination"],"title":"ModelDetail","description":"schema  class of model detail."},"ModelParams":{"properties":{"epochs":{"type":"integer","title":"The epochs","description":"Maximum training iterations. Model may stop earlier if early_stopping is configured. Higher values allow more learning but risk overfitting. Default (500) works for most models.","default":500},"learning_rate":{"type":"number","title":"The learning rate","description":"Step size for gradient descent optimization. Lower values (0.001) give more stable but slower training. Higher values (0.1) train faster but may overshoot. Default (0.01) is a good starting point.","default":0.01},"samples":{"type":"integer","title":"The samples","description":"Number of posterior samples during training for Bayesian inference. Higher values improve uncertainty estimates but slow training. Default (2) balances speed and quality.","default":2},"grad_clip":{"type":"number","title":"The grad clip","description":"Maximum gradient magnitude to prevent exploding gradients. Lower values make training more stable but may slow convergence. Default (10) is suitable for most models.","default":10},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"Job queue priority from 1-100. Higher values are processed first. Model training is typically lower priority (30) since it's longer-running.","default":30}},"type":"object","title":"ModelParams","description":"Training hyperparameters and job settings for model building.","examples":[{"epochs":500,"grad_clip":10,"learning_rate":0.01,"priority":30,"samples":2}]},"ModelPerformace":{"properties":{"Variable":{"type":"string","title":"Variable"},"Stage":{"type":"string","title":"Stage"},"Metric":{"type":"string","title":"Metric"},"Value":{"type":"number","title":"Value"}},"type":"object","required":["Variable","Stage","Metric","Value"],"title":"ModelPerformace","description":"Model performance."},"ModelQualitySummary":{"properties":{"Status":{"$ref":"#/components/schemas/JobState"},"ModelPerformance":{"items":{"$ref":"#/components/schemas/ModelPerformace"},"type":"array","title":"Modelperformance"},"FitAttributionIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fitattributioniid"},"FitAttributionStatus":{"anyOf":[{"$ref":"#/components/schemas/JobState"},{"type":"null"}]},"GroupMetrics":{"items":{"$ref":"#/components/schemas/AttributionGroupMetric"},"type":"array","title":"Groupmetrics"},"VariableMetrics":{"items":{"$ref":"#/components/schemas/AttributionVariableMetric"},"type":"array","title":"Variablemetrics"},"GroupRoi":{"items":{"$ref":"#/components/schemas/AttributionGroupROIMetric"},"type":"array","title":"Grouproi"},"VariableRoi":{"items":{"$ref":"#/components/schemas/AttributionVariableROIMetric"},"type":"array","title":"Variableroi"}},"type":"object","required":["Status","ModelPerformance","GroupMetrics","VariableMetrics","GroupRoi","VariableRoi"],"title":"ModelQualitySummary","description":"Batched inputs for one model's quality verdict: status, performance, metrics.\n\nAssembled by GET /models/quality for many models in one round trip,\nreplacing what would otherwise be GET /models/{id} plus four attribution\nmetrics calls (group_metrics, variable_metrics, group_roi, variable_roi)\nrepeated per model."},"ModelRefitDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"train_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Train Dates","description":"List of train dates."},"eval_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Eval Dates","description":"List of eval dates."},"activate":{"type":"boolean","title":"Activate","description":"Activate the model/dataset as soon as it is done training.","default":false},"early_stopping":{"anyOf":[{"$ref":"#/components/schemas/EarlyStopping"},{"type":"null"}],"description":"Early stopping configuration for the model training."}},"type":"object","title":"ModelRefitDetail","description":"schemas class of model refit detail."},"ModelRefitRequest":{"properties":{"model_param":{"$ref":"#/components/schemas/ModelParams","description":"The parameter for the model/models. Will use default values if it's empty.","default":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30}},"model_detail":{"$ref":"#/components/schemas/ModelRefitDetail","description":"Refit configuration: new dataset reference, updated training dates, and metadata. Uses original model's graph structure and settings.","default":{"activate":false}},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible model training. If omitted, the server generates a random seed."}},"type":"object","title":"ModelRefitRequest","description":"Request body for refitting an existing model with new data or settings."},"ModellingCombinationBaseModel":{"properties":{"country_code":{"type":"string","title":"Country Code"},"region_code":{"type":"string","title":"Region Code"},"grouping":{"type":"string","title":"Grouping"}},"type":"object","required":["country_code","region_code","grouping"],"title":"ModellingCombinationBaseModel","description":"Schema for getting modelling combination (BaseModel)."},"ModellingCombinationForDataImport":{"properties":{"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"}},"type":"object","required":["Country","Region","Grouping"],"title":"ModellingCombinationForDataImport","description":"Schema for modelling combination for data import."},"Models":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active model for its market segment"},"Country":{"type":"string","title":"Country","description":"Country code from modelling combination (e.g., 'USA', 'GBR')"},"Region":{"type":"string","title":"Region","description":"Region code from modelling combination (e.g., 'all', 'northeast')"},"Grouping":{"type":"string","title":"Grouping","description":"Grouping code from modelling combination (e.g., 'all', 'retail')"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Model training completion timestamp"},"LiveModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodelid","description":"Internal id of the LiveModels row this model was materialized from; null for drun-trained models. Discriminator only - not an API path id."},"LiveModelIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodeliid","description":"Public IId of the source express model (valid in /live_models/{id} paths and builder deep links); populated on the detail endpoint only, null for drun-trained models."}},"type":"object","required":["IId","DataSet","Status","Selected","Country","Region","Grouping","CreatedDate"],"title":"Models","description":"Response schema for trained models listing and summary views.","examples":[{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Grouping":"all","IId":1,"JobId":123,"Name":"USA All Model","Note":"Model for USA market","Region":"all","Selected":true,"Status":"completed"}]},"ModelsDetail":{"properties":{"names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Names","description":"Name list for the model, the list needs to be the same length with modelling_combinations."},"notes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notes","description":"Description for the model/dataset"},"prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Prefixes","description":"Prefix for the name."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"train_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Train Dates","description":"List of train dates."},"eval_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Eval Dates","description":"List of eval dates."},"activate":{"type":"boolean","title":"Activate","description":"Activate the model/dataset as soon as it is done training.","default":false},"early_stopping":{"anyOf":[{"$ref":"#/components/schemas/EarlyStopping"},{"type":"null"}],"description":"Early stopping configuration for the model training."},"modelling_combinations":{"items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"},"type":"array","title":"Modelling Combinations","description":"Modelling combination list for the models."}},"type":"object","required":["modelling_combinations"],"title":"ModelsDetail","description":"schema  class of models detail."},"ModelsRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"}},"type":"object","required":["IId","Country","Region","Grouping","CreatedDate"],"title":"ModelsRef","description":"Reference schema for models."},"OptimizationAttributionAssociation":{"properties":{"Attribution":{"$ref":"#/components/schemas/AttributionRef"}},"type":"object","required":["Attribution"],"title":"OptimizationAttributionAssociation","description":"Reference schema for optimization attribution association."},"OptimizationAttributionInput":{"properties":{"id":{"type":"integer","title":"Id"},"job_type":{"type":"string","const":"optimization","title":"Job Type","default":"optimization"}},"type":"object","required":["id"],"title":"OptimizationAttributionInput","description":"Attribution job from optimization result."},"OptimizationBoundaryConstraint":{"properties":{"variable":{"type":"string","title":"Variable","description":"variable name"},"min":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Min","description":"Lower bound. One value per date step in the optimization window ('data_start_date' to 'data_end_date', or 'dates_subset' when given)."},"max":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Max","description":"Upper bound. One value per date step in the optimization window ('data_start_date' to 'data_end_date', or 'dates_subset' when given)."},"threshold_min":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Threshold Min","description":"Soft lower bound, only allowed together with 'min'. One value per date step in the optimization window ('data_start_date' to 'data_end_date', or 'dates_subset' when given)."},"threshold_max":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Threshold Max","description":"Soft upper bound, only allowed together with 'max'. One value per date step in the optimization window ('data_start_date' to 'data_end_date', or 'dates_subset' when given)."}},"type":"object","required":["variable"],"title":"OptimizationBoundaryConstraint","description":"Define boudary constraint for optimization."},"OptimizationJobs":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for optimization"},"Params":{"anyOf":[{},{"type":"null"}],"title":"Params","description":"Full optimization configuration parameters"},"TargetResult":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Targetresult","description":"Final objective value achieved by optimization"},"BaselineTarget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baselinetarget","description":"Target goal value (for goal-seek optimizations)"},"BaselineTargetResult":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baselinetargetresult","description":"Objective value at baseline (before optimization)"},"Improvement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Improvement","description":"Percent improvement: (Target - Baseline) / Baseline"}},"type":"object","required":["IId","DataSet","Status","Date","Model"],"title":"OptimizationJobs","description":"Response schema for optimization jobs listing and summary views.","examples":[{"BaselineTarget":100000.0,"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"Improvement":0.5,"JobId":456,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Budget Optimization","Note":"Optimizing marketing spend for Q4","Status":"completed","TargetResult":150000.0}]},"OptimizationJobsRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Status":{"$ref":"#/components/schemas/JobState"}},"type":"object","required":["IId","Status"],"title":"OptimizationJobsRef","description":"Reference schema for optimization job."},"OptimizationOp":{"type":"string","enum":["sum"],"title":"OptimizationOp","description":"Optimization Operators."},"OptimizationPost":{"properties":{"targets":{"$ref":"#/components/schemas/OptimizationTargets","description":"Optimization objective: what to maximize/minimize, target KPI variables, risk tolerance, and optional goal value. Use 'directions' to set per-node optimization direction."},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"Optional scenario variable modifications for baseline and scenario. Dict mapping scenario names to {variable, update} lists."},"reference_fill":{"anyOf":[{"$ref":"#/components/schemas/ReferenceFill"},{"type":"null"}],"description":"Fill each listed variable from a past reference window instead of sending its values. A variable that also appears in updated_values keeps its explicit values. The window must span the same number of periods as data_start_date..data_end_date."},"opt_nodes":{"items":{"type":"string"},"type":"array","title":"Opt Nodes","description":"Variable slugs that the optimizer can adjust. These are the 'levers' (e.g., media spend variables) that optimization will tune."},"boundary_constraint":{"anyOf":[{"items":{"$ref":"#/components/schemas/OptimizationBoundaryConstraint"},"type":"array"},{"type":"null"}],"title":"Boundary Constraint","description":"Per-variable min/max bounds constraining optimizer adjustments. Use threshold_min/threshold_max for soft constraints."},"equality_inequality_constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/EqualityInequalityConstraints"},"type":"array"},{"type":"null"}],"title":"Equality Inequality Constraints","description":"Cross-variable constraints (e.g., sum of budgets <= total). Supports <=, >=, == operators on variable aggregations."},"init_value":{"anyOf":[{"items":{"$ref":"#/components/schemas/InitValue"},"type":"array"},{"type":"null"}],"title":"Init Value","description":"Starting point strategy for each optimizable variable. Options include 'random', 'min', 'max', 'mean', 'median', or 'rangeN' percentiles."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":10},"epochs":{"type":"integer","title":"Epochs","description":"Number of optimization iterations.","default":1000},"lr":{"type":"number","title":"Lr","description":"Learning rate for gradient descent.","default":0.1},"lr_decay":{"type":"number","title":"Lr Decay","description":"Learning rate decay factor applied at lr_decay_step.","default":0.25},"lr_decay_step":{"type":"integer","title":"Lr Decay Step","description":"Epochs between learning rate decay applications.","default":250},"grad_clip":{"type":"number","title":"Grad Clip","description":"Gradient clipping threshold for training stability.","default":1},"data_start_date":{"type":"string","format":"date-time","title":"Data Start Date","description":"Start of the data range for optimization. ISO 8601 format, no timezone - see `DateRange`."},"data_end_date":{"type":"string","format":"date-time","title":"Data End Date","description":"End of the data range for optimization. ISO 8601 format, no timezone."},"dates_subset":{"anyOf":[{"$ref":"#/components/schemas/DateSelector"},{"type":"null"}],"description":"Optional subset of dates within the data range to optimize over. Use for excluding holidays or focusing on specific periods."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"return_best_loss":{"type":"boolean","title":"Return Best Loss","description":"If True, returns the solution with best loss even if constraints are slightly violated (within allowed percentage).","default":true},"best_loss_allowed_pct_violation":{"type":"number","title":"Best Loss Allowed Pct Violation","description":"Maximum allowed constraint violation percentage (0-1) when return_best_loss=True. 0.5 = 50% violation tolerance.","default":0.5},"attribution":{"anyOf":[{"$ref":"#/components/schemas/AttributionAfterJob"},{"type":"null"}],"description":"Auto-runs attribution analysis after optimization completes. Quantifies variable contributions to the optimized result."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"model_id":{"type":"integer","title":"Model Id","description":"IId of the trained model to use. Model must have Status=COMPLETED. Get available models from GET /models endpoint."},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"additional_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Config","description":"UI-specific configuration passed through to frontend display."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserOptimizePayload"},{"type":"null"}],"description":"A complete `optimize` result the browser already computed. Sent, the server materializes it through the same completion hook a worker result goes through instead of dispatching a job."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree. Required whenever `browser_result` is sent - unlike the other browser legs, an optimize op binds the seed, so a result that names no op could be saved against a seed no browser run ever used."}},"type":"object","required":["targets","opt_nodes","data_start_date","data_end_date","model_id"],"title":"OptimizationPost","description":"Request body for creating a budget/resource optimization job.","examples":[{"attribution":{"name":"Optimization Attribution","priority":30,"quantiles":[1,25,50,75,99],"samples":20},"best_loss_allowed_pct_violation":0.5,"boundary_constraint":[{"max":[50000,50000,50000],"min":[5000,5000,5000],"variable":"tv_spend"},{"max":[30000,30000,30000],"min":[2000,2000,2000],"variable":"digital_spend"}],"data_end_date":"2024-12-31T00:00:00","data_start_date":"2024-01-01T00:00:00","dataset_id":"active","epochs":1000,"equality_inequality_constraints":[{"constraint":{"op":"sum","variables":[{"variable":"tv_spend"},{"variable":"digital_spend"}]},"op":"<=","value":100000.0}],"grad_clip":1,"init_value":[{"value":"mean","variable":"tv_spend"},{"value":"mean","variable":"digital_spend"}],"lr":0.1,"lr_decay":0.25,"lr_decay_step":250,"model_id":1,"name":"Q4 Budget Optimization","note":"Optimize media allocation for maximum sales","opt_nodes":["tv_spend","digital_spend","print_spend"],"priority":30,"return_best_loss":true,"samples":10,"targets":{"directions":[{"op":"Maximize","variable":"sales_units"}],"maximize":true,"op":"sum","relative":false,"risk":0.5,"transform":"identity","variables":[{"variable":"sales_units"}]}}]},"OptimizationTargets":{"properties":{"goal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Goal"},"relative":{"type":"boolean","title":"Relative","default":false},"risk":{"type":"number","exclusiveMaximum":0.99,"exclusiveMinimum":0.01,"title":"Risk","default":0.5},"directions":{"items":{"$ref":"#/components/schemas/Direction"},"type":"array","title":"Directions","description":"Node directions"},"maximize":{"type":"boolean","title":"Maximize","description":"Whether to maximize or minimize the targets ","default":true},"variables":{"anyOf":[{"items":{"$ref":"#/components/schemas/Variable-Input"},"type":"array","minItems":1},{"type":"null"}],"title":"Variables","description":"The KPIs to optimize, as variable slugs from the model's result_variables. Required for the 'identity' transform; the 'revenue' and 'profit' transforms derive their own."},"op":{"anyOf":[{"$ref":"#/components/schemas/OptimizationOp"},{"type":"null"}],"description":"How the target 'variables' are aggregated. Only 'sum' is supported, which is also the default.","default":"sum"},"transform":{"type":"string","enum":["identity","revenue","profit"],"title":"Transform","default":"identity"},"include_pre_period":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Pre Period","description":"Count the dates before 'dates_subset' in the target. Unset uses the engine default: excluded for goal targets, included otherwise."},"include_post_period":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Post Period","description":"Count the dates after 'dates_subset' in the target, where the carry-over of the optimized media lands. Unset includes them."}},"type":"object","title":"OptimizationTargets","description":"Define targets for optimiztion."},"Page_AttributionSetActiveHistory_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AttributionSetActiveHistory"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[AttributionSetActiveHistory]"},"Page_AttributionSet_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AttributionSet"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[AttributionSet]"},"Page_Attribution_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Attribution"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[Attribution]"},"Page_DataImportVariables_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DataImportVariables"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[DataImportVariables]"},"Page_DataSetActiveHistory_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DataSetActiveHistory"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[DataSetActiveHistory]"},"Page_DataSet_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DataSet"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[DataSet]"},"Page_ExcelJobs_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExcelJobs"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ExcelJobs]"},"Page_FeatureImportance_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FeatureImportance"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[FeatureImportance]"},"Page_GraphsBasicJob_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GraphsBasicJob"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[GraphsBasicJob]"},"Page_Graphs_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Graphs"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[Graphs]"},"Page_ListedModels_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ListedModels"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ListedModels]"},"Page_ModelActiveHistory_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModelActiveHistory"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ModelActiveHistory]"},"Page_OptimizationJobs_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OptimizationJobs"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[OptimizationJobs]"},"Page_PredictionJobs_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PredictionJobs"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[PredictionJobs]"},"Page_PriorPosterior_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PriorPosterior-Output"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[PriorPosterior]"},"Page_ProjectDetail_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProjectDetail"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ProjectDetail]"},"Page_ResponseCurve_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ResponseCurve"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ResponseCurve]"},"Page_SimulationJobs_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SimulationJobs"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[SimulationJobs]"},"Page_Template_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Template"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[Template]"},"Page_Variable_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Variable-Output"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[Variable]"},"PatchAttribution":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchAttribution","description":"Schema for updating decomposition job.","examples":[{"Name":"Updated Attribution Name","Note":"Updated attribution description"}]},"PatchAttributionSet":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchAttributionSet","description":"schema for updatind attribution jobs.","examples":[{"Name":"Updated Attribution Set Name","Note":"Updated attribution set description"}]},"PatchDataSet":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchDataSet","description":"Schema for updating dataset attribute.","examples":[{"Name":"Updated Dataset Name","Note":"Updated description for the dataset"}]},"PatchDatasetVariableLimit":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit"},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit"}},"type":"object","required":["VariableIId","Country","Region","Grouping"],"title":"PatchDatasetVariableLimit","description":"One row of a dataset-level variable-limits PATCH.\n\nTargets a single ``(VariableIId, Country, Region, Grouping)`` in\n``VariableStats``. ``MinLimit`` / ``MaxLimit`` are each independently\noptional: missing means \"do not change\"; an explicit ``null`` clears.","examples":[{"Country":"SWE","Grouping":"all","MaxLimit":100000,"MinLimit":0,"Region":"all","VariableIId":1}]},"PatchDatasetVariableLimits":{"properties":{"limits":{"items":{"$ref":"#/components/schemas/PatchDatasetVariableLimit"},"type":"array","minItems":1,"title":"Limits"}},"type":"object","required":["limits"],"title":"PatchDatasetVariableLimits","description":"Bulk PATCH body for ``/datasets/{id}/variable_limits``.\n\nAll rows are validated up-front; the update is rejected as a whole on the\nfirst error so partial writes never happen."},"PatchModels":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchModels","description":"Schema for updating models attribute.","examples":[{"Name":"USA National Marketing Mix Model v2","Note":"Updated model with seasonal adjustments and improved fit"}]},"PatchOptimizationJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchOptimizationJobs","description":"Schema for updating optimization jobs.","examples":[{"Name":"Updated Optimization Job","Note":"Updated notes for this optimization"}]},"PatchPredictionJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchPredictionJobs","description":"Schema for updating prediction jobs.","examples":[{"Name":"Updated Prediction Name","Note":"Prediction job description updated"}]},"PatchPriorPosteriorJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchPriorPosteriorJobs","description":"Schema for updating response curve job.","examples":[{"Name":"Updated Prior Posterior Job","Note":"Updated notes for this prior posterior job"}]},"PatchResponseCurveJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchResponseCurveJobs","description":"Schema for updating response curve job.","examples":[{"Name":"Updated Response Curve","Note":"Updated notes for this response curve job"}]},"PatchSimulationJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchSimulationJobs","description":"Schema for updating simulation jobs.","examples":[{"Name":"Updated Simulation Name","Note":"Simulation job description updated"}]},"PatchTemplate":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"},"Graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"}},"type":"object","title":"PatchTemplate","description":"Schema for updating temptale.","examples":[{"graph":{"edges":[],"nodes":[]},"name":"Updated Template Name","note":"Updated template description"}]},"PatchVariable":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit","description":"Lower bound for this variable; `null` means unbounded. Must be finite. The DB enforces MinLimit < MaxLimit when both are set."},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit","description":"Upper bound for this variable; `null` means unbounded. Must be finite. The DB enforces MinLimit < MaxLimit when both are set."}},"type":"object","title":"PatchVariable","description":"Schema for updating variable.\n\nAny combination of fields may be supplied; only fields present in the request\nbody are applied. To clear a limit, send the field explicitly as `null`.","examples":[{"MaxLimit":100000,"MinLimit":0,"Name":"TV Advertising Spend"}]},"PatchVariableInterpolation":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"Steps":{"items":{"$ref":"#/components/schemas/InterpStep"},"type":"array","title":"Steps","description":"Ordered interpolation steps applied in order; the first one that can fill a gap wins. Empty means the variable is not interpolated."}},"type":"object","required":["VariableIId","Country","Region","Grouping","Steps"],"title":"PatchVariableInterpolation","description":"One row of an interpolation PATCH — a variable in one combination."},"PatchVariableInterpolations":{"properties":{"configs":{"items":{"$ref":"#/components/schemas/PatchVariableInterpolation"},"type":"array","minItems":1,"title":"Configs"}},"type":"object","required":["configs"],"title":"PatchVariableInterpolations","description":"Bulk PATCH body for the ``variable_interpolation`` endpoints.\n\nShared by data uploads and datasets. All rows are validated up-front; the\nupdate is rejected as a whole on the first error so partial writes never\nhappen."},"PatchVariableUtilOverride":{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":"object"},"type":"object","title":"PatchVariableUtilOverride","description":"Relabels for one variable Type: ``{Attribute: {OriginalValue: OverrideValue}}``.\n\nA null ``OverrideValue`` deletes that relabel. Example:\n``{\"Brand\": {\"b1\": \"b2\"}, \"Metric\": {\"m1\": \"Volume\"}}``."},"Periodicity":{"type":"string","enum":["MINUTE","HOUR","DAY","WEEK","MONTH","QUARTER","YEAR"],"title":"Periodicity","description":"Schema for periodicity."},"PosNegNeu":{"type":"string","enum":["positive","negative","neutral"],"title":"PosNegNeu","description":"Denote it is Positive, Negative or Neutral."},"PostVariableOverwrite":{"properties":{"VarIId":{"type":"integer","title":"Variid","description":"Variable IId."},"Country":{"type":"string","title":"Country","description":"Country code."},"Region":{"type":"string","title":"Region","description":"Region code."},"Grouping":{"type":"string","title":"Grouping","description":"Grouping code."},"Profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit","description":"Change Profit overwrite."},"Price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price","description":"Change Price overwrite."}},"type":"object","required":["VarIId","Country","Region","Grouping"],"title":"PostVariableOverwrite","description":"Schema for posting variable overwrite settings."},"PostVariableUtilOverride":{"properties":{"Type":{"$ref":"#/components/schemas/VariableTypes","description":"Variable type, e.g. 'Brand'."},"Attribute":{"type":"string","title":"Attribute","description":"util_attr column, e.g. 'Brand'."},"OriginalValue":{"type":"string","maxLength":255,"title":"Originalvalue","description":"Base (ingested) value to relabel."},"OverrideValue":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Overridevalue","description":"Display value; null deletes the relabel. Must not be blank, and is stored stripped of surrounding whitespace."}},"type":"object","required":["Type","Attribute","OriginalValue"],"title":"PostVariableUtilOverride","description":"One per-type util_attr relabel (a bulk-upsert item).\n\nWithin ``Type``, attribute ``Attribute``'s base value ``OriginalValue`` is\ndisplayed as ``OverrideValue``. A null ``OverrideValue`` deletes that relabel."},"PredictionAttribution":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","description":"Set predicted targets as data.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed. If omitted, the chained attribution inherits the parent job's seed."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"prediction_quantile":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Prediction Quantile","description":"Prediction quantile to run attribution.","default":50},"prediction_scenario":{"type":"string","title":"Prediction Scenario","description":"Prediction scenario to run attribution.","default":"Scenario"}},"type":"object","title":"PredictionAttribution","description":"Run attribution after prediction job."},"PredictionAttributionAssociation":{"properties":{"Attribution":{"$ref":"#/components/schemas/AttributionRef"},"Scenario":{"type":"string","title":"Scenario"},"Quantile":{"type":"number","title":"Quantile"}},"type":"object","required":["Attribution","Scenario","Quantile"],"title":"PredictionAttributionAssociation","description":"Reference schema for prediction attribution association."},"PredictionAttributionInput":{"properties":{"id":{"type":"integer","title":"Id"},"quantile":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Quantile"},"scenario":{"type":"string","title":"Scenario"},"job_type":{"type":"string","const":"prediction","title":"Job Type","default":"prediction"}},"type":"object","required":["id","quantile","scenario"],"title":"PredictionAttributionInput","description":"Attribution job from prediction result."},"PredictionDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Start of the forecast period. Use ISO 8601 format (e.g., '2024-01-01T00:00:00'). Required unless full_prediction=True. Must align with project periodicity."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"End of the forecast period. Use ISO 8601 format. Required unless full_prediction=True. Must be after start_date and align with periodicity."},"model_id":{"type":"integer","title":"Model Id","description":"IId of the trained model to use. Model must have Status=COMPLETED. Get available models from GET /models endpoint."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Dataset IId to use. Omit or pass 'active' for the project's active dataset. Dataset must be compatible with the model's variables."},"full_prediction":{"type":"boolean","title":"Full Prediction","description":"If True, creates a prediction covering the model's full training date range. Only one full prediction allowed per model. Ignores start_date and end_date when True.","default":false},"additional_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Config","description":"UI-specific configuration passed through to frontend display."}},"type":"object","required":["model_id"],"title":"PredictionDetail","description":"Configuration for a prediction job to forecast KPIs over a date range.","examples":[{"dataset_id":"active","end_date":"2024-12-31T00:00:00","full_prediction":false,"model_id":1,"name":"Q4 Sales Prediction","note":"Forecast sales based on planned media spend","start_date":"2024-01-01T00:00:00"}]},"PredictionJobs":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Forecast period start date"},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"Forecast period end date"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for this prediction"},"Fit":{"type":"boolean","title":"Fit","description":"Whether this is a fit prediction (ModelFitId is set)","readOnly":true},"Source":{"type":"string","enum":["manual","fit","optimization","simulation","prediction"],"title":"Source","description":"What produced this prediction: manual or fit","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Date","Model","Fit","Source"],"title":"PredictionJobs","description":"Response schema for prediction jobs listing and summary views.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","EndDate":"2024-12-31T00:00:00","Fit":false,"IId":1,"JobId":789,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Sales Prediction","Note":"Prediction for Q4 sales","StartDate":"2024-01-01T00:00:00","Status":"completed"}]},"PredictionJobsRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Date":{"type":"string","format":"date-time","title":"Date"},"Status":{"$ref":"#/components/schemas/JobState"}},"type":"object","required":["IId","Date","Status"],"title":"PredictionJobsRef","description":"Reference schema for prediction job."},"PredictionParams":{"properties":{"samples":{"type":"integer","title":"The samples","description":"Number of posterior samples to draw for uncertainty estimation. Higher values (e.g., 50-100) give smoother uncertainty bands but take longer. Default (20) is suitable for most use cases.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"Job queue priority from 1-100. Higher values are processed first. Use higher priority for time-sensitive predictions. Default (60) is standard priority.","default":60}},"type":"object","title":"PredictionParams","description":"Sampling and job parameters for prediction execution.","examples":[{"priority":60,"samples":20}]},"PredictionRequest":{"properties":{"model_param":{"anyOf":[{"$ref":"#/components/schemas/PredictionParams"},{"type":"null"}],"description":"Sampling parameters controlling uncertainty estimation. 'samples' determines posterior draws (more = better uncertainty, slower). 'priority' sets job queue priority (higher = processed sooner).","default":{"samples":20,"priority":60}},"prediction_detail":{"$ref":"#/components/schemas/PredictionDetail","description":"Core prediction configuration: model to use, forecast date range, and dataset reference. Required fields: model_id, start_date, end_date (unless full_prediction=True)."},"updated_values":{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"type":"object","title":"Updated Values","description":"Scenario variable modifications. Dict with scenario names as keys (e.g., 'Scenario'), each containing list of {variable, update}. Defaults to a single empty 'Scenario' (identical to baseline)."},"reference_fill":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ReferenceFill"},"type":"object"},{"type":"null"}],"title":"Reference Fill","description":"Fill listed variables from a past window instead of sending values, keyed like updated_values."},"quantiles":{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array","title":"Quantiles","description":"Uncertainty percentiles to compute (1-100). Output includes forecast values at each quantile. Common: [20, 40, 50, 60, 80] for median + ranges.","default":[20,40,50,60,80]},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserPredictMultiPayload"},{"type":"null"}],"description":"A `predict_multi` result computed in the browser against this express model's portable engine. When set on an express model, the prediction is materialized from this payload instead of dispatched as a job. Ignored for non-express models."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree, which is what makes 'the browser ran what the server asked for' a checked fact rather than a convention."},"target_nodes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Nodes","description":"Specific KPI variable slugs to forecast. If None, predicts all target nodes in the model graph. Use to reduce output size when only specific KPIs are needed."},"freeze_nodes":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Freeze Nodes","description":"Variables a scenario's changes must not move. A frozen variable keeps the value of the scenario-less base forecast, so the scenario's changes stop propagating at it. Dict mapping scenario names to lists of variable slugs. Advanced feature."},"attributions":{"items":{"$ref":"#/components/schemas/PredictionAttribution"},"type":"array","title":"Attributions","description":"Optional attribution jobs to auto-create after prediction completes. Use to analyze which input variables drove the forecast outcomes."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false}},"type":"object","required":["prediction_detail"],"title":"PredictionRequest","description":"Request body for creating a prediction job to forecast KPIs.","examples":[{"attributions":[{"name":"Prediction Attribution","prediction_quantile":50,"prediction_scenario":"Scenario","priority":30,"quantiles":[1,25,50,75,99],"samples":20}],"model_param":{"priority":60,"samples":20},"prediction_detail":{"dataset_id":"active","end_date":"2024-12-31T00:00:00","full_prediction":false,"model_id":1,"name":"Q4 Sales Prediction","note":"Forecast for Q4 with planned media spend","start_date":"2024-01-01T00:00:00"},"quantiles":[20,40,50,60,80],"updated_values":{"Scenario":[{"update":[["2024-01-01",15000],["2024-06-01",15000],["2024-12-01",15000]],"variable":"tv_spend"},{"update":[["2024-01-01",7500],["2024-06-01",7500],["2024-12-01",7500]],"variable":"digital_spend"}]}}]},"PreviewVariableInterpolation":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"Steps":{"items":{"$ref":"#/components/schemas/InterpStep"},"type":"array","minItems":1,"title":"Steps","description":"Ordered interpolation steps applied in order; the first one that can fill a gap wins. Empty means the variable is not interpolated."}},"type":"object","required":["VariableIId","Country","Region","Grouping","Steps"],"title":"PreviewVariableInterpolation","description":"One override row of an interpolation preview.\n\nNarrows :class:`PatchVariableInterpolation`: an override must name a chain,\nso the empty list that means \"do not interpolate\" when stored is rejected\nhere — an empty override would otherwise read as either \"turn it off\" or\n\"no override\", and only one of those can be true. Everything else (the id,\nthe combination triple, no-repeats, ``set_zero`` last) is inherited."},"Price":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the price effect","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the price effect"},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Price","description":"Control the price."},"PriorPosterior-Input":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"samples":{"type":"integer","title":"Samples","default":100},"epochs":{"type":"integer","title":"Epochs","default":200},"sub_samples":{"type":"integer","title":"Sub Samples","default":3},"lr":{"type":"number","title":"Lr","default":0.01},"grad_clip":{"type":"number","title":"The grad clip","description":"The value the gradient will be clipped during training to prevent exploding gradients.","default":3},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Zero"},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30}},"type":"object","title":"PriorPosterior","description":"Prior posterior request."},"PriorPosterior-Output":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for analysis"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"ReferencePointFallback":{"$ref":"#/components/schemas/ReferencePointFallback","description":"How to handle missing reference points: 'zero' or 'mean'"},"FitModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}],"description":"Reference model for fit comparison (if analyzing model fit)"}},"type":"object","required":["IId","DataSet","Status","Model","Date","ReferencePointFallback"],"title":"PriorPosterior","description":"Response schema for prior vs posterior distribution analysis jobs.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":101,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Prior Posterior Analysis","Note":"Comparing prior and posterior distributions","ReferencePointFallback":"Zero","Status":"completed"}]},"PriorPosteriorJobs":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["IId","JobId"],"title":"PriorPosteriorJobs","description":"Reference schema to prior posterior job."},"PriorPosteriorPost":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"samples":{"type":"integer","title":"Samples","default":100},"epochs":{"type":"integer","title":"Epochs","default":200},"sub_samples":{"type":"integer","title":"Sub Samples","default":3},"lr":{"type":"number","title":"Lr","default":0.01},"grad_clip":{"type":"number","title":"The grad clip","description":"The value the gradient will be clipped during training to prevent exploding gradients.","default":3},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Zero"},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"model_id":{"type":"integer","title":"Model Id","description":"The id of the model that should be used to do the response job with."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,99]},"fit_priorposterior":{"type":"boolean","title":"Fit Priorposterior","description":"Whether to set prior posterior job as fit or not.","default":false}},"type":"object","required":["model_id"],"title":"PriorPosteriorPost","description":"Prior posterior submit.","examples":[{"baseline":[{"baseline":1000.0,"variable":"base_sales"}],"dataset_id":"active","epochs":200,"fit_priorposterior":true,"grad_clip":3,"lr":0.01,"model_id":1,"name":"Prior Posterior Analysis","note":"Bayesian uncertainty analysis for model parameters","priority":30,"quantiles":[1,5,10,25,50,75,90,95,99],"referece_point_fallback":"Zero","samples":100,"sub_samples":3}]},"ProjectDetail":{"properties":{"Id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"periodicity":{"$ref":"#/components/schemas/Periodicity"},"currency_code":{"type":"string","title":"Currency Code"},"created_date":{"type":"string","format":"date-time","title":"Created Date"},"last_used_date":{"type":"string","format":"date-time","title":"Last Used Date"},"variables_data_version":{"type":"integer","title":"Variables Data Version","default":0},"activity_dashboard_mode":{"$ref":"#/components/schemas/ActivityDasboardMode"},"reference_point_source":{"$ref":"#/components/schemas/ReferencePointSource","description":"Project default for attribution reference points the caller does not supply: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin).","default":"DataMin"},"strict_limits":{"type":"boolean","title":"Strict Limits","description":"Whether limit violations refuse jobs instead of warning.","default":false},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["Id","name","slug","periodicity","currency_code","created_date","last_used_date","activity_dashboard_mode"],"title":"ProjectDetail","description":"Schema for a single project's own row -- no cross-table aggregates.\n\nDeliberately excludes every field on `Projects` below that's derived from\nother tables (ModellingCombinations, Variables, Models, MetricsCache):\nthose change through dozens of write paths across the app, so caching\nthem safely would mean invalidating from all of those places. This\nschema only has columns that change via `update_project`/`delete_project`,\nwhich makes it cheap to cache correctly (see `get_project`). Use\n`/projects/{team_id}/{project_id}/resources` for active dataset/model/\nattribution-set info, or `list_projects` for the cross-table metrics."},"ProjectResources":{"properties":{"DataImports":{"type":"integer","title":"Dataimports"},"DataSet":{"type":"integer","title":"Dataset"},"Models":{"type":"integer","title":"Models"},"SimulationJobs":{"type":"integer","title":"Simulationjobs"},"PredictionJobs":{"type":"integer","title":"Predictionjobs"},"Attribution":{"type":"integer","title":"Attribution"},"AttributionSet":{"type":"integer","title":"Attributionset"},"CompletedAttribution":{"anyOf":[{"$ref":"#/components/schemas/AttributionRef"},{"type":"null"}]},"ActiveDataSet":{"anyOf":[{"$ref":"#/components/schemas/DataSetRef"},{"type":"null"}]},"ActiveModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}]},"ActiveAttributionSet":{"anyOf":[{"$ref":"#/components/schemas/AttributionSetRef"},{"type":"null"}]},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"regions":{"items":{"type":"string"},"type":"array","title":"Regions"},"groupings":{"items":{"type":"string"},"type":"array","title":"Groupings"},"products":{"items":{"type":"string"},"type":"array","title":"Products"},"num_countries":{"type":"integer","title":"Num Countries","default":0},"num_regions":{"type":"integer","title":"Num Regions","default":0},"num_data_sources_uploaded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Data Sources Uploaded"},"num_model_combinations_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Model Combinations Built"},"num_model_combinations":{"type":"integer","title":"Num Model Combinations","default":0},"active_models":{"items":{"$ref":"#/components/schemas/ActiveModelMetrics"},"type":"array","title":"Active Models"},"latest_data_point_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Data Point Date"},"latest_upload_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Upload Date"},"latest_prediction_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Prediction Date"},"total_media_spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Media Spend"},"total_sales":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Sales"},"avg_brand_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Brand Value"},"latest_effect_roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Effect Roi"}},"type":"object","required":["DataImports","DataSet","Models","SimulationJobs","PredictionJobs","Attribution","AttributionSet"],"title":"ProjectResources","description":"Schema for project resources.\n\nAlso carries the cross-table aggregates that used to live on `get_project`\n(see `response.ProjectDetail`) -- they're cheap here since this endpoint\nalready pays for the eager-loaded `Projects` row and isn't cached."},"Projects":{"properties":{"Id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"periodicity":{"$ref":"#/components/schemas/Periodicity"},"currency_code":{"type":"string","title":"Currency Code"},"created_date":{"type":"string","format":"date-time","title":"Created Date"},"last_used_date":{"type":"string","format":"date-time","title":"Last Used Date"},"variables_data_version":{"type":"integer","title":"Variables Data Version","default":0},"activity_dashboard_mode":{"$ref":"#/components/schemas/ActivityDasboardMode"},"reference_point_source":{"$ref":"#/components/schemas/ReferencePointSource","description":"Project default for attribution reference points the caller does not supply: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin).","default":"DataMin"},"strict_limits":{"type":"boolean","title":"Strict Limits","description":"Whether limit violations refuse jobs instead of warning.","default":false},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"regions":{"items":{"type":"string"},"type":"array","title":"Regions"},"groupings":{"items":{"type":"string"},"type":"array","title":"Groupings"},"products":{"items":{"type":"string"},"type":"array","title":"Products"},"num_countries":{"type":"integer","title":"Num Countries","default":0},"num_regions":{"type":"integer","title":"Num Regions","default":0},"num_data_sources_uploaded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Data Sources Uploaded"},"num_model_combinations_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Model Combinations Built"},"num_model_combinations":{"type":"integer","title":"Num Model Combinations","default":0},"active_models":{"items":{"$ref":"#/components/schemas/ActiveModelMetrics"},"type":"array","title":"Active Models"},"active_dataset":{"anyOf":[{"$ref":"#/components/schemas/DataSetRef"},{"type":"null"}]},"latest_data_point_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Data Point Date"},"latest_upload_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Upload Date"},"latest_prediction_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Prediction Date"},"total_media_spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Media Spend"},"total_sales":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Sales"},"avg_brand_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Brand Value"},"latest_effect_roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Effect Roi"}},"type":"object","required":["Id","name","slug","periodicity","currency_code","created_date","last_used_date","activity_dashboard_mode"],"title":"Projects","description":"Schema for project response.","examples":[{"Id":1,"active_models":[{"country":"US","grouping":"all","quality_score":0.92,"region":"West","targets":3}],"activity_dashboard_mode":"ACTIVE","countries":["US","UK"],"created_date":"2024-01-15T10:30:00","currency_code":"USD","last_used_date":"2024-12-01T14:22:00","latest_effect_roi":1.45,"name":"Q4 Marketing Analysis","num_countries":2,"num_data_sources_uploaded":3,"periodicity":"WEEK","products":["ProductA","ProductB"],"regions":["West","East"],"slug":"q4-marketing-2024"}]},"ProjectsRequest":{"properties":{"name":{"type":"string","maxLength":30,"minLength":2,"title":"Name","description":"name attribute for project"},"periodicity":{"$ref":"#/components/schemas/Periodicity","description":"Periodicity for project, must be capital letter."},"currency_code":{"type":"string","maxLength":3,"minLength":3,"title":"Currency Code","description":"Currency code for project, must be capital letter and follow ISO 4217, check `/info/currencies`.","one_of":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VES","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWL"]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"slug for project"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional free-text note about the project."}},"type":"object","required":["name","periodicity","currency_code"],"title":"ProjectsRequest","description":"Schema for project request body.","examples":[{"currency_code":"USD","name":"Q4 Marketing Analysis","periodicity":"WEEK","slug":"q4-marketing-2024"}]},"ProjectsUpdate":{"properties":{"periodicity":{"anyOf":[{"$ref":"#/components/schemas/Periodicity"},{"type":"null"}],"description":"Periodicity for project, must be capital letter."},"currency_code":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency Code","description":"Currency code for project, must be capital letter and follow ISO 4217, check `/info/currencies`.","one_of":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VES","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWL"]},"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"name attribute for project"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"slug for project"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional free-text note about the project."},"activity_dashboard_mode":{"anyOf":[{"$ref":"#/components/schemas/ActivityDasboardMode"},{"type":"null"}],"description":"Default activity dashborad model"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings","description":"Custom UI settings"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Default source of attribution reference points the caller does not supply: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin)."},"strict_limits":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict Limits","description":"Refuse jobs whose dataset or inputs fall outside the variable limits. Off: such jobs run and return LimitWarnings."}},"type":"object","title":"ProjectsUpdate","description":"Schema for partial project updates.","examples":[{"activity_dashboard_mode":"ACTIVE","currency_code":"EUR","name":"Q4 Marketing Analysis Updated","periodicity":"MONTH","settings":{"theme":"dark","timezone":"UTC"},"slug":"q4-marketing-updated"}]},"QualityRuleSchema":{"properties":{"id":{"type":"string","minLength":1,"title":"Id"},"metric":{"oneOf":[{"$ref":"#/components/schemas/FitMetric"},{"$ref":"#/components/schemas/SanityMetric"}],"title":"Metric","discriminator":{"propertyName":"scope","mapping":{"fit":"#/components/schemas/FitMetric","sanity":"#/components/schemas/SanityMetric"}}},"op":{"$ref":"#/components/schemas/RuleOp"},"threshold":{"type":"number","title":"Threshold"},"enabled":{"type":"boolean","title":"Enabled","default":true},"onMissing":{"$ref":"#/components/schemas/RuleOnMissing","default":"ignore"},"target":{"oneOf":[{"$ref":"#/components/schemas/TargetGlobal"},{"$ref":"#/components/schemas/TargetKpiType"},{"$ref":"#/components/schemas/TargetResponse"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"global":"#/components/schemas/TargetGlobal","kpiType":"#/components/schemas/TargetKpiType","response":"#/components/schemas/TargetResponse"}}}},"type":"object","required":["id","metric","op","threshold","target"],"title":"QualityRuleSchema","description":"A single model quality check rule."},"QualityRulesRequest":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/QualityRuleSchema"},"type":"array","title":"Rules"}},"type":"object","required":["rules"],"title":"QualityRulesRequest","description":"Request body for PUT /projects/{...}/model-quality-rules."},"QualityRulesResponse":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/QualityRuleSchema"},"type":"array","title":"Rules"}},"type":"object","required":["rules"],"title":"QualityRulesResponse","description":"Response body for GET/PUT /projects/{...}/model-quality-rules."},"ReferenceFill":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date","description":"Start of the reference window. ISO 8601 format, no timezone."},"end_date":{"type":"string","format":"date-time","title":"End Date","description":"End of the reference window. Must cover the same number of periods as the job's own data range."},"variables":{"items":{"type":"string"},"type":"array","title":"Variables","description":"Variable slugs to fill from the reference window."}},"type":"object","required":["start_date","end_date","variables"],"title":"ReferenceFill","description":"A past window to fill `variables` from instead of sending their values.\n\nThe window must span the same number of periods as the job's own window,\non the project's periodicity grid. A slug that also carries explicit\nvalues keeps them — the fill skips what it finds."},"ReferencePointBaseline":{"properties":{"variable":{"type":"string","title":"Variable","description":"Variable slug."},"baseline":{"type":"number","title":"Baseline","description":"Set baseline."}},"type":"object","required":["variable","baseline"],"title":"ReferencePointBaseline","description":"Attribution job baseline."},"ReferencePointFallback":{"type":"string","enum":["Min","Max","Zero"],"title":"ReferencePointFallback","description":"Attribution's reference point fallback."},"ReferencePointSource":{"type":"string","enum":["DataMin","MinLimit"],"title":"ReferencePointSource","description":"Where an attribution takes a reference point the caller did not supply."},"ReferenceWindow":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date","description":"Start of the reference window. ISO 8601 format, no timezone."},"end_date":{"type":"string","format":"date-time","title":"End Date","description":"End of the reference window. ISO 8601 format, no timezone."}},"type":"object","required":["start_date","end_date"],"title":"ReferenceWindow","description":"A past window an override's values were taken or shaped from."},"ResponseCurve":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for analysis"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"}},"type":"object","required":["IId","DataSet","Status","Model","Date"],"title":"ResponseCurve","description":"Response schema for response curve analysis jobs.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":789,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Response Curve Analysis","Note":"Analyzing marketing spend response","Status":"completed"}]},"ResponseCurveDetailed":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for analysis"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"InputPoints":{"anyOf":[{"items":{"$ref":"#/components/schemas/_InputPoint"},"type":"array"},{"type":"null"}],"title":"Inputpoints","description":"Input variable ranges for response curve generation"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"}},"type":"object","required":["IId","DataSet","Status","Model","Date"],"title":"ResponseCurveDetailed","description":"Detailed response schema for response curve analysis with input points.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":789,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Response Curve Analysis","Note":"Analyzing marketing spend response","Status":"completed"}]},"ResponseCurveInput":{"properties":{"variable":{"type":"string","title":"Variable","description":"Variable slug."},"start_val":{"type":"number","title":"Start Val"},"end_val":{"type":"number","title":"End Val"},"steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Steps","default":10}},"type":"object","required":["variable","start_val","end_val"],"title":"ResponseCurveInput","description":"Settings for values the response curve shoule be calcualted for."},"ResponseCurvePost":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"curve_inputs":{"items":{"$ref":"#/components/schemas/ResponseCurveInput"},"type":"array","title":"Curve Inputs"},"model_id":{"type":"integer","title":"Model Id","description":"The id of the model that should be used to do the response job with."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":10},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[20,40,50,60,80]},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"browser_results":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/BrowserResponseCurvePayload"},"type":"object"},{"type":"null"}],"title":"Browser Results","description":"`response_curve` results computed in the browser against this express model's portable engine: one per entry in `curve_inputs`, keyed by that entry's `variable`. When set on an express model, the job is materialized from these payloads instead of dispatched as ops. Every curve is checked before any is written, and a submission missing one is refused whole - the job could otherwise never complete. Ignored for non-express models."},"browser_input_hashes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Browser Input Hashes","description":"The `input_hash` of each op `POST /live_models/{id}/op_spec` handed the browser (`ops[].input_hash`), keyed like `browser_results`. The server rebuilds every op this request describes and refuses the save (409) if any hash disagrees."}},"type":"object","required":["model_id"],"title":"ResponseCurvePost","description":"Response curve submit.","examples":[{"curve_inputs":[{"end_val":100000.0,"start_val":0.0,"steps":20,"variable":"tv_spend"},{"end_val":50000.0,"start_val":0.0,"steps":15,"variable":"digital_spend"}],"dataset_id":"active","end_date":"2024-12-31T00:00:00Z","model_id":1,"name":"TV Spend Response Curve","note":"Analyze diminishing returns on TV advertising","priority":30,"quantiles":[20,40,50,60,80],"samples":10,"start_date":"2024-01-01T00:00:00Z"}]},"ResultFiltersBody":{"properties":{"result_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Result Filters"},"output_format":{"type":"string","enum":["csv","parquet"],"title":"Output Format","default":"csv"}},"type":"object","title":"ResultFiltersBody","description":"Request body for _query POST endpoints that filter result data rows."},"RuleOnMissing":{"type":"string","enum":["ignore","fail","warn"],"title":"RuleOnMissing","description":"Behaviour when a rule's target metric is missing from a model run."},"RuleOp":{"type":"string","enum":["gte","lte"],"title":"RuleOp","description":"Comparison operator for a model quality rule threshold."},"SalesEconomics":{"properties":{"Products":{"items":{"$ref":"#/components/schemas/SalesProductEconomics"},"type":"array","title":"Products"},"Missing":{"additionalProperties":{"items":{"$ref":"#/components/schemas/MissingUnitMetric"},"type":"array"},"propertyNames":{"enum":["revenue","profit"]},"type":"object","title":"Missing","description":"Per derived optimization target, the per-unit variables it lacks. An empty list means the target can be derived; the optimization submit applies the same pairing."}},"type":"object","required":["Products","Missing"],"title":"SalesEconomics","description":"How a dataset's Sales variables pair up for revenue and profit."},"SalesMetrics":{"type":"string","enum":["PricePerUnit","UnitsSold","ProfitPerUnit","CostPerUnit"],"title":"SalesMetrics","description":"Sales metrics."},"SalesProductEconomics":{"properties":{"UnitsSold":{"type":"string","title":"Unitssold","description":"The product's UnitsSold variable slug."},"Product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product","description":"The raw Product facet."},"PricePerUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priceperunit","description":"Slug of the product's PricePerUnit, if any."},"CostPerUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Costperunit","description":"Slug of the product's CostPerUnit, if any."},"ProfitPerUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profitperunit","description":"Slug of the product's ProfitPerUnit, if any."}},"type":"object","required":["UnitsSold"],"title":"SalesProductEconomics","description":"A product's units sold and the per-unit variables that price it."},"SanityMetric":{"properties":{"scope":{"type":"string","const":"sanity","title":"Scope"},"kind":{"$ref":"#/components/schemas/SanityMetricKind"},"subject":{"oneOf":[{"$ref":"#/components/schemas/SanityVarGroupSubject"},{"$ref":"#/components/schemas/SanityVariableSubject"}],"title":"Subject","discriminator":{"propertyName":"kind","mapping":{"varGroup":"#/components/schemas/SanityVarGroupSubject","variable":"#/components/schemas/SanityVariableSubject"}}}},"type":"object","required":["scope","kind","subject"],"title":"SanityMetric","description":"Sanity-scope rule metric."},"SanityMetricKind":{"type":"string","enum":["share_of_effect","sum_effect","roi_effect","roi_revenue","roi_profit","cpx"],"title":"SanityMetricKind","description":"Sanity-check metric kinds (effect / ROI shape)."},"SanityVarGroupSubject":{"properties":{"kind":{"type":"string","const":"varGroup","title":"Kind"},"varGroup":{"$ref":"#/components/schemas/VariableGroups"},"filters":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Filters"}},"type":"object","required":["kind","varGroup"],"title":"SanityVarGroupSubject","description":"Sanity subject targeting a variable group."},"SanityVariableSubject":{"properties":{"kind":{"type":"string","const":"variable","title":"Kind"},"varSlug":{"type":"string","title":"Varslug"}},"type":"object","required":["kind","varSlug"],"title":"SanityVariableSubject","description":"Sanity subject targeting a single variable by slug."},"Season":{"properties":{"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the seasonal effect"},"shared":{"type":"boolean","title":"Shared","description":"Should the effect be shared between the targets or should the effect be individual per targets.","default":false},"multiplicative":{"type":"boolean","title":"Multiplicative","description":"Use a multiplicative season.","default":false}},"type":"object","title":"Season","description":"Control the season."},"SeedProjectRequest":{"properties":{"resource_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Resource Types","description":"Which optional result types to seed, from {simulation, prediction, optimization, response_curve, attribution, attribution_set}. Omit to seed all of them. The upload/dataset/model are always seeded regardless."}},"type":"object","title":"SeedProjectRequest","description":"Schema for POST /projects/{team_id}/{project_id}/seed request body."},"SimulationAttribution":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","description":"Set predicted targets as data.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed. If omitted, the chained attribution inherits the parent job's seed."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"simulation_scenario":{"type":"string","enum":["BaseScenario","Scenario"],"title":"Simulation Scenario","description":"Simulation scenario to run attribution.","default":"Scenario"},"simulation_quantile":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Simulation Quantile","description":"Simulation quantile to run attribution.","default":50}},"type":"object","title":"SimulationAttribution","description":"Run attribution after simulation job."},"SimulationAttributionAssociation":{"properties":{"Attribution":{"$ref":"#/components/schemas/AttributionRef"},"Scenario":{"type":"string","title":"Scenario"},"Quantile":{"type":"number","title":"Quantile"}},"type":"object","required":["Attribution","Scenario","Quantile"],"title":"SimulationAttributionAssociation","description":"Reference schema for simulation attribution association."},"SimulationAttributionInput":{"properties":{"id":{"type":"integer","title":"Id"},"quantile":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Quantile"},"scenario":{"type":"string","enum":["BaseScenario","Scenario"],"title":"Scenario"},"job_type":{"type":"string","const":"simulation","title":"Job Type","default":"simulation"}},"type":"object","required":["id","quantile","scenario"],"title":"SimulationAttributionInput","description":"Attribution job from simulation result."},"SimulationDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Start of the scenario comparison period. Use ISO 8601 format (e.g., '2024-01-01T00:00:00'). Must align with project periodicity."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"End of the scenario comparison period. Use ISO 8601 format. Must be after start_date and align with project periodicity."},"early_stopping":{"anyOf":[{"$ref":"#/components/schemas/EarlyStopping"},{"type":"null"}],"description":"Early stopping configuration to halt simulation if convergence criteria are met. Reduces computation time for stable simulations."},"model_id":{"type":"integer","title":"Model Id","description":"IId of the trained model to use. Model must have Status=COMPLETED. Get available models from GET /models endpoint."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Dataset IId to use. Omit or pass 'active' for the project's active dataset. Dataset must be compatible with the model's variables."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","description":"Uncertainty percentiles to compute (1-100). Higher values capture more uncertainty. Common: [20, 40, 50, 60, 80] for median + ranges. Legacy placement kept for compatibility: prefer the top-level 'quantiles' on the request, matching predictions and attributions.","default":[20,40,50,60,80]},"additional_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Config","description":"UI-specific configuration passed through to frontend display."}},"type":"object","required":["model_id"],"title":"SimulationDetail","description":"Configuration for a simulation job comparing baseline vs scenario forecasts.","examples":[{"dataset_id":"active","end_date":"2024-12-31T00:00:00","model_id":1,"name":"Q4 Sales Simulation","note":"Simulating media spend scenarios for Q4","quantiles":[20,40,50,60,80],"start_date":"2024-01-01T00:00:00"}]},"SimulationJobs":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for this simulation"},"ScenarioStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scenariostartdate","description":"Start date for scenario comparison period"},"ScenarioEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scenarioenddate","description":"End date for scenario comparison period"},"Source":{"type":"string","enum":["manual","fit","optimization","simulation","prediction"],"title":"Source","description":"What produced this simulation: manual or optimization","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Date","Model","Source"],"title":"SimulationJobs","description":"Response schema for simulation jobs listing and summary views.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":456,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Sales Simulation","Note":"Simulation for Q4 marketing scenarios","ScenarioEndDate":"2024-12-31T00:00:00","ScenarioStartDate":"2024-01-01T00:00:00","Status":"completed"}]},"SimulationJobsRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Date":{"type":"string","format":"date-time","title":"Date"},"Status":{"$ref":"#/components/schemas/JobState"},"IsFromOptimization":{"type":"boolean","title":"Isfromoptimization","description":"Whether this simulation was submitted by an optimization job.","readOnly":true}},"type":"object","required":["IId","Date","Status","IsFromOptimization"],"title":"SimulationJobsRef","description":"Reference schema for simulation Job."},"SimulationParams":{"properties":{"samples":{"type":"integer","title":"The samples","description":"Number of posterior samples to draw for uncertainty estimation. Higher values (e.g., 50-100) give smoother uncertainty bands but take longer. Default (20) is suitable for most use cases.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"Job queue priority from 1-100. Higher values are processed first. Use higher priority for time-sensitive simulations. Default (60) is standard priority.","default":60}},"type":"object","title":"SimulationParams","description":"Sampling and job parameters for simulation execution.","examples":[{"priority":60,"samples":20}]},"SimulationRequest":{"properties":{"model_param":{"anyOf":[{"$ref":"#/components/schemas/SimulationParams"},{"type":"null"}],"description":"Sampling parameters controlling uncertainty estimation. 'samples' determines posterior draws (more = better uncertainty, slower). 'priority' sets job queue priority (higher = processed sooner).","default":{"samples":20,"priority":60}},"simulation_detail":{"$ref":"#/components/schemas/SimulationDetail","description":"Core simulation configuration: model to use, date range for comparison, and dataset reference. Required fields: model_id. For custom date ranges, provide start_date and end_date."},"updated_values":{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"enum":["BaseScenario","Scenario"]},"type":"object","title":"Updated Values","description":"Variable modifications for scenario comparison. Dict with keys 'BaseScenario' and 'Scenario', each containing list of {variable, update} objects. 'update' is a list of values matching the date range length."},"reference_fill":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ReferenceFill"},"propertyNames":{"enum":["BaseScenario","Scenario"]},"type":"object"},{"type":"null"}],"title":"Reference Fill","description":"Fill listed variables from a past window instead of sending values, keyed like updated_values."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","description":"Uncertainty percentiles to compute (1-100). Common: [20, 40, 50, 60, 80] for median + ranges. Also accepted at 'simulation_detail.quantiles' (legacy placement); this field wins if both are set.","default":[20,40,50,60,80]},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserPredictMultiPayload"},{"type":"null"}],"description":"A `predict_multi` result computed in the browser against this express model's portable engine, over the same two scenarios. When set on an express model, the simulation is materialized from this payload instead of dispatched as a job. Ignored for non-express models."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree. The op orders the scenarios `BaseScenario` then `Scenario`, so a spec asked for in the other order binds a different hash."},"attributions":{"items":{"$ref":"#/components/schemas/SimulationAttribution"},"type":"array","title":"Attributions","description":"Optional attribution jobs to auto-create after simulation completes. Use to analyze which variables drove the scenario differences."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false}},"type":"object","required":["simulation_detail","updated_values"],"title":"SimulationRequest","description":"Request body for creating a simulation job to compare scenarios.","examples":[{"attributions":[{"name":"Scenario Attribution","priority":30,"quantiles":[1,25,50,75,99],"samples":20,"simulation_quantile":50,"simulation_scenario":"Scenario"}],"model_param":{"priority":60,"samples":20},"quantiles":[20,40,50,60,80],"simulation_detail":{"dataset_id":"active","end_date":"2024-12-31T00:00:00","model_id":1,"name":"Q4 Media Spend Simulation","note":"Comparing baseline vs increased media spend","start_date":"2024-01-01T00:00:00"},"updated_values":{"BaseScenario":[{"update":[["2024-01-01T00:00:00",10000],["2024-02-01T00:00:00",10000],["2024-03-01T00:00:00",10000]],"variable":"tv_spend"},{"update":[["2024-01-01T00:00:00",5000],["2024-02-01T00:00:00",5000],["2024-03-01T00:00:00",5000]],"variable":"digital_spend"}],"Scenario":[{"update":[["2024-01-01T00:00:00",15000],["2024-02-01T00:00:00",15000],["2024-03-01T00:00:00",15000]],"variable":"tv_spend"},{"update":[["2024-01-01T00:00:00",7500],["2024-02-01T00:00:00",7500],["2024-03-01T00:00:00",7500]],"variable":"digital_spend"}]}}]},"SimulationUpdateVariable":{"properties":{"Variable":{"$ref":"#/components/schemas/VariableRef"},"Date":{"type":"string","format":"date-time","title":"Date"},"Value":{"type":"number","title":"Value"},"Source":{"$ref":"#/components/schemas/UpdateSource","description":"Where this value came from: 'manual' when the caller sent it, 'reference_fill' when the server filled it from a reference window, 'reference_pattern' when the caller sent it shaped from one.","default":"manual"},"ReferenceStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Referencestartdate","description":"Start of the reference window, when there is one."},"ReferenceEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Referenceenddate","description":"End of the reference window, when there is one."},"IsScenario":{"type":"boolean","title":"Isscenario"}},"type":"object","required":["Variable","Date","Value","IsScenario"],"title":"SimulationUpdateVariable","description":"Updated variables for simulation jobs."},"Stage":{"type":"string","enum":["train","eval"],"title":"Stage","description":"Stage at which a fit metric is evaluated."},"TableFormat":{"type":"string","enum":["wide","long"],"title":"TableFormat","description":"Table format enum."},"Target":{"properties":{"targets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Targets","description":"The targets to model."},"revenue_nodes":{"type":"boolean","title":"Revenue Nodes","description":"For sales KPI's add individual revenue nodes as well as a total revenue node, these nodes will be possible to see in the dashboards etc.","default":false},"profit_nodes":{"type":"boolean","title":"Profit Nodes","description":"For sales KPI's add individual profit nodes as well as a total profit node, these nodes will be possible to see in the dashboards etc.","default":false}},"type":"object","title":"Target","description":"Config for controlling the targets."},"TargetGlobal":{"properties":{"kind":{"type":"string","const":"global","title":"Kind"}},"type":"object","required":["kind"],"title":"TargetGlobal","description":"Rule applies globally across all responses."},"TargetKpiType":{"properties":{"kind":{"type":"string","const":"kpiType","title":"Kind"},"varGroup":{"$ref":"#/components/schemas/VariableGroups"}},"type":"object","required":["kind","varGroup"],"title":"TargetKpiType","description":"Rule applies to responses with a given KPI variable group."},"TargetResponse":{"properties":{"kind":{"type":"string","const":"response","title":"Kind"},"responseSlug":{"type":"string","title":"Responseslug"}},"type":"object","required":["kind","responseSlug"],"title":"TargetResponse","description":"Rule applies to a single response variable."},"Task":{"properties":{"Error":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Error"},"Id":{"type":"integer","title":"Id"},"Config":{"additionalProperties":true,"type":"object","title":"Config"},"Topic":{"$ref":"#/components/schemas/TaskTopics"},"Status":{"$ref":"#/components/schemas/TaskState"}},"type":"object","required":["Id","Config","Topic","Status"],"title":"Task","description":"Reference task."},"TaskState":{"type":"string","enum":["submitted","preparing_sources","running","failed","complete"],"title":"TaskState","description":"Comnav internal task states."},"TaskTopics":{"type":"string","enum":["ATTRIBUTIONSET","ATTRIBUTIONJOB","SIMULATIONJOB","PREDICTIONJOB","TRAINJOB","DATASET","DATAUPLOAD","GRAPHCONSTRUCT","GENERAL","OPTIMIZATIONJOB","RESPOSNSECURVEJOB","PRIORPOSTERIORJOB","EXCELJOB","GRAPHBASIC","FEATUREIMPORTANCE","GRAPHSYNERGY","LIVEMODELOP","LIVEMODELFIT","DATASETCHECK"],"title":"TaskTopics","description":"Task topics."},"Template":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Id":{"type":"integer","title":"Id"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"},"Graph":{"additionalProperties":true,"type":"object","title":"Graph"}},"type":"object","required":["Id","CreatedDate","Graph"],"title":"Template","description":"Template response.","examples":[{"CreatedDate":"2024-01-15T10:30:00","CreatorId":"user-123","Graph":{"edges":[{"arguments":["positive"],"source":"media","target":"sales"}],"nodes":[{"id":"sales","key":"File:Sales","type":"Node.Data"},{"id":"media","key":"File:Media","type":"Node.Data"}]},"Id":1,"Name":"Marketing Mix Model Template","Note":"Template for standard marketing mix analysis"}]},"Trend":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the trend effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the trend effect"}},"type":"object","title":"Trend","description":"Control the trend."},"UpdateSource":{"type":"string","enum":["manual","reference_fill","reference_pattern"],"title":"UpdateSource","description":"Where an override's values came from."},"UpdateValue":{"prefixItems":[{"type":"string","format":"date-time","title":"Date"},{"type":"number","title":"Value"}],"type":"array","maxItems":2,"minItems":2},"UpdateVariable":{"properties":{"Variable":{"$ref":"#/components/schemas/VariableRef"},"Date":{"type":"string","format":"date-time","title":"Date"},"Value":{"type":"number","title":"Value"},"Source":{"$ref":"#/components/schemas/UpdateSource","description":"Where this value came from: 'manual' when the caller sent it, 'reference_fill' when the server filled it from a reference window, 'reference_pattern' when the caller sent it shaped from one.","default":"manual"},"ReferenceStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Referencestartdate","description":"Start of the reference window, when there is one."},"ReferenceEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Referenceenddate","description":"End of the reference window, when there is one."}},"type":"object","required":["Variable","Date","Value"],"title":"UpdateVariable","description":"Updated variables."},"UpdatedVariable":{"properties":{"variable":{"type":"string","title":"Variable"},"update":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpdateValue"},"type":"array"},{"type":"null"}],"title":"Update"},"reference":{"anyOf":[{"$ref":"#/components/schemas/ReferenceWindow"},{"type":"null"}],"description":"The past window these values were shaped from, when they were. Recorded on the job as source 'reference_pattern'; the values are used exactly as sent. Values the server fills through 'reference_fill' are recorded as 'reference_fill' on their own."}},"type":"object","required":["variable","update"],"title":"UpdatedVariable","description":"Schema for schenario updated variabls values."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Variable-Input":{"properties":{"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"$ref":"#/components/schemas/DateRange-Input"},{"type":"null"}],"title":"Dates","description":"Select all dates by set to None, select specific dates, or select range"},"variable":{"type":"string","title":"Variable","description":"Variable slug, as listed by the model's variable endpoints. Includes the KPIs a model introduces itself, which have no dataset variable behind them."}},"type":"object","required":["variable"],"title":"Variable","description":"Select Variable."},"Variable-Output":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Variable identifier"},"Slug":{"type":"string","title":"Slug","description":"Unique variable key in format 'source-type-attributes'"},"Name":{"type":"string","title":"Name","description":"Human-readable display name"},"Type":{"$ref":"#/components/schemas/VariableTypes","description":"Variable category: Sales, Media, Macro, Price, etc."},"Group":{"$ref":"#/components/schemas/VariableGroups","description":"Functional grouping: KPI, Input, Volume, etc."},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit","description":"Project-level lower bound for this variable. Used as the attribution reference point and as a hard lower bound on user-supplied values in simulation/prediction/optimization/response-curve/attribution-baseline inputs. NULL means no enforced lower bound."},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit","description":"Project-level upper bound for this variable. Hard upper bound on user-supplied values in simulation/prediction/optimization/response-curve/attribution-baseline inputs. NULL means no enforced upper bound."},"util_attr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}],"description":"Raw ingested variable attributes (Product, Media, Campaign, etc.), untouched by any VariableUtilOverrides relabel."},"util_attr_relabeled":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}],"description":"``util_attr`` with per-Type display relabels applied. Identical to ``util_attr`` when this variable has no active VariableUtilOverrides customization."}},"type":"object","required":["IId","Slug","Name","Type","Group"],"title":"Variable","description":"Response schema for variable metadata.","examples":[{"Group":"Sales","IId":1,"Name":"Health Units Sold","Slug":"file-sales-product-health-metric-units_sold","Type":"Sales","util_attr":{"Metric":"UnitsSold","Product":"Health"},"util_attr_relabeled":{"Metric":"UnitsSold","Product":"Health"}}]},"VariableDataBody":{"properties":{"data_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data Filters"},"dataset_names":{"anyOf":[{"items":{"$ref":"#/components/schemas/Dataset"},"type":"array"},{"type":"null"}],"title":"Dataset Names"}},"type":"object","title":"VariableDataBody","description":"Request body for variable data _query endpoints."},"VariableGroups":{"type":"string","enum":["Brand","CompetitorBrand","Distribution","CompetitorDistribution","Events","Macro","Media","CustomerExperience","CompetitorMedia","Sales","CompetitorPrice","Visits","Weather","Extra","Model","Price","Profit","Cost","Data","KPI","Season","Trend","Connect","Experimental","Advanced","Math","Customer_experience","Competitor_price","Competitor_media","Competitor_brand","Competitor_distribution","Event","Holiday","Base","Revenue","Dates"],"title":"VariableGroups","description":"Vraible groups."},"VariableHidePlanInput":{"properties":{"VarIId":{"type":"integer","title":"Variid"},"Slug":{"type":"string","title":"Slug"}},"type":"object","required":["VarIId","Slug"],"title":"VariableHidePlanInput","description":"Schema for a variable hidden from plan (predict/simulate/optimize) input."},"VariableInterpolation":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid","description":"Variable IId within the project"},"Slug":{"type":"string","title":"Slug","description":"Variable slug"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"Steps":{"items":{"$ref":"#/components/schemas/InterpStep"},"type":"array","title":"Steps","description":"Ordered interpolation steps; empty means no interpolation"}},"type":"object","required":["VariableIId","Slug","Country","Region","Grouping","Steps"],"title":"VariableInterpolation","description":"An interpolation chain for one variable in one modelling combination.\n\nShared by data uploads and datasets — both store the chain per\n(variable, combination)."},"VariableOverwrite":{"properties":{"VarIId":{"type":"integer","title":"Variid"},"Slug":{"type":"string","title":"Slug"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"Profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profit"},"Price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"}},"type":"object","required":["VarIId","Slug","Country","Region","Grouping"],"title":"VariableOverwrite","description":"Schema for variable overwrite."},"VariableRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"Name":{"type":"string","title":"Name"},"Slug":{"type":"string","title":"Slug"},"Type":{"$ref":"#/components/schemas/VariableTypes"},"Group":{"$ref":"#/components/schemas/VariableGroups"}},"type":"object","required":["IId","Name","Slug","Type","Group"],"title":"VariableRef","description":"Variable reference."},"VariableTypes":{"type":"string","enum":["Brand","CompetitorBrand","Distribution","CompetitorDistribution","Events","Macro","Media","CustomerExperience","CompetitorMedia","Sales","CompetitorPrice","Visits","Weather","Extra","Model"],"title":"VariableTypes","description":"Variable types."},"VariableUtilOverride":{"properties":{"Type":{"$ref":"#/components/schemas/VariableTypes"},"Attribute":{"type":"string","title":"Attribute"},"OriginalValue":{"type":"string","title":"Originalvalue"},"OverrideValue":{"type":"string","title":"Overridevalue"}},"type":"object","required":["Type","Attribute","OriginalValue","OverrideValue"],"title":"VariableUtilOverride","description":"A per-type util_attr relabel.\n\nWithin variable ``Type``, attribute ``Attribute``'s base value\n``OriginalValue`` is displayed as ``OverrideValue`` for every variable of\nthat Type sharing the base value."},"Visits":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the visits effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the visits effect"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Visits","description":"Control the visits variables."},"Weather":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the weather effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the weather effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Weather","description":"Control the weather variables."},"_DetailedPredictionScenarios":{"properties":{"Name":{"type":"string","title":"Name"},"UpdateVariable":{"items":{"$ref":"#/components/schemas/UpdateVariable"},"type":"array","title":"Updatevariable"}},"type":"object","required":["Name","UpdateVariable"],"title":"_DetailedPredictionScenarios"},"_Indicator":{"properties":{"Indicator":{"type":"string","title":"Indicator"},"StartDate":{"type":"string","format":"date-time","title":"Startdate"},"EndDate":{"type":"string","format":"date-time","title":"Enddate"}},"type":"object","required":["Indicator","StartDate","EndDate"],"title":"_Indicator"},"_InputPoint":{"properties":{"Variable":{"$ref":"#/components/schemas/_Variable"},"StartVal":{"type":"number","title":"Startval"},"EndVal":{"type":"number","title":"Endval"},"Steps":{"type":"integer","title":"Steps"}},"type":"object","required":["Variable","StartVal","EndVal","Steps"],"title":"_InputPoint"},"_UtilAttr":{"properties":{"Product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"},"Media":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media"},"Campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"},"Metric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metric"},"Competitor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competitor"},"Event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"},"Channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"Brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"Indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indicator"},"Variable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable"},"Format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"Device":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device"},"TargetGroup":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetgroup"},"Creative":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creative"},"Category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","title":"_UtilAttr"},"_Variable":{"properties":{"Slug":{"type":"string","title":"Slug"}},"type":"object","required":["Slug"],"title":"_Variable"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"security":[{"HTTPBearer":[]}]}