{"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.devcon7.rour.my.id/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.devcon7.rour.my.id/v1"}],"paths":{"/api/projects/{team_id}/{project_id}/modelling_combinations/trained":{"get":{"summary":"Get Trained Combinations","description":"Get list of all combinations from Models.","operationId":"get_trained_combinations_projects__team_id___project_id__modelling_combinations_trained_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModellingCombinationForDataImport"},"title":"Response Get Trained Combinations Projects  Team Id   Project Id  Modelling Combinations Trained Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{team_id}":{"get":{"summary":"Job Info","description":"Get general jobs info.","operationId":"job_info_jobs__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":"job_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer"},"title":"Job Ids"}},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":50,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{team_id}/logs":{"get":{"summary":"Job Logs","description":"Get general job logs.","operationId":"job_logs_jobs__team_id__logs_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"jobid","in":"query","required":true,"schema":{"type":"integer","title":"Jobid"}},{"name":"log_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LogTypes","default":"stderr"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{team_id}/progress":{"get":{"summary":"Job Progress","description":"Get progress on multiple jobs.","operationId":"job_progress_jobs__team_id__progress_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"job_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer"},"title":"Job Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/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/graph/node_types":{"get":{"summary":"Get Graph Node Types","description":"Get available graph node types.","operationId":"get_graph_node_types_info_graph_node_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/info/graph/node_args":{"get":{"summary":"Get Graph Node Args","description":"Get available graph node_args.","operationId":"get_graph_node_args_info_graph_node_args_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/info/graph/template":{"post":{"summary":"Get Graph Template","description":"Get graph template.","operationId":"get_graph_template_info_graph_template_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostGraphTemplate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/info/graph/validate":{"post":{"summary":"Validate Graph","description":"Validate a graph.","operationId":"validate_graph_info_graph_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Graph"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/graph_instances/{team_id}/{instance_id}":{"get":{"summary":"Get Graph Instance","description":"Get graph from GraphInstantiations by instance id.","operationId":"get_graph_instance_graph_instances__team_id___instance_id__get","parameters":[{"name":"instance_id","in":"path","required":true,"schema":{"type":"integer","title":"Instance Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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/country_holidays":{"get":{"summary":"Get Country Holidays","description":"Get list of country and its holidays.","operationId":"get_country_holidays_info_country_holidays_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Projects_"}}}},"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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"}}}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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)."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/distinct_attr":{"post":{"tags":["Projects"],"summary":"Get Distinct Attiribute Of Datasets","description":"Get distinct column value.","operationId":"get_distinct_attiribute_of_datasets_projects__team_id___project_id__distinct_attr_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":"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectAttributeColumns"}}}},"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}/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/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"}],"title":"Name"}},{"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"}],"title":"Prefix"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\nEvery row carries the upload's ``MinDate`` / ``MaxDate``; pass\n``with_variable_ids`` for the ids of the variables it holds. Both come from\nthe config rows written at ingest, so neither re-reads the data table.\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":"with_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variable Ids"}},{"name":"with_combs","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Combs"}},{"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/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"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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_data":{"get":{"tags":["Data Uploads"],"summary":"Datauploads Variable Csv","description":"Download a dataimport per variable format as csv.","operationId":"datauploads_variable_csv_projects__team_id___project_id__datauploads__item_id__variable_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":"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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_data_query":{"post":{"tags":["Data Uploads"],"summary":"Datauploads Variable Csv Query","description":"Download dataimport variable data — POST variant for large filter payloads.","operationId":"datauploads_variable_csv_query_projects__team_id___project_id__datauploads__item_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":"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataFiltersBody"}}}},"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":true,"schema":{"type":"string","format":"date-time","description":"Start date for extrapolated data. This parameter is only for extrapolation not to limit the data. To filter the data please pass it into data_filter","title":"Start Date"},"description":"Start date for extrapolated data. This parameter is only for extrapolation not to limit the data. To filter the data please pass it into data_filter"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End date for extrapolated data This parameter is only for extrapolation not to limit the data. To filter the data please pass it into data_filter","title":"End Date"},"description":"End date for extrapolated data This parameter is only for extrapolation not to limit the data. To filter the data please pass it into data_filter"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/variables":{"get":{"tags":["Data Uploads"],"summary":"Datauploads Variables","description":"Get list of dataimport variables.","operationId":"datauploads_variables_projects__team_id___project_id__datauploads__item_id__variables_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Datauploads Variables Projects  Team Id   Project Id  Datauploads  Item Id  Variables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/{item_id}/variables_query":{"post":{"tags":["Data Uploads"],"summary":"Datauploads Variables Query","description":"Get dataimport variables — POST variant for large filter payloads.","operationId":"datauploads_variables_query_projects__team_id___project_id__datauploads__item_id__variables_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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataFiltersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Datauploads Variables Query Projects  Team Id   Project Id  Datauploads  Item Id  Variables Query Post"}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/distinct_columns":{"post":{"tags":["Data Uploads"],"summary":"Post Distinct Values Of Columns","description":"Get distinct value of columns.","operationId":"post_distinct_values_of_columns_projects__team_id___project_id__datauploads__item_id__distinct_columns_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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultColumnsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Data Uploads"],"summary":"Get Distinct Values Of Columns","description":"Get distinct value of columns.","operationId":"get_distinct_values_of_columns_projects__team_id___project_id__datauploads__item_id__distinct_columns_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":"Columns","in":"query","required":true,"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/comnav__utils__filters__DataColumns"},{"type":"array","items":{"$ref":"#/components/schemas/comnav__utils__filters__DataColumns"}}]},"minItems":1,"title":"Columns"}},{"name":"Filters","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"\n        Usage:\n        result_filters='{\"Country\" : [[ \"contains\", \"UKR\"]]}'\n        ","title":"Filters"},"description":"\n        Usage:\n        result_filters='{\"Country\" : [[ \"contains\", \"UKR\"]]}'\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":{"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"with_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variable Ids"}},{"name":"with_dataimport_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Dataimport Variable Ids"}},{"name":"with_combs","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Combs"}},{"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}},"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.","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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}},"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"},{"name":"with_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variable Ids"}},{"name":"with_dataimport_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Dataimport Variable Ids"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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``. Limits unset on a given row come back as\n``null``; the project-level ``Variables.MinLimit`` / ``MaxLimit`` envelope\nis exposed separately via ``GET /project/{id}/variables``.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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.","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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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 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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/interpolate_variable_data":{"get":{"tags":["Datasets"],"summary":"Download Interpolated Variable","description":"Download interpolated variable data.\n\nRetrieves interpolated variable data from a dataset in a project as\nCSV, with optional filters like country.","operationId":"download_interpolated_variable_projects__team_id___project_id__datasets__dataset_id__interpolate_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":"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: 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":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start date for extrapolated data. This parameter is only for extrapolation not to limit the data. To filter the data please pass it into data_filter","title":"Start Date"},"description":"Start date for extrapolated data. This parameter is only for extrapolation not to limit the data. To filter the data please pass it into data_filter"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End date for extrapolated data This parameter is only for extrapolation not to limit the data. To filter the data please pass it into data_filter","title":"End Date"},"description":"End date for extrapolated data This parameter is only for extrapolation not to limit the data. To filter the data please pass it into data_filter"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/interpolate_variable_data_query":{"post":{"tags":["Datasets"],"summary":"Download Interpolated Variable Query","description":"Download interpolated variable data — POST variant for large filter payloads.","operationId":"download_interpolated_variable_query_projects__team_id___project_id__datasets__dataset_id__interpolate_variable_data_query_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterpolateVariableDataBody"}}}},"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}/distinct_columns":{"post":{"tags":["Datasets"],"summary":"Post Dataset Distinct Column Values","description":"Get distinct column values.","operationId":"post_dataset_distinct_column_values_projects__team_id___project_id__datasets__dataset_id__distinct_columns_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultColumnsRequest"}}}},"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 Dataset Distinct Column Values","description":"Get distinct column values.","operationId":"get_dataset_distinct_column_values_projects__team_id___project_id__datasets__dataset_id__distinct_columns_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":"Columns","in":"query","required":true,"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/comnav__utils__filters__DataColumns"},{"type":"array","items":{"$ref":"#/components/schemas/comnav__utils__filters__DataColumns"}}]},"minItems":1,"title":"Columns"}},{"name":"Filters","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"\n        Usage:\n        result_filters='{\"Country\" : [[ \"contains\", \"UKR\"]]}'\n        ","title":"Filters"},"description":"\n        Usage:\n        result_filters='{\"Country\" : [[ \"contains\", \"UKR\"]]}'\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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","intersec"],"type":"string","default":"union","title":"Set Fn"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"}},{"type":"null"}],"description":"List of modelling combinations to get variables for.","title":"Combinations"},"description":"List of modelling combinations to get variables for."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/variable_constant":{"post":{"tags":["Datasets"],"summary":"List Dataset Constant Variables","description":"Get constant variables from dataset.\n\nThis endpoint retrieves constant variables from a specified dataset\nbased on provided modelling combinations filters.","operationId":"list_dataset_constant_variables_projects__team_id___project_id__datasets__dataset_id__variable_constant_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConstantVariables-Input"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConstantVariables-Output"},"title":"Response List Dataset Constant Variables Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Constant Post"}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.","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"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"}},{"name":"extend_by","in":"query","required":false,"schema":{"type":"integer","description":"How much the returned dates should be extended, in percentage.","title":"Extend By"},"description":"How much the returned dates should be extended, in percentage."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"extend_by","in":"query","required":false,"schema":{"type":"integer","description":"How much the returned dates should be extended, in percentage.","title":"Extend By"},"description":"How much the returned dates should be extended, in percentage."},{"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}},"post":{"tags":["Datasets"],"summary":"List Min Max Dates","description":"List min and max dates for a dataset for each specified modelling combination.\n\nThis endpoint retrieves the minimum and maximum dates for each specified modelling\ncombination across the given datasets. If no dataset names are provided,\nit will get the intersection from all available dataset names.\nIf no dataset_names, will get the intersection from all of available dataset_names.","operationId":"list_min_max_dates_projects__team_id___project_id__datasets__dataset_id__dates_min_max_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"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":{"type":"array","items":{"$ref":"#/components/schemas/MaxMinDates"},"title":"Response List Min Max Dates Projects  Team Id   Project Id  Datasets  Dataset Id  Dates Min Max Post"}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/datasets/{dataset_id}/variable_values":{"post":{"tags":["Datasets"],"summary":"Get Variable Statistics","description":"Get variable statistics for each variable in the variable list.\n\nRetrieves statistical information for each variable in the provided\nvariable list within a specified date range and modelling combination.","operationId":"get_variable_statistics_projects__team_id___project_id__datasets__dataset_id__variable_values_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":"add_second","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Add Second"}},{"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"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-?\\d{2}-?\\d{2}(T\\d{2}:?\\d{2}:?\\d{2}(\\.\\d+)?([+-]\\d{2}:?(\\d{2})?|Z)?)?$"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-?\\d{2}-?\\d{2}(T\\d{2}:?\\d{2}:?\\d{2}(\\.\\d+)?([+-]\\d{2}:?(\\d{2})?|Z)?)?$"},{"type":"null"}],"title":"End Date"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableList"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableStatsExtended"},"title":"Response Get Variable Statistics Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Values Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/variable_hist_values":{"post":{"tags":["Datasets"],"summary":"Get Variable Historical Values","description":"Get historical values for variables in a dataset.\n\nThis endpoint retrieves historical values for each variable in the provided variable\nlist within a specified date range and modelling combination.","operationId":"get_variable_historical_values_projects__team_id___project_id__datasets__dataset_id__variable_hist_values_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"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-?\\d{2}-?\\d{2}(T\\d{2}:?\\d{2}:?\\d{2}(\\.\\d+)?([+-]\\d{2}:?(\\d{2})?|Z)?)?$"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-?\\d{2}-?\\d{2}(T\\d{2}:?\\d{2}:?\\d{2}(\\.\\d+)?([+-]\\d{2}:?(\\d{2})?|Z)?)?$"},{"type":"null"}],"title":"End Date"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableList"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableHistValues"},"title":"Response Get Variable Historical Values Projects  Team Id   Project Id  Datasets  Dataset Id  Variable Hist Values Post"}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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 like country.","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":"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":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter feature importance result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter feature importance result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/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        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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/{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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.\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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.\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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"}}}},"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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":{"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\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby\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\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby\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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Models_"}}}},"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}},"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/variable_list":{"get":{"tags":["Models"],"summary":"List Variables","description":"Get variables from a model.\n\nThis endpoint retrieves the list of variables from a specified model.","operationId":"list_variables_projects__team_id___project_id__models__model_id__variable_list_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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response List Variables Projects  Team Id   Project Id  Models  Model Id  Variable List Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/result_variables":{"get":{"tags":["Models"],"summary":"Result Variables","description":"Get result variables from a model.\n\nThis endpoint retrieves the result variables from a specified model.","operationId":"result_variables_projects__team_id___project_id__models__model_id__result_variables_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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Result Variables Projects  Team Id   Project Id  Models  Model Id  Result Variables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/target_nodes":{"get":{"tags":["Models"],"summary":"Target Nodes","description":"Get target nodes from a model.\n\nThis endpoint retrieves the target nodes from a specified model.","operationId":"target_nodes_projects__team_id___project_id__models__model_id__target_nodes_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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Target Nodes Projects  Team Id   Project Id  Models  Model Id  Target Nodes 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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ModelRefitRequest"},{"type":"null"}],"default":{"model_param":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30},"model_detail":{"activate":false}},"title":"Request"}}}},"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}/modelinfo/grouped_list":{"get":{"tags":["Models"],"summary":"Get Grouped Model List","description":"Get models grouped by modelling combinations.\n\nThis endpoint retrieves a list of models grouped by their modelling combinations\n(Country, Region, Grouping) within a specified project.","operationId":"get_grouped_model_list_projects__team_id___project_id__modelinfo_grouped_list_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":{"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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, 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, 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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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 (slug format)\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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/simulations/{simulation_id}/variables":{"get":{"tags":["Simulations"],"summary":"List Variables","description":"List all variables available in the simulation results.\n\nReturns metadata for each unique variable present in the simulation\noutput, useful for understanding what KPIs were affected and building\nfilter queries for data download.\n\nPrerequisites:\n    Job Status must be COMPLETED.\n\nPath Parameters:\n    - simulation_id: The IId of the simulation job\n\nQuery Parameters:\n    - result_filters: Optional filters to subset which variables are returned\n\nResponse:\n    List of variable metadata objects.\n\nRelated:\n    - GET /simulations/{simulation_id}/data: Download simulation data","operationId":"list_variables_projects__team_id___project_id__simulations__simulation_id__variables_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"},{"name":"result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"\n        Filter simulation 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\", \"sales\"]]}'\n        - By scenario type: result_filters='{\"Type\": [[\"=\", \"Scenario\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter simulation 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\", \"sales\"]]}'\n        - By scenario type: result_filters='{\"Type\": [[\"=\", \"Scenario\"]]}'\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response List Variables Projects  Team Id   Project Id  Simulations  Simulation Id  Variables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/simulations/{simulation_id}/distinct_columns":{"post":{"tags":["Simulations"],"summary":"Post Distinct Columns","description":"List distinct column values from a simulation job.","operationId":"post_distinct_columns_projects__team_id___project_id__simulations__simulation_id__distinct_columns_post","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistinctColumnsBody_SimulationColumns_"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Simulations"],"summary":"Get Distinct Columns","description":"List distinct column values from a simulation job.","operationId":"get_distinct_columns_projects__team_id___project_id__simulations__simulation_id__distinct_columns_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"},{"name":"body","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DistinctColumnsBody_SimulationColumns_"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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, 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, 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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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 (slug format)\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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/predictions/{prediction_id}/variables":{"get":{"tags":["Predictions"],"summary":"Prediction Variables","description":"List all variables available in the prediction results.\n\nReturns metadata for each unique variable present in the forecast\nresults, useful for understanding what KPIs were predicted and\nbuilding filter queries for data download.\n\nPrerequisites:\n    Job Status must be COMPLETED.\n\nPath Parameters:\n    - prediction_id: The IId of the prediction job\n\nQuery Parameters:\n    - result_filters: Optional filters to subset which variables are returned\n\nResponse:\n    List of variable metadata objects.\n\nRelated:\n    - GET /predictions/{prediction_id}/data: Download forecast data","operationId":"prediction_variables_projects__team_id___project_id__predictions__prediction_id__variables_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"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter prediction 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\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter prediction 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\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Prediction Variables Projects  Team Id   Project Id  Predictions  Prediction Id  Variables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/predictions/{prediction_id}/distinct_columns":{"post":{"tags":["Predictions"],"summary":"Post Distinct Column Prediction","description":"Get distinct values for prediction result columns.","operationId":"post_distinct_column_prediction_projects__team_id___project_id__predictions__prediction_id__distinct_columns_post","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistinctColumnsBody_PredictionColumns_"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Predictions"],"summary":"Get Distinct Column Prediction","description":"Get distinct values for prediction result columns.","operationId":"get_distinct_column_prediction_projects__team_id___project_id__predictions__prediction_id__distinct_columns_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"},{"name":"body","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DistinctColumnsBody_PredictionColumns_"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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.","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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/parquet_data":{"get":{"tags":["Attributions"],"summary":"Get Parquet Data","description":"Get parquet file of attribution job.\n\nThis endpoint retrieves the results of an attribution job and allows the user to\ndownload the data in Parquet format.","operationId":"get_parquet_data_projects__team_id___project_id__attributions__attributionjob_id__parquet_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":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"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":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"\n        result_filters but compressed\n        ","title":"Lz Result Filters"},"description":"\n        result_filters but compressed\n        "},{"name":"columns","in":"query","required":false,"schema":{"type":"array","items":{"enum":["Country","Date","Effect","Group","Grouping","Quantile","Region","Response","Variable","Type"],"type":"string"},"description":"Group by these columns","title":"Columns"},"description":"Group by these columns"},{"name":"agg_fn","in":"query","required":false,"schema":{"enum":["sum","avg"],"type":"string","default":"sum","title":"Agg Fn"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/variables":{"get":{"tags":["Attributions"],"summary":"Get Attribution Variables","description":"Get variables from attribution result.\n\nThis endpoint retrieves variables from the results of a specified attribution job\nbased on the provided filters.","operationId":"get_attribution_variables_projects__team_id___project_id__attributions__attributionjob_id__variables_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 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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariablesAttribution"},"title":"Response Get Attribution Variables Projects  Team Id   Project Id  Attributions  Attributionjob Id  Variables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/{attributionjob_id}/distinct_columns":{"post":{"tags":["Attributions"],"summary":"Post Attribution Distinct Values","description":"Get distinct values for result's columns.","operationId":"post_attribution_distinct_values_projects__team_id___project_id__attributions__attributionjob_id__distinct_columns_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/comnav__schemas__request__DistinctColumnsBody_DataColumns___1"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Attributions"],"summary":"Get Attribution Distinct Values","description":"Get distinct values for result's columns.","operationId":"get_attribution_distinct_values_projects__team_id___project_id__attributions__attributionjob_id__distinct_columns_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":"body","in":"query","required":true,"schema":{"$ref":"#/components/schemas/comnav__schemas__request__DistinctColumnsBody_DataColumns___1"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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, or circular reference","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\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\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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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 with automatic date alignment to avoid overlap.\n\nAutomatically filters attribution job results to prevent double-counting\nwhen attributions have overlapping date ranges. Earlier attributions take\nprecedence for overlapping periods.\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    automatically aligns them to create non-overlapping coverage.\n\nDate Alignment Logic:\n    - Attributions are sorted by start date\n    - Each attribution contributes data only for periods after the\n      previous attribution's end date\n    - This prevents double-counting effects in overlapping periods\n\nResponse:\n    Returns the created attribution set with aligned date filters applied.\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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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, or circular reference","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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'"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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'"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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'"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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'"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/data_s3":{"get":{"tags":["Attribution Sets"],"summary":"Download Attribution Set S3","description":"Download attribution set results from S3.\n\nReturns 404 when no S3 results exist for the attribution set.","operationId":"download_attribution_set_s3_projects__team_id___project_id__attributionset__attributionset_id__data_s3_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: 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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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/{attributionset_id}/parquet_data":{"get":{"tags":["Attribution Sets"],"summary":"Get Parquet Data","description":"Get parquet file of attribution set.\n\nThis endpoint retrieves the results of an attribution set and allows the user to\ndownload the data in Parquet format.","operationId":"get_parquet_data_projects__team_id___project_id__attributionset__attributionset_id__parquet_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":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"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        ","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        "},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters but compressed","title":"Lz Result Filters"},"description":"result_filters but compressed"},{"name":"columns","in":"query","required":false,"schema":{"type":"array","items":{"enum":["Country","Date","Effect","Group","Grouping","Quantile","Region","Response","Variable","Type"],"type":"string"},"description":"Group by these columns","title":"Columns"},"description":"Group by these columns"},{"name":"agg_fn","in":"query","required":false,"schema":{"enum":["sum","avg"],"type":"string","default":"sum","title":"Agg Fn"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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/{attributionset_id}/variables":{"get":{"tags":["Attribution Sets"],"summary":"Get Attriubtion Set Variables","description":"Get variables from an attribution set.\n\nThis endpoint retrieves variables from the results of a specified attribution set\nbased on the provided filters.","operationId":"get_attriubtion_set_variables_projects__team_id___project_id__attributionset__attributionset_id__variables_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariablesAttribution"},"title":"Response Get Attriubtion Set Variables Projects  Team Id   Project Id  Attributionset  Attributionset Id  Variables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/distinct_columns":{"post":{"tags":["Attribution Sets"],"summary":"Post Attribution Set Distinct Values","description":"Get distinct values for result's columns in an attribution set.","operationId":"post_attribution_set_distinct_values_projects__team_id___project_id__attributionset__attributionset_id__distinct_columns_post","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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/comnav__schemas__request__DistinctColumnsBody_DataColumns___1"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Distinct Values","description":"Get distinct values for result's columns in an attribution set.","operationId":"get_attribution_set_distinct_values_projects__team_id___project_id__attributionset__attributionset_id__distinct_columns_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":"body","in":"query","required":true,"schema":{"$ref":"#/components/schemas/comnav__schemas__request__DistinctColumnsBody_DataColumns___1"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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/{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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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, 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, 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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/predict_simulate_input":{"get":{"tags":["Optimizations"],"summary":"Prediction Simulate Input","description":"Get optimization result as prediction or simulation input.\n\nThis endpoint retrieves the optimization result and formats it as input for\nprediction or simulation.","operationId":"prediction_simulate_input_projects__team_id___project_id__optimizations__optimization_id__predict_simulate_input_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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableScenarioValue"}}}},"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        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media_spend\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter optimization 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_spend\"]]}'\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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/variables":{"get":{"tags":["Optimizations"],"summary":"Optimization Variables","description":"Get variables from optimization result.\n\nThis endpoint retrieves distinct variables from the results of a specified\noptimization job based on the provided filters.","operationId":"optimization_variables_projects__team_id___project_id__optimizations__optimization_id__variables_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"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter optimization 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_spend\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter optimization 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_spend\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Optimization Variables Projects  Team Id   Project Id  Optimizations  Optimization Id  Variables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations/{optimization_id}/variables_query":{"post":{"tags":["Optimizations"],"summary":"Optimization Variables Query","description":"Get variables from optimization result — POST variant for large filter payloads.","operationId":"optimization_variables_query_projects__team_id___project_id__optimizations__optimization_id__variables_query_post","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultFiltersBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Variable-Output"},"title":"Response Optimization Variables Query Projects  Team Id   Project Id  Optimizations  Optimization Id  Variables Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations/{optimization_id}/distinct_columns":{"post":{"tags":["Optimizations"],"summary":"Post Distinct Columns Optimization","description":"Get distinct values from optimization result columns.","operationId":"post_distinct_columns_optimization_projects__team_id___project_id__optimizations__optimization_id__distinct_columns_post","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistinctColumnsBody_OptimizationColumns_"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Optimizations"],"summary":"Get Distinct Columns Optimization","description":"Get distinct values from optimization result columns.","operationId":"get_distinct_columns_optimization_projects__team_id___project_id__optimizations__optimization_id__distinct_columns_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"},{"name":"body","in":"query","required":true,"schema":{"$ref":"#/components/schemas/DistinctColumnsBody_OptimizationColumns_"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/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.","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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.","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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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.","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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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\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\n        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/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.","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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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/{prior_posterior_id}/distinct_columns":{"post":{"tags":["Prior Posterior"],"summary":"Post Prior Posterior Distinct Values","description":"Get distinct values from column(s) on prior posterior data.","operationId":"post_prior_posterior_distinct_values_projects__team_id___project_id__prior_posterior__prior_posterior_id__distinct_columns_post","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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/comnav__schemas__request__DistinctColumnsBody_DataColumns___2"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Prior Posterior"],"summary":"Get Prior Posterior Distinct Values","description":"Get distinct values from column(s) on prior posterior data.","operationId":"get_prior_posterior_distinct_values_projects__team_id___project_id__prior_posterior__prior_posterior_id__distinct_columns_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"},{"name":"body","in":"query","required":true,"schema":{"$ref":"#/components/schemas/comnav__schemas__request__DistinctColumnsBody_DataColumns___2"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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        "},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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."},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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}/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":"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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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/notification/{team_id}/ntfy-token":{"get":{"tags":["Notifications"],"summary":"Get Ntfy Token","description":"Get a ntfy access token for the team.\n\nEnsures a ntfy account exists for the team, then returns a short-lived\ntoken the frontend can use to subscribe to job status notifications on\ntopics scoped to this team. The token is cached in Redis for most of its\nTTL to avoid issuing a new token on every request.","operationId":"get_ntfy_token_notification__team_id__ntfy_token_get","parameters":[{"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"}}}}}}},"/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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-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"}}}}}}},"/api/tenants/{team_id}":{"get":{"tags":["Tenants"],"summary":"Get Tenant","description":"Get tenant by name.\n\nThis endpoint retrieves detailed information about a specific tenant.","operationId":"get_tenant_tenants__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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDetailed"}}}},"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}/plans":{"post":{"tags":["Plans"],"summary":"Create Plan","description":"Create a plan: the shared, locked base config for a set of candidates.\n\nThe plan owns the goal, target(s), locked period, modelling combination,\ndataset, constraints, and a baseline scenario. Candidates created under the\nplan inherit this config.","operationId":"create_plan_projects__team_id___project_id__plans_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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPost"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedPlans"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Plans"],"summary":"List Plans","description":"List the project's plans (paginated, excludes soft-deleted).","operationId":"list_plans_projects__team_id___project_id__plans_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":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"JSON filter expressions","title":"Filters"},"description":"JSON filter expressions"},{"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Plans_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/plans/{plan_id}":{"get":{"tags":["Plans"],"summary":"Get Plan","description":"Get a plan with its baseline and candidate summaries.","operationId":"get_plan_projects__team_id___project_id__plans__plan_id__get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan 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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedPlans"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Plans"],"summary":"Patch Plan","description":"Update a plan.\n\nSet ``active_candidate_id`` to activate a candidate as the final plan, and\n``status`` to advance the plan lifecycle (draft → exploring → decided →\ntracking → closed).","operationId":"patch_plan_projects__team_id___project_id__plans__plan_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":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan IId"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedPlans"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Plans"],"summary":"Delete Plan","description":"Soft-delete a plan (candidates and their jobs are retained).","operationId":"delete_plan_projects__team_id___project_id__plans__plan_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":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan IId"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/plans/{plan_id}/candidates":{"post":{"tags":["Candidates"],"summary":"Create Candidate","description":"Create a candidate: a sim/pred/opt job inheriting the plan's locked config.\n\nThe server pulls the plan's targets, period, modelling combination, dataset,\nbaseline, and constraints, validates the chosen model against the plan, builds\nand submits the underlying job (reusing the existing submit paths), snapshots\nthe plan baseline into the job's data, and records the candidate.","operationId":"create_candidate_projects__team_id___project_id__plans__plan_id__candidates_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":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan IId"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidatePost"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedCandidates"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Candidates"],"summary":"List Candidates","description":"List the plan's candidates (paginated, excludes soft-deleted).","operationId":"list_candidates_projects__team_id___project_id__plans__plan_id__candidates_get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan 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":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"JSON filters","title":"Filters"},"description":"JSON filters"},{"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"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_Candidates_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/plans/{plan_id}/candidates/attach":{"post":{"tags":["Candidates"],"summary":"Attach Candidate","description":"Attach an existing job to a new candidate under the plan.","operationId":"attach_candidate_projects__team_id___project_id__plans__plan_id__candidates_attach_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":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan IId"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidateAttach"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedCandidates"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/plans/{plan_id}/candidates/{candidate_id}":{"get":{"tags":["Candidates"],"summary":"Get Candidate","description":"Get a candidate within a plan.","operationId":"get_candidate_projects__team_id___project_id__plans__plan_id__candidates__candidate_id__get","parameters":[{"name":"candidate_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Candidate IId","title":"Candidate Id"},"description":"Provide the Candidate IId"},{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan 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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedCandidates"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Candidates"],"summary":"Delete Candidate","description":"Soft-delete a candidate (the underlying job is retained).","operationId":"delete_candidate_projects__team_id___project_id__plans__plan_id__candidates__candidate_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":"candidate_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Candidate IId","title":"Candidate Id"},"description":"Provide the Candidate IId"},{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan IId"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"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}/plans/{plan_id}/candidates/{candidate_id}/plan-data":{"get":{"tags":["Candidates"],"summary":"Get Candidate Plan Data","description":"Get the unified plan-data (allocation + predicted targets) for a candidate.","operationId":"get_candidate_plan_data_projects__team_id___project_id__plans__plan_id__candidates__candidate_id__plan_data_get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan 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":"candidate_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Candidate IId","title":"Candidate Id"},"description":"Provide the Candidate IId"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/plans/{plan_id}/plan-data":{"get":{"tags":["Candidates"],"summary":"Get Active Plan Data","description":"Get the unified plan-data for the plan's active (final) candidate.","operationId":"get_active_plan_data_projects__team_id___project_id__plans__plan_id__plan_data_get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Plan IId","title":"Plan Id"},"description":"Provide the Plan 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":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/bucket-config":{"get":{"tags":["Internal"],"summary":"Get Bucket Config","description":"Resolve S3 bucket config for drun and cache it in Redis.\n\nDelegates to ``get_drun_config_by_id``: ``None`` -> legacy drun system\nconfig; negative -> system bucket (no DB hit); positive -> tenant row.\n\nArgs:\n    team_id: The team identifier used for system-config cache key.\n    config_id: Stored bucket config id (None, negative system id, or\n        positive tenant row id).\n\nReturns:\n    A dict with S3 bucket configuration fields.","operationId":"get_bucket_config_internal_bucket_config_get","parameters":[{"name":"team_id","in":"query","required":true,"schema":{"type":"string","description":"Team ID to resolve config for","title":"Team Id"},"description":"Team ID to resolve config for"},{"name":"config_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Stored bucket config id","title":"Config Id"},"description":"Stored bucket config id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/forward_auth_permission_check":{"get":{"summary":"Forward Auth Permission Check","description":"Perform a permission check for the given forwarded URI request.","operationId":"forward_auth_permission_check_forward_auth_permission_check_get","parameters":[{"name":"X-Forwarded-Uri","in":"header","required":true,"schema":{"type":"string","title":"X-Forwarded-Uri"}},{"name":"X-Forwarded-Method","in":"header","required":true,"schema":{"type":"string","title":"X-Forwarded-Method"}},{"name":"X-User-Id","in":"header","required":false,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams":{"get":{"tags":["Teams"],"summary":"List ","description":"List or search for multiple teams.","operationId":"list__teams_get","parameters":[{"name":"X-Original-User-Id","in":"header","required":false,"schema":{"title":"X-Original-User-Id"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/GetListTeamResponse"},"title":"Response List  Teams Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/GetCurrentTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/TeamWithMemberships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/Invitation"}}},"description":"Created"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.devcon7.rour.my.id/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.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/Role"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.devcon7.rour.my.id/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.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.devcon7.rour.my.id/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.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/Invitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/UserInvitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/UserInvitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/UserInvitation"},"title":"Response Get Invitations Invitations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/banners/current":{"get":{"tags":["App Banners"],"summary":"Get Current Or Upcoming Banner","description":"Get current or upcoming banner.","operationId":"get_current_or_upcoming_banner_banners_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/team/openapi.json#/components/schemas/CurrentBannerMessage"}}}}}}},"/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/_update_access_time":{"get":{"summary":"Update Access Time","description":"Update user's last access time.","operationId":"update_access_time__update_access_time_get","parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/user/access_tokens/_verify":{"post":{"tags":["Access Token"],"summary":"Verify Token","description":"Verify token.","operationId":"verify_token_access_tokens__verify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/user/access_tokens":{"get":{"tags":["Access Token"],"summary":"Get User Tokens","description":"Get user tokens.","operationId":"get_user_tokens_access_tokens_get","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/AccessToken"},"title":"Response Get User Tokens Access Tokens Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/CreateAccessTokenBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/CreateAccessTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["User"],"summary":"Delete","description":"Delete current user.","operationId":"delete_current_delete","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["User"],"summary":"Update","description":"Update current user.","operationId":"update_current_patch","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/UpdateUserBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/user/":{"get":{"summary":"Get","description":"Get user.","operationId":"get__get","parameters":[{"name":"other_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Other User Id"}},{"name":"other_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Other Email"}},{"name":"include_fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of fields to include in the response.\n            supported fields: picture\"\n        ","title":"Include Fields"},"description":"Comma-separated list of fields to include in the response.\n            supported fields: picture\"\n        "},{"name":"X-User-Id","in":"header","required":true,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/user/list":{"get":{"summary":"List ","description":"Get multiple users.","operationId":"list__list_get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":25,"title":"Limit"}},{"name":"lucene_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(user_id:).+$"},{"type":"null"}],"title":"Lucene Filters"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"enum":["username","email","created_at","last_access_at"],"type":"string"},{"type":"null"}],"default":"created_at","title":"Sort By"}},{"name":"sort_direction","in":"query","required":false,"schema":{"enum":["ascending","descending"],"type":"string","default":"ascending","title":"Sort Direction"}},{"name":"include_fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include Fields"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.alviss.devcon7.rour.my.id/v1/user/openapi.json#/components/schemas/User"},"title":"Response List  List Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.alviss.devcon7.rour.my.id/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":{"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."},"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 for the model/dataset. Name will be 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"},"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 for the model/dataset. Name will be 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":"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_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"},"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":"Validate values against per-variable min/max limits.","default":false}},"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":{"type":"number","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"},"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":"Validate values against per-variable min/max limits.","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"}},"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 for the model/dataset. Name will be 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":"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_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"},"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":"Validate values against per-variable min/max limits.","default":false}},"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 for the model/dataset. Name will be 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":"Prefix for the name."},"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":{"type":"number","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 for the model/dataset. Name will be 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":"Prefix for the name."},"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 for the model/dataset. Name will be 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":"Prefix for the name."},"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":{"type":"number","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":{"type":"number","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","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"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":"Controll the brand."},"CandidateAttach":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"kind":{"$ref":"#/components/schemas/CandidateKind","description":"Kind of the job to attach."},"job_id":{"type":"integer","title":"Job Id","description":"IId of the existing job to attach."}},"type":"object","required":["kind","job_id"],"title":"CandidateAttach","description":"Attach an existing job to a new candidate under a plan."},"CandidateKind":{"type":"string","enum":["optimization","prediction","simulation"],"title":"CandidateKind","description":"The underlying job kind backing a candidate."},"CandidatePost":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"kind":{"$ref":"#/components/schemas/CandidateKind","description":"Underlying job kind."},"model_id":{"type":"integer","title":"Model Id","description":"IId of the model to run the candidate with."},"samples":{"type":"integer","title":"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},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Priority","description":"The priority value for the job.","default":50},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional reproducibility seed."},"quantiles":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Quantiles","description":"Quantiles for simulation/prediction candidates."},"opt_nodes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Opt Nodes","description":"Optimizer levers (optimization candidates only)."},"epochs":{"type":"integer","title":"Epochs","description":"Optimization iterations (opt only).","default":1000},"lr":{"type":"number","title":"Lr","description":"Learning rate (opt only).","default":0.1},"grad_clip":{"type":"number","title":"Grad Clip","description":"Gradient clip (opt only).","default":1}},"type":"object","required":["kind","model_id"],"title":"CandidatePost","description":"Request body for creating a candidate under a plan.\n\nThe plan supplies the locked base config (targets, period, modelling\ncombination, dataset, baseline, constraints); this body supplies the job\nkind, the model, and execution parameters."},"Candidates":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths."},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"Kind":{"$ref":"#/components/schemas/CandidateKind","description":"Underlying job kind."},"ResultSummary":{"anyOf":[{},{"type":"null"}],"title":"Resultsummary","description":"Cached headline metrics, filled when the job finishes."},"Date":{"type":"string","format":"date-time","title":"Date"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"}},"type":"object","required":["IId","Kind","Date"],"title":"Candidates","description":"Response schema for candidate listing and summary views."},"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","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}]},"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":"Controll the competitor media variabels."},"CompetitorDistribution":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}]},"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.","default":false}},"type":"object","title":"CompetitorDistribution","description":"Controll the competitor distribution variabels."},"CompetitorMedia":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}]},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days in to the future do we expect the a media Investmentto 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.","default":false}},"type":"object","title":"CompetitorMedia","description":"Controll the competitor media variabels."},"CompetitorPrice":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}]},"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.","default":false}},"type":"object","title":"CompetitorPrice","description":"Controll the competitor price variabels."},"ConstantVariables-Input":{"properties":{"modelling_combinations":{"items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"},"type":"array","minItems":1,"title":"Modelling Combinations","description":"Modelling combination list for the models."}},"type":"object","required":["modelling_combinations"],"title":"ConstantVariables","description":"Schema for getting constant variables."},"ConstantVariables-Output":{"properties":{"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"IsConstant":{"type":"boolean","title":"Isconstant"},"Variable":{"$ref":"#/components/schemas/Variable-Output"}},"type":"object","required":["Country","Region","Grouping","IsConstant","Variable"],"title":"ConstantVariables","description":"Schema for constant 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 for the model/dataset. Name will be 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":"Prefix for the name."},"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","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days in to the future do we expect the a media Investmentto 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.","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":"Controll the customer expereince."},"DataFiltersBody":{"properties":{"data_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data Filters"}},"type":"object","title":"DataFiltersBody","description":"Request body for _query POST endpoints that filter by data attributes."},"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. Blocked datasets are rejected by sim/pred/attribution/optimize/response-curve submission until the limits are patched to cover the data.","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 for the model/dataset. Name will be 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":"Prefix for the name."},"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 that must exist in the new dataset; unknown tuples produce 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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."},"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"}},"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."},"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."},"DateValue":{"properties":{"Date":{"type":"string","format":"date-time","title":"Date"},"Value":{"type":"number","title":"Value"}},"type":"object","required":["Date","Value"],"title":"DateValue","description":"Schema for updated dates."},"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":{"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"},"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'"},"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"}]},"DetailedCandidates":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths."},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"Kind":{"$ref":"#/components/schemas/CandidateKind","description":"Underlying job kind."},"ResultSummary":{"anyOf":[{},{"type":"null"}],"title":"Resultsummary","description":"Cached headline metrics, filled when the job finishes."},"Date":{"type":"string","format":"date-time","title":"Date"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"PlanId":{"type":"integer","title":"Planid"}},"type":"object","required":["IId","Kind","Date","PlanId"],"title":"DetailedCandidates","description":"Detailed candidate response."},"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. Blocked datasets are rejected by sim/pred/attribution/optimize/response-curve submission until the limits are patched to cover the data.","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"}},"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"},"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"},"PriorPosteriorJobs":{"items":{"$ref":"#/components/schemas/PriorPosteriorJobs"},"type":"array","title":"Priorposteriorjobs","description":"Prior/posterior analysis jobs for 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","PriorPosteriorJobs","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":[],"UIFilterPriorPosteriorJobs":[],"UIFilterSimulationJobs":[]}]},"DetailedOptimization":{"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"},"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":[]}]},"DetailedPlans":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths."},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"Goal":{"$ref":"#/components/schemas/PlanGoal"},"Status":{"$ref":"#/components/schemas/PlanStatus"},"StartDate":{"type":"string","format":"date-time","title":"Startdate"},"EndDate":{"type":"string","format":"date-time","title":"Enddate"},"Country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"Region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"Grouping":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grouping"},"DataSetId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Datasetid"},"ActiveCandidateId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Activecandidateid","description":"Internal id of the activated candidate, if any."},"Date":{"type":"string","format":"date-time","title":"Date"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Targets":{"anyOf":[{},{"type":"null"}],"title":"Targets"},"BoundaryConstraints":{"anyOf":[{},{"type":"null"}],"title":"Boundaryconstraints"},"EqualityInequalityConstraints":{"anyOf":[{},{"type":"null"}],"title":"Equalityinequalityconstraints"},"PreStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Prestartdate"},"PreEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Preenddate"},"PostStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Poststartdate"},"PostEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Postenddate"},"baseline":{"items":{"$ref":"#/components/schemas/PlanVariableData"},"type":"array","title":"Baseline"},"candidates":{"items":{"$ref":"#/components/schemas/Candidates"},"type":"array","title":"Candidates"}},"type":"object","required":["IId","Goal","Status","StartDate","EndDate","Date"],"title":"DetailedPlans","description":"Detailed plan response with baseline and candidate summaries."},"DetailedPredictionJobs":{"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"},"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}},"type":"object","required":["IId","DataSet","Status","Date","Model","Scenarios","AttributionAssociation","Fit"],"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":{"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":{"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)"}},"type":"object","required":["IId","DataSet","Status","Date","Model","UpdateVariable","AttributionAssociation"],"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 name"}},"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."},"DistinctColumnsBody_OptimizationColumns_":{"properties":{"Columns":{"items":{"anyOf":[{"$ref":"#/components/schemas/OptimizationColumns"},{"items":{"$ref":"#/components/schemas/OptimizationColumns"},"type":"array"}]},"type":"array","title":"Columns","description":"List of columns to get distinct values."}},"type":"object","required":["Columns"],"title":"DistinctColumnsBody[OptimizationColumns]"},"DistinctColumnsBody_PredictionColumns_":{"properties":{"Columns":{"items":{"anyOf":[{"$ref":"#/components/schemas/PredictionColumns"},{"items":{"$ref":"#/components/schemas/PredictionColumns"},"type":"array"}]},"type":"array","title":"Columns","description":"List of columns to get distinct values."}},"type":"object","required":["Columns"],"title":"DistinctColumnsBody[PredictionColumns]"},"DistinctColumnsBody_SimulationColumns_":{"properties":{"Columns":{"items":{"anyOf":[{"$ref":"#/components/schemas/SimulationColumns"},{"items":{"$ref":"#/components/schemas/SimulationColumns"},"type":"array"}]},"type":"array","title":"Columns","description":"List of columns to get distinct values."}},"type":"object","required":["Columns"],"title":"DistinctColumnsBody[SimulationColumns]"},"Distribution":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"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.","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":"Controll 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 tollerance to use to determine to stop","default":0.1},"relative_tolerance":{"type":"number","minimum":0.0,"title":"Relative Tolerance","description":"The relative tollerance to use to determine to stop","default":0.1}},"type":"object","title":"EarlyStopping","description":"Config for early stopping."},"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","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"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":"Controll 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","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}]},"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":"Controll the extra variabels."},"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."}},"type":"object","required":["graph"],"title":"GraphRequest","description":"Request body for creating a new graph structure."},"GraphUpdate":{"properties":{"graph":{"$ref":"#/components/schemas/Graph","description":"graph instances which want to be updated, consist of node and edge"}},"type":"object","required":["graph"],"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)"},"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","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"shared":{"type":"boolean","title":"Shared","description":"Should the effect be shared betwwen the targets or should the effect be individual per targets.","default":false}},"type":"object","title":"Holidays","description":"Controll the impact of sales."},"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":"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":{"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":"InterpolateUploadBody","description":"Request body for interpolated upload _query endpoint."},"InterpolateVariableDataBody":{"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"},"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":"InterpolateVariableDataBody","description":"Request body for interpolated variable data _query endpoints."},"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."},"LogTypes":{"type":"string","enum":["stderr","stdout"],"title":"LogTypes","description":"Drun log type."},"Macro":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"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":"Controll the macro variables."},"MaxMinDates":{"properties":{"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"min":{"type":"string","format":"date-time","title":"Min"},"max":{"type":"string","format":"date-time","title":"Max"}},"type":"object","required":["Country","Region","Grouping","min","max"],"title":"MaxMinDates","description":"Schema for max min dates for Modelling combination."},"Media":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days in to the future do we expect the a media Investmentto 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.","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":"Controll the media."},"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."},"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 for the model/dataset. Name will be 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"},"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},"skip_graph_validation":{"$ref":"#/components/schemas/SkipSchemaT","description":"If True, skips validation of graph structure.","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."},"skip_graph_validation":{"$ref":"#/components/schemas/SkipSchemaT","description":"If True, skips validation of graph structure.","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 for the model/dataset. Name will be 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":"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_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."},"ModelRefitDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be 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":"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."}},"type":"object","title":"ModelRefitDetail","description":"schemas class of model refit detail."},"ModelRefitRequest":{"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":{"anyOf":[{"$ref":"#/components/schemas/ModelRefitDetail"},{"type":"null"}],"description":"Refit configuration: new dataset reference, updated training dates, and metadata. Uses original model's graph structure and settings.","default":{"activate":false}}},"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"}},"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."},"OptimizationColumns":{"type":"string","enum":["Date","Variable","Value"],"title":"OptimizationColumns"},"OptimizationJobs":{"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"},"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":{"type":"integer","title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Status":{"$ref":"#/components/schemas/JobState"}},"type":"object","required":["IId","JobId","Status"],"title":"OptimizationJobsRef","description":"Reference schema for optimization job."},"OptimizationOp":{"type":"string","enum":["sum"],"title":"OptimizationOp","description":"Optimization Operators."},"OptimizationPost":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be 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":"Prefix for the name."},"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."},"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."},"data_end_date":{"type":"string","format":"date-time","title":"Data End Date","description":"End of the data range for optimization. ISO 8601 format."},"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."},"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."},"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},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"attribution":{"anyOf":[{"$ref":"#/components/schemas/AttributionAfterJob"},{"type":"null"}],"description":"Auto-runs attribution analysis after optimization completes. Quantifies variable contributions to the optimized result."},"additional_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Config","description":"UI-specific configuration passed through to frontend display."},"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":"Validate values against per-variable min/max limits.","default":false}},"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:00Z","data_start_date":"2024-01-01T00:00:00Z","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":"list of target variables"},"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"}},"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_Candidates_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Candidates"},"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[Candidates]"},"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_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_Models_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Models"},"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[Models]"},"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_Plans_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Plans"},"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[Plans]"},"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_Projects_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Projects"},"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[Projects]"},"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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be 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 for the model/dataset. Name will be autogenerated if empty."},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit","description":"Lower bound for this variable. Send `null` to clear. The DB enforces MinLimit < MaxLimit when both are set."},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit","description":"Upper bound for this variable. Send `null` to clear. 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"},{"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."},"PlanBaselineVariable":{"properties":{"variable_id":{"type":"integer","title":"Variable Id"},"update":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpdateValue"},"type":"array"},{"type":"null"}],"title":"Update"}},"type":"object","required":["variable_id","update"],"title":"PlanBaselineVariable","description":"Plan baseline scenario point, keyed by variable IId.\n\nThe IId-keyed counterpart of :class:`UpdatedVariable` (which is slug-keyed);\nused by the Planning feature, whose API surface addresses variables by IId."},"PlanData":{"properties":{"plan_id":{"type":"integer","title":"Plan Id"},"candidate_id":{"type":"integer","title":"Candidate Id"},"kind":{"$ref":"#/components/schemas/CandidateKind"},"variables":{"items":{"$ref":"#/components/schemas/PlanVariableData"},"type":"array","title":"Variables"},"targets":{"items":{"$ref":"#/components/schemas/PlanTarget"},"type":"array","title":"Targets"},"totals":{"$ref":"#/components/schemas/PlanTotals"}},"type":"object","required":["plan_id","candidate_id","kind"],"title":"PlanData","description":"Unified per-channel/per-date allocation derived from any candidate."},"PlanGoal":{"type":"string","enum":["maximize","hit_target","explore"],"title":"PlanGoal","description":"A plan's optimization goal."},"PlanPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"status":{"anyOf":[{"$ref":"#/components/schemas/PlanStatus"},{"type":"null"}]},"active_candidate_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Candidate Id","description":"IId of the candidate to activate as the final plan."}},"additionalProperties":false,"type":"object","title":"PlanPatch","description":"Request body for updating a plan.\n\nOnly the lifecycle fields are mutable: ``name``, ``note``, ``status`` and\n``active_candidate_id`` (setting which activates that candidate). Every other\nplan attribute is set at creation (``POST /plans``) and immutable thereafter;\nsending one here is rejected (``extra='forbid'``)."},"PlanPost":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"goal":{"$ref":"#/components/schemas/PlanGoal","description":"The plan's optimization goal.","default":"maximize"},"targets":{"anyOf":[{"$ref":"#/components/schemas/OptimizationTargets"},{"type":"null"}],"description":"Plan target(s) in OptimizationTargets format; supports optimizing the sum of multiple target variables."},"start_date":{"type":"string","format":"date-time","title":"Start Date","description":"Locked plan period start (ISO 8601)."},"end_date":{"type":"string","format":"date-time","title":"End Date","description":"Locked plan period end (ISO 8601)."},"pre_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pre Start Date"},"pre_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pre End Date"},"post_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Post Start Date"},"post_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Post End Date"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Modelling combination country."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"Modelling combination region."},"grouping":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grouping","description":"Modelling combination grouping."},"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."},"boundary_constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/OptimizationBoundaryConstraint"},"type":"array"},{"type":"null"}],"title":"Boundary Constraints"},"equality_inequality_constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/EqualityInequalityConstraints"},"type":"array"},{"type":"null"}],"title":"Equality Inequality Constraints"},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/PlanBaselineVariable"},"type":"array"},{"type":"null"}],"title":"Baseline","description":"The plan's baseline scenario: per-variable {variable_id, update:[[date, value]]} points, keyed by variable IId."}},"type":"object","required":["start_date","end_date"],"title":"PlanPost","description":"Request body for creating a plan (the shared locked base config)."},"PlanStatus":{"type":"string","enum":["draft","exploring","decided","tracking","closed"],"title":"PlanStatus","description":"Lifecycle status of a plan."},"PlanTarget":{"properties":{"variable_id":{"type":"integer","title":"Variable Id","description":"Target variable IId."},"predicted":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Predicted","description":"Predicted point value."},"q_low":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Q Low","description":"Lower quantile, if available."},"q_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Q High","description":"Upper quantile, if available."}},"type":"object","required":["variable_id"],"title":"PlanTarget","description":"A predicted target value for a plan/candidate."},"PlanTotals":{"properties":{"spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend"},"predicted_kpi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Predicted Kpi"},"roas":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roas"},"improvement_vs_baseline":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Improvement Vs Baseline"}},"type":"object","title":"PlanTotals","description":"Headline totals for a plan/candidate."},"PlanVariableData":{"properties":{"variable_id":{"type":"integer","title":"Variable Id","description":"Variable IId."},"values":{"items":{"prefixItems":[{"type":"string","format":"date-time"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Values","description":"Ordered [date, value] points for this variable."}},"type":"object","required":["variable_id","values"],"title":"PlanVariableData","description":"Per-variable, per-date allocation values."},"Plans":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths."},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"Goal":{"$ref":"#/components/schemas/PlanGoal"},"Status":{"$ref":"#/components/schemas/PlanStatus"},"StartDate":{"type":"string","format":"date-time","title":"Startdate"},"EndDate":{"type":"string","format":"date-time","title":"Enddate"},"Country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"Region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"Grouping":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grouping"},"DataSetId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Datasetid"},"ActiveCandidateId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Activecandidateid","description":"Internal id of the activated candidate, if any."},"Date":{"type":"string","format":"date-time","title":"Date"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"}},"type":"object","required":["IId","Goal","Status","StartDate","EndDate","Date"],"title":"Plans","description":"Response schema for plan listing and summary views."},"PosNegNeu":{"type":"string","enum":["positive","negative","neutral"],"title":"PosNegNeu","description":"Denote it is Positive, Negative or Neutral."},"PostGraphTemplate":{"properties":{"type":{"type":"string","title":"Type"}},"additionalProperties":true,"type":"object","required":["type"],"title":"PostGraphTemplate","description":"Post get graph template from capability."},"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","title":"Originalvalue","description":"Base (ingested) value to relabel."},"OverrideValue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overridevalue","description":"Display value; null deletes the relabel."}},"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 for the model/dataset. Name will be 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"},"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."},"PredictionColumns":{"type":"string","enum":["Country","Region","Grouping","Variable","Date","Scenario","Quantile","Effect"],"title":"PredictionColumns"},"PredictionDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be 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":"Prefix for the name."},"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":{"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}},"type":"object","required":["IId","DataSet","Status","Date","Model","Fit"],"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)."},"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]},"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 to freeze at their data values instead of predicting. Dict mapping scenario names to lists of variable slugs. Advanced feature for partial forecasting."},"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":"Validate values against per-variable min/max limits.","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"}]}}]},"Price":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"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.","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":"Controll the price."},"PriorPosterior-Input":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be 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":"Prefix for the name."},"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"},"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":{"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 for the model/dataset. Name will be 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":"Prefix for the name."},"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"},"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}]},"ProjectAttributeColumns":{"properties":{"Columns":{"items":{"anyOf":[{"$ref":"#/components/schemas/ProjectColumns"},{"items":{"$ref":"#/components/schemas/ProjectColumns"},"type":"array"}]},"type":"array","minItems":1,"title":"Columns"}},"type":"object","required":["Columns"],"title":"ProjectAttributeColumns","description":"Data columns."},"ProjectColumns":{"type":"string","enum":["DataImports.Date","DataImports.DatasetName","DataImports.Kind","DataImports.UploadFilename","DataImports.Status","DataImports.UploadProgressName","DataImports.UploadTotalRows","DataImports.Validated","DataImports.Note","DataImports.Name","DataImports.Error","DataImports.ToBeDeleted","DataImports.IId","DataImports.ProjectId","DataImports.CreatorId","DataImports.External","DataSet.Selected","DataSet.Blocked","DataSet.CreatedDate","DataSet.StartDate","DataSet.EndDate","DataSet.MergeOrderBy","DataSet.Note","DataSet.Name","DataSet.Status","DataSet.Error","DataSet.ToBeDeleted","DataSet.IId","DataSet.ProjectId","DataSet.CreatorId","Graphs.Id","Graphs.Graph","Graphs.InstancesJobId","Graphs.Image","Graphs.ProjectId","Graphs.CreatorId","Variables.Id","Variables.Slug","Variables.Name","Variables.Type","Variables.Group","Variables.MinLimit","Variables.MaxLimit","Variables.IId","Variables.ProjectId","Models.JobId","Models.Selected","Models.Country","Models.Region","Models.Grouping","Models.CreatedDate","Models.Parameters","Models.Status","Models.Seed","Models.GraphInstanceId","Models.DataSetId","Models.Note","Models.Name","Models.Image","Models.ToBeDeleted","Models.IId","Models.ProjectId","Models.CreatorId","Models.start_end_train_date","Models.start_end_eval_date","Models.start_end_date","Models.modelling_combination","SimulationJobs.JobId","SimulationJobs.AdditionalConfig","SimulationJobs.ModelId","SimulationJobs.Status","SimulationJobs.Date","SimulationJobs.ScenarioStartDate","SimulationJobs.ScenarioEndDate","SimulationJobs.Quantiles","SimulationJobs.Seed","SimulationJobs.SimulationResultLocation","SimulationJobs.S3BucketConfigId","SimulationJobs.CandidateId","SimulationJobs.Origin","SimulationJobs.DataSetId","SimulationJobs.OptimizationId","SimulationJobs.Note","SimulationJobs.Name","SimulationJobs.Image","SimulationJobs.ToBeDeleted","SimulationJobs.IId","SimulationJobs.ProjectId","SimulationJobs.CreatorId","SimulationJobs.modelling_combination","PredictionJobs.JobId","PredictionJobs.AdditionalConfig","PredictionJobs.Date","PredictionJobs.ModelId","PredictionJobs.ModelFitId","PredictionJobs.Status","PredictionJobs.Quantiles","PredictionJobs.FreezeNodes","PredictionJobs.TargetNodes","PredictionJobs.StartDate","PredictionJobs.EndDate","PredictionJobs.Seed","PredictionJobs.PredictionResultLocation","PredictionJobs.S3BucketConfigId","PredictionJobs.CandidateId","PredictionJobs.Origin","PredictionJobs.DataSetId","PredictionJobs.Note","PredictionJobs.Name","PredictionJobs.Image","PredictionJobs.ToBeDeleted","PredictionJobs.IId","PredictionJobs.ProjectId","PredictionJobs.CreatorId","PredictionJobs.modelling_combination","Attribution.JobId","Attribution.StartDate","Attribution.EndDate","Attribution.PredictedTargetsAsData","Attribution.Status","Attribution.FitModelId","Attribution.Date","Attribution.DataSetId","Attribution.ModelId","Attribution.ReferencePointFallback","Attribution.Quantiles","Attribution.Seed","Attribution.RetrospectiveEffectLocation","Attribution.S3BucketConfigId","Attribution.RetrospectiveEffectHasGroup","Attribution.Note","Attribution.Name","Attribution.Image","Attribution.ToBeDeleted","Attribution.IId","Attribution.ProjectId","Attribution.CreatorId","Attribution.modelling_combination","AttributionSet.Selected","AttributionSet.CreatedDate","AttributionSet.RetrospectiveEffectLocation","AttributionSet.S3BucketConfigId","AttributionSet.RetrospectiveEffectHasGroup","AttributionSet.DataSetId","AttributionSet.Name","AttributionSet.Note","AttributionSet.Status","AttributionSet.Error","AttributionSet.ToBeDeleted","AttributionSet.IId","AttributionSet.ProjectId","AttributionSet.CreatorId","OptimizationJobs.JobId","OptimizationJobs.AdditionalConfig","OptimizationJobs.Date","OptimizationJobs.DataSetId","OptimizationJobs.ModelId","OptimizationJobs.Status","OptimizationJobs.Params","OptimizationJobs.TargetResult","OptimizationJobs.Loss","OptimizationJobs.ConstraintLoss","OptimizationJobs.ConstraintViolation","OptimizationJobs.BaselineTarget","OptimizationJobs.BaselineTargetResult","OptimizationJobs.Improvement","OptimizationJobs.Seed","OptimizationJobs.OptimizationResultLocation","OptimizationJobs.S3BucketConfigId","OptimizationJobs.CandidateId","OptimizationJobs.Origin","OptimizationJobs.Name","OptimizationJobs.Note","OptimizationJobs.Error","OptimizationJobs.ToBeDeleted","OptimizationJobs.IId","OptimizationJobs.ProjectId","OptimizationJobs.CreatorId","OptimizationJobs.modelling_combination","ResponseCurveJobs.JobId","ResponseCurveJobs.Date","ResponseCurveJobs.DataSetId","ResponseCurveJobs.ModelId","ResponseCurveJobs.Status","ResponseCurveJobs.Quantiles","ResponseCurveJobs.Seed","ResponseCurveJobs.ResponseCurveResultLocation","ResponseCurveJobs.S3BucketConfigId","ResponseCurveJobs.Name","ResponseCurveJobs.Note","ResponseCurveJobs.Error","ResponseCurveJobs.ToBeDeleted","ResponseCurveJobs.IId","ResponseCurveJobs.ProjectId","ResponseCurveJobs.CreatorId"],"title":"ProjectColumns"},"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"}]}},"type":"object","required":["DataImports","DataSet","Models","SimulationJobs","PredictionJobs","Attribution","AttributionSet"],"title":"ProjectResources","description":"Schema for project resources."},"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"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"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"}},"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"},"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"}},"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."},"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."},"ResponseCurve":{"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"},"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":{"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 for the model/dataset. Name will be 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":"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."},"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":"Validate values against per-variable min/max limits.","default":false}},"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"}]},"ResultColumnsRequest":{"properties":{"Columns":{"items":{"anyOf":[{"$ref":"#/components/schemas/comnav__utils__filters__DataColumns"},{"items":{"$ref":"#/components/schemas/comnav__utils__filters__DataColumns"},"type":"array"}]},"type":"array","minItems":1,"title":"Columns"},"Filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Filters","description":"\n        Usage:\n        result_filters='{\"Country\" : [[ \"contains\", \"UKR\"]]}'\n        "}},"type":"object","required":["Columns"],"title":"ResultColumnsRequest","description":"Schema for distinct columns request."},"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."},"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"}],"default":{"mean":0.1,"std":0.2}},"shared":{"type":"boolean","title":"Shared","description":"Should the effect be shared betwwen 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":"Controll the season."},"SimulationAttribution":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be 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"},"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."},"SimulationColumns":{"type":"string","enum":["Country","Region","Grouping","Variable","Date","Type","Quantile","Effect"],"title":"SimulationColumns"},"SimulationDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name for the model/dataset. Name will be 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":"Prefix for the name."},"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":{"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"}},"type":"object","required":["IId","DataSet","Status","Date","Model"],"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."},"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]},"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":"Validate values against per-variable min/max limits.","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"},"IsScenario":{"type":"boolean","title":"Isscenario"}},"type":"object","required":["Variable","Date","Value","IsScenario"],"title":"SimulationUpdateVariable","description":"Updated variables for simulation jobs."},"SkipSchemaT":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"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 aswell as\"\n        \" a total revenue node, these nodes will be possible to see in \"\n        \"the dashboards etc.","default":false},"profit_nodes":{"type":"boolean","title":"Profit Nodes","description":"For sales KPI's add individual profit nodes aswell as\"\n        \" a total profit node, these nodes will be possible to see in the \"\n        \"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","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"],"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"}]},"TenantDetailed":{"properties":{"name":{"type":"string","title":"Name"},"max_projects":{"type":"integer","title":"Max Projects"},"projects_count":{"type":"integer","title":"Projects Count"},"ready":{"type":"boolean","title":"Ready"}},"type":"object","required":["name","max_projects","projects_count","ready"],"title":"TenantDetailed","description":"Schema for tenant response.","examples":[{"max_projects":10,"name":"acme-corp","projects_count":3,"ready":true}]},"Trend":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}}},"type":"object","title":"Trend","description":"Controll the impact of sales."},"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"}},"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"}},"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"}},"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":"Parsed variable attributes (Product, Media, Campaign, etc.)"}},"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"}}]},"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."},"VariableHistValues":{"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":"Parsed variable attributes (Product, Media, Campaign, etc.)"},"updates":{"items":{"$ref":"#/components/schemas/DateValue"},"type":"array","title":"Updates"}},"type":"object","required":["IId","Slug","Name","Type","Group","updates"],"title":"VariableHistValues","description":"Schema for variable updates.","examples":[{"Group":"Sales","IId":1,"Name":"Health Units Sold","Slug":"file-sales-product-health-metric-units_sold","Type":"Sales","updates":[{"Date":"2024-01-15T10:30:00","Value":100.0}]}]},"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)."},"VariableList":{"properties":{"data":{"additionalProperties":{"items":{"type":"string"},"type":"array","minItems":1},"propertyNames":{"$ref":"#/components/schemas/Dataset"},"type":"object","title":"Data","description":"Provide list of variables and its data source"}},"type":"object","required":["data"],"title":"VariableList","description":"Schema for variable list inputs."},"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."},"VariableScenarioValue":{"properties":{"scenario":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},{"type":"null"}],"title":"Scenario"}},"type":"object","title":"VariableScenarioValue","description":"Schema for updated variable values for scenario."},"VariableStatsExtended":{"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":"Parsed variable attributes (Product, Media, Campaign, etc.)"},"sum":{"type":"number","title":"Sum"},"min":{"type":"number","title":"Min"},"max":{"type":"number","title":"Max"},"std":{"type":"number","title":"Std"},"mean":{"anyOf":[{"type":"number"},{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Mean"},"sec_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sec Min"},"sec_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sec Max"}},"type":"object","required":["IId","Slug","Name","Type","Group","sum","min","max","std","mean"],"title":"VariableStatsExtended","description":"Schema for variable statistics with second value for threshold.","examples":[{"Group":"Sales","IId":1,"MaxValue":500.0,"MinValue":50.0,"Name":"Health Units Sold","OtherValues":250.0,"Slug":"file-sales-product-health-metric-units_sold","StdValue":120.5,"SumValue":10000.0,"Type":"Sales"}]},"VariableTypes":{"type":"string","enum":["Brand","CompetitorBrand","Distribution","CompetitorDistribution","Events","Macro","Media","CustomerExperience","CompetitorMedia","Sales","CompetitorPrice","Visits","Weather","Extra","Model"],"title":"VariableTypes","description":"Varaible Tyeps."},"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."},"VariablesAttribution":{"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":"Parsed variable attributes (Product, Media, Campaign, etc.)"},"attribution_response":{"anyOf":[{"$ref":"#/components/schemas/Variable-Output"},{"type":"null"}]}},"type":"object","required":["IId","Slug","Name","Type","Group"],"title":"VariablesAttribution","description":"Schema for variable of attribution data.","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"}}]},"Visits":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"default":{"mean":0.1,"std":0.2}},"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":"Controll the visits variabels."},"Weather":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}]},"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":"Controll the visits variabels."},"_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"},"comnav__api__rest__attribution__jobs__DataColumns":{"type":"string","enum":["Country","Region","Grouping","Variable","Response","Date","Type","Quantile","StartDate","EndDate"],"title":"DataColumns"},"comnav__api__rest__prior_posterior__DataColumns":{"type":"string","enum":["Id","Variable","Quantile","Effect","Target","Type","PriorPosteriorId","ProjectId"],"title":"DataColumns"},"comnav__schemas__request__DistinctColumnsBody_DataColumns___1":{"properties":{"Columns":{"items":{"anyOf":[{"$ref":"#/components/schemas/comnav__api__rest__attribution__jobs__DataColumns"},{"items":{"$ref":"#/components/schemas/comnav__api__rest__attribution__jobs__DataColumns"},"type":"array"}]},"type":"array","title":"Columns","description":"List of columns to get distinct values."}},"type":"object","required":["Columns"],"title":"DistinctColumnsBody[DataColumns]"},"comnav__schemas__request__DistinctColumnsBody_DataColumns___2":{"properties":{"Columns":{"items":{"anyOf":[{"$ref":"#/components/schemas/comnav__api__rest__prior_posterior__DataColumns"},{"items":{"$ref":"#/components/schemas/comnav__api__rest__prior_posterior__DataColumns"},"type":"array"}]},"type":"array","title":"Columns","description":"List of columns to get distinct values."}},"type":"object","required":["Columns"],"title":"DistinctColumnsBody[DataColumns]"},"comnav__utils__filters__DataColumns":{"type":"string","enum":["Brand.Brand","Brand.Metric","Brand.Country","Brand.Region","Brand.Grouping","Brand.InsertDate","Brand.Id","Brand.Date","Brand.Value","Brand.ProjectId","Brand.VarId","CompetitorBrand.Brand","CompetitorBrand.Metric","CompetitorBrand.Competitor","CompetitorBrand.Country","CompetitorBrand.Region","CompetitorBrand.Grouping","CompetitorBrand.InsertDate","CompetitorBrand.Id","CompetitorBrand.Date","CompetitorBrand.Value","CompetitorBrand.ProjectId","CompetitorBrand.VarId","Distribution.Product","Distribution.Channel","Distribution.Country","Distribution.Region","Distribution.Grouping","Distribution.InsertDate","Distribution.Id","Distribution.Date","Distribution.Value","Distribution.ProjectId","Distribution.VarId","CompetitorDistribution.Product","CompetitorDistribution.Channel","CompetitorDistribution.Competitor","CompetitorDistribution.Country","CompetitorDistribution.Region","CompetitorDistribution.Grouping","CompetitorDistribution.InsertDate","CompetitorDistribution.Id","CompetitorDistribution.Date","CompetitorDistribution.Value","CompetitorDistribution.ProjectId","CompetitorDistribution.VarId","Events.StartDate","Events.EndDate","Events.Event","Events.Country","Events.Region","Events.Grouping","Events.InsertDate","Events.Id","Events.ProjectId","Events.VarId","Macro.Indicator","Macro.Country","Macro.Region","Macro.Grouping","Macro.InsertDate","Macro.Id","Macro.Date","Macro.Value","Macro.ProjectId","Macro.VarId","Media.Product","Media.Media","Media.Campaign","Media.Metric","Media.Channel","Media.Format","Media.Device","Media.TargetGroup","Media.Creative","Media.Category","Media.Country","Media.Region","Media.Grouping","Media.InsertDate","Media.Id","Media.Date","Media.Value","Media.ProjectId","Media.VarId","CustomerExperience.Product","CustomerExperience.Channel","CustomerExperience.Investment","CustomerExperience.Country","CustomerExperience.Region","CustomerExperience.Grouping","CustomerExperience.InsertDate","CustomerExperience.Id","CustomerExperience.Date","CustomerExperience.ProjectId","CustomerExperience.VarId","CompetitorMedia.Product","CompetitorMedia.Media","CompetitorMedia.Investment","CompetitorMedia.Competitor","CompetitorMedia.Campaign","CompetitorMedia.Channel","CompetitorMedia.Country","CompetitorMedia.Region","CompetitorMedia.Grouping","CompetitorMedia.InsertDate","CompetitorMedia.Id","CompetitorMedia.Date","CompetitorMedia.ProjectId","CompetitorMedia.VarId","Sales.Product","Sales.Metric","Sales.Country","Sales.Region","Sales.Grouping","Sales.InsertDate","Sales.Id","Sales.Date","Sales.ProjectId","Sales.Value","Sales.VarId","CompetitorPrice.Product","CompetitorPrice.Competitor","CompetitorPrice.PricePerUnit","CompetitorPrice.Country","CompetitorPrice.Region","CompetitorPrice.Grouping","CompetitorPrice.InsertDate","CompetitorPrice.Id","CompetitorPrice.Date","CompetitorPrice.ProjectId","CompetitorPrice.VarId","Visits.Channel","Visits.Visits","Visits.Country","Visits.Region","Visits.Grouping","Visits.InsertDate","Visits.Id","Visits.Date","Visits.ProjectId","Visits.VarId","Weather.Indicator","Weather.Country","Weather.Region","Weather.Grouping","Weather.InsertDate","Weather.Id","Weather.Date","Weather.ProjectId","Weather.Value","Weather.VarId","Extra.Variable","Extra.Category","Extra.Country","Extra.Region","Extra.Grouping","Extra.InsertDate","Extra.Id","Extra.Date","Extra.ProjectId","Extra.Value","Extra.VarId"],"title":"DataColumns"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"security":[{"HTTPBearer":[]}]}