{"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.d2wibi.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.d2wibi.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","maximum":2147483647,"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","parameters":[{"name":"strip_unknown_fields","in":"query","required":false,"schema":{"type":"boolean","description":"Have the engine drop node fields their node type does not define instead of rejecting the graph. Applies to this request only. Off by default: an unknown field is almost always a typo or a stale client. Only meant for replaying a graph stored before the engine validated node fields.","default":false,"title":"Strip Unknown Fields"},"description":"Have the engine drop node fields their node type does not define instead of rejecting the graph. Applies to this request only. Off by default: an unknown field is almost always a typo or a stale client. Only meant for replaying a graph stored before the engine validated node fields."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Graph"}}}},"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}/{project_id}/simulations/status":{"get":{"tags":["Simulations"],"summary":"Get the status of several simulations","description":"Status and drun JobId of up to 100 simulations by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_simulations_status_projects__team_id___project_id__simulations_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/JobStatus"},"title":"Response Get Simulations Status Projects  Team Id   Project Id  Simulations Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/predictions/status":{"get":{"tags":["Predictions"],"summary":"Get the status of several predictions","description":"Status and drun JobId of up to 100 predictions by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_predictions_status_projects__team_id___project_id__predictions_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/JobStatus"},"title":"Response Get Predictions Status Projects  Team Id   Project Id  Predictions Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/optimizations/status":{"get":{"tags":["Optimizations"],"summary":"Get the status of several optimizations","description":"Status and drun JobId of up to 100 optimizations by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_optimizations_status_projects__team_id___project_id__optimizations_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/JobStatus"},"title":"Response Get Optimizations Status Projects  Team Id   Project Id  Optimizations Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributions/status":{"get":{"tags":["Attributions"],"summary":"Get the status of several attributions","description":"Status and drun JobId of up to 100 attributions by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_attributions_status_projects__team_id___project_id__attributions_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/JobStatus"},"title":"Response Get Attributions Status Projects  Team Id   Project Id  Attributions Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/status":{"get":{"tags":["Attribution Sets"],"summary":"Get the status of several attributionset","description":"Status and drun JobId of up to 100 attributionset by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_attributionset_status_projects__team_id___project_id__attributionset_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/TaskStatus"},"title":"Response Get Attributionset Status Projects  Team Id   Project Id  Attributionset Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curve/status":{"get":{"tags":["Response Curves"],"summary":"Get the status of several response_curve","description":"Status and drun JobId of up to 100 response_curve by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_response_curve_status_projects__team_id___project_id__response_curve_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/JobStatus"},"title":"Response Get Response Curve Status Projects  Team Id   Project Id  Response Curve Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/prior_posterior/status":{"get":{"tags":["Prior Posterior"],"summary":"Get the status of several prior_posterior","description":"Status and drun JobId of up to 100 prior_posterior by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_prior_posterior_status_projects__team_id___project_id__prior_posterior_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/JobStatus"},"title":"Response Get Prior Posterior Status Projects  Team Id   Project Id  Prior Posterior Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/status":{"get":{"tags":["Models"],"summary":"Get the status of several models","description":"Status and drun JobId of up to 100 models by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_models_status_projects__team_id___project_id__models_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/JobStatus"},"title":"Response Get Models Status Projects  Team Id   Project Id  Models Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads/status":{"get":{"tags":["Data Uploads"],"summary":"Get the status of several datauploads","description":"Status and drun JobId of up to 100 datauploads by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_datauploads_status_projects__team_id___project_id__datauploads_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/TaskStatus"},"title":"Response Get Datauploads Status Projects  Team Id   Project Id  Datauploads Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/status":{"get":{"tags":["LiveModels"],"summary":"Get the status of several live_models","description":"Status and drun JobId of up to 100 live_models by IId, for polling running jobs. Ids that are deleted, in another project or do not exist are left out of the result.","operationId":"get_live_models_status_projects__team_id___project_id__live_models_status_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":"ids","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{1,18}(,\\d{1,18})*$","description":"Comma-separated IIds, at most 100","examples":["1,2,3"],"title":"Ids"},"description":"Comma-separated IIds, at most 100"},{"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/LiveModelJobStatus"},"title":"Response Get Live Models Status Projects  Team Id   Project Id  Live Models Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/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.\n\nEach project's own row (see `response.ProjectDetail`) plus, with\n`with_scope`, its scope: distinct countries, regions, groupings and sales\nproducts, computed in the page query (see `_scope_columns`). None of\nthe other cross-table aggregates (active models, dataset metrics,\nper-market segment counts) are needed to pick a project out of a list,\nand computing them per page row isn't free. Use\n`/projects/{team_id}/{project_id}/resources` for those once a project is\nchosen.","operationId":"list_projects_projects__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"Sort order, format 'field:(asc|desc)'. field ∈ {name, created, last_used} (legacy: Name, CreatedDate, LastUsedDate).","default":"created:asc","title":"Sort"},"description":"Sort order, format 'field:(asc|desc)'. field ∈ {name, created, last_used} (legacy: Name, CreatedDate, LastUsedDate)."},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter projects by name (case-insensitive partial match)","title":"Name"},"description":"Filter projects by name (case-insensitive partial match)"},{"name":"with_scope","in":"query","required":false,"schema":{"type":"boolean","description":"Also return each project's countries, regions, groupings and products. Off by default: they cost four subqueries per page row.","default":false,"title":"With Scope"},"description":"Also return each project's countries, regions, groupings and products. Off by default: they cost four subqueries per page row."},{"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_ProjectListItem_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project","description":"Get a project info.\n\nDeliberately just the project's own row (see `response.ProjectDetail`):\n`AsyncProjectSessDep` already fetched it for team/project-scope validation,\nso there's no second query to make here. Cross-table aggregates (active\ndataset/model, spend/sales totals, etc.) live on `list_projects` and\n`/projects/{team_id}/{project_id}/resources` instead.\n\nA cache hit is served by `ManagedRoute` before `AsyncProjectSessDep` (or any\nother dependency) runs, so it opens no DB session at all -- see\n`invalidate_cached_project_routes` for how writes keep this from going\nstale beyond `_PROJECT_CACHE_TTL_SECONDS`.","operationId":"get_project_projects__team_id___project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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/ProjectDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project","description":"Delete a project.","operationId":"delete_project_projects__team_id___project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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.\n\nAdding response curve groups tops up the active models' missing curves in\nthe background.","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}/response_curves/coverage":{"get":{"tags":["Projects"],"summary":"Get Project Curve Coverage","description":"Which project-group inputs the curves of the project's models lack.\n\nOne entry per model, covered or not: the project's active models and the\nmodels its active attribution set reads curves from under\nresponse_curve_source, each once. Lists the response_curve_groups and\ninput variables the model's curves do not cover, and whether a curve job\nfor it is running.","operationId":"get_project_curve_coverage_projects__team_id___project_id__response_curves_coverage_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/ModelCurveCoverage"},"title":"Response Get Project Curve Coverage Projects  Team Id   Project Id  Response Curves Coverage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/response_curves/top_up":{"post":{"tags":["Projects"],"summary":"Top Up Project Curves","description":"Top up the curves of the project's models with their missing group inputs.\n\nCovers the models `GET .../response_curves/coverage` lists. Each model\nmissing curves gets one job adding them (its default curves when it has\nnone); one already computing curves, or not trained, is skipped.","operationId":"top_up_project_curves_projects__team_id___project_id__response_curves_top_up_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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedResponseCurves"}}}},"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"}}}}}},"get":{"tags":["Projects"],"summary":"Get Distinct Attributes","description":"Get distinct column value; the GET twin of `POST /distinct_attr`.\n\nA read sent as POST can never be cached by a browser or keyed by a client, so this\ntakes the columns in the query string and answers exactly as the POST does.","operationId":"get_distinct_attributes_projects__team_id___project_id__distinct_attr_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":"columns","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"},"description":"\n        One per selection. Comma-join the columns of a multi-column selection:\n        columns=Models.IId,Models.Name - the response is keyed by that same string.\n        ","title":"Columns"},"description":"\n        One per selection. Comma-join the columns of a multi-column selection:\n        columns=Models.IId,Models.Name - the response is keyed by that same string.\n        "},{"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"}}],"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}/seed":{"post":{"tags":["Projects"],"summary":"Seed Project","description":"Seed the project with a completed upload/dataset/model + result jobs.\n\nNot reachable unless `ALLOW_PROJECT_SEEDING` is set - this writes\nfabricated \"completed\" jobs straight into the project's tables/s3,\nbypassing drun, and must never run against production data.","operationId":"seed_project_projects__team_id___project_id__seed_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SeedProjectRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datauploads":{"post":{"tags":["Data Uploads"],"summary":"Upload Data","description":"Upload a data file.\n\nThe file should be in CSV, Excel, or Gzip format.","operationId":"upload_data_projects__team_id___project_id__datauploads_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_name","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Dataset"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom name, unique within the project: a taken name returns 409, send `prefix` instead to get a free one. Autogenerated if empty.","title":"Name"},"description":"Custom name, unique within the project: a taken name returns 409, send `prefix` instead to get a free one. Autogenerated if empty."},{"name":"note","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},{"name":"prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...).","title":"Prefix"},"description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"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\nRows carry the upload's ``MinDate`` / ``MaxDate``; pass\n``with_variable_ids`` for the ids of the variables it holds, or\n``with_variables`` for the variables themselves. All three read the config\nrows written at ingest; a COMPLETE upload with none yet is seeded on its\nfirst read. Uploads that are not COMPLETE, or are deleted, carry no dates\nor variables.\n\nParameters:\n- filters : A list of filters to apply to the data uploads query.\n  The filters should be provided in JSON format. Example usage:\n  filters='{\"DataSet.Models.SimulationJobs.Name\" : [[ \"contains\", \"SimName\"]]}'\n- sess (Session): The database session to use for the query.\n- project: The project context required for the query.","operationId":"list_datauploads_projects__team_id___project_id__datauploads_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By dataset name: filters='{\"DatasetName\": [[\"=\", \"Sales\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - Recent imports: filters='{\"Date\": [[\">=\", \"2024-01-01\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By dataset name: filters='{\"DatasetName\": [[\"=\", \"Sales\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - Recent imports: filters='{\"Date\": [[\">=\", \"2024-01-01\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        "},{"name":"with_variables","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variables"}},{"name":"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /datauploads.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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":"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":{"$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":"lz_data_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"data_filters lz-string compressed, for filters too long for a URL","title":"Lz Data Filters"},"description":"data_filters lz-string compressed, for filters too long for a URL"},{"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":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value.","title":"Start Date"},"description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data.","title":"End Date"},"description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data."},{"name":"lz_data_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"data_filters lz-string compressed, for filters too long for a URL","title":"Lz Data Filters"},"description":"data_filters lz-string compressed, for filters too long for a URL"},{"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":"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":"with_combinations","in":"query","required":false,"schema":{"type":"boolean","description":"Add each variable's ``Combinations``: the (Country, Region, Grouping) combinations it has data for in this upload. They are the upload's, not narrowed by ``data_filters``.","default":false,"title":"With Combinations"},"description":"Add each variable's ``Combinations``: the (Country, Region, Grouping) combinations it has data for in this upload. They are the upload's, not narrowed by ``data_filters``."},{"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/UploadVariable"},"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":"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":{"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":"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/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":"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":"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}/datauploads/{item_id}/modelling_combinations":{"get":{"tags":["Data Uploads"],"summary":"List Dataupload Modelling Combinations","description":"List the upload's modelling combinations (Country/Region/Grouping).\n\nRead from ``DataImportModellingComb``, which the import fills with the upload's\ndistinct combinations, so this never touches the data rows — unlike\n``distinct_columns``, which copies every row into DuckDB to find them.","operationId":"list_dataupload_modelling_combinations_projects__team_id___project_id__datauploads__item_id__modelling_combinations_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","description":"Data upload scoped id","title":"Item Id"},"description":"Data upload scoped id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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":{"type":"array","items":{"type":"string"}},"title":"Response List Dataupload Modelling Combinations Projects  Team Id   Project Id  Datauploads  Item Id  Modelling Combinations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets":{"post":{"tags":["Datasets"],"summary":"Create Dataset","description":"Create a new dataset.\n\nThis endpoint allows the creation of a new dataset within a specified project.\nIt can handle both existing datasets and new data imports.","operationId":"create_dataset_projects__team_id___project_id__datasets_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /datasets.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Marketing\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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/check":{"post":{"tags":["Datasets"],"summary":"Check Dataset","description":"Check whether a dataset request's sources merge without breaking a rule.\n\nSubmits a background check and returns its id; poll\n``GET /datasets/check/{check_id}`` for the result. The uploads and source\ndatasets are checked; derivations and external datasets are not. Nothing is\ncreated besides the check.","operationId":"check_dataset_projects__team_id___project_id__datasets_check_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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":"As for POST /datasets"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCheckSubmitted"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/check/{check_id}":{"get":{"tags":["Datasets"],"summary":"Get Dataset Check","description":"A dataset merge check's status and, once COMPLETE, what it found.","operationId":"get_dataset_check_projects__team_id___project_id__datasets_check__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"integer","title":"Check Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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/DatasetCheck"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/active-history":{"get":{"tags":["Datasets"],"summary":"List Dataset Active History","description":"List the history of active dataset changes for this project.","operationId":"list_dataset_active_history_projects__team_id___project_id__datasets_active_history_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), DataSetId (=, in). Example: filters='{\"UpdatedByUser\": [[\"=\", \"alice\"]]}'","title":"Filters"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), DataSetId (=, in). Example: filters='{\"UpdatedByUser\": [[\"=\", \"alice\"]]}'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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. Refused while the dataset is active, has an active model or feeds\nthe active attribution set.","operationId":"delete_dataset_projects__team_id___project_id__datasets__dataset_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"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"}}}},"400":{"description":"Invalid request - validation error or malformed data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Datasets"],"summary":"Get Dataset","description":"Get details of a dataset.\n\nRetrieves detailed information about a specific dataset in a project,\nincluding related data imports. Carries the dataset's ``MinDate`` /\n``MaxDate`` from its cached metrics; pass ``with_variable_ids`` for the\nids of the variables it holds.","operationId":"get_dataset_projects__team_id___project_id__datasets__dataset_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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``. ``MinLimit`` / ``MaxLimit`` are the\ndataset's own bounds (``null`` when unset); ``ProjectMinLimit`` /\n``ProjectMaxLimit`` the project envelope; ``EffectiveMinLimit`` /\n``EffectiveMaxLimit`` the bound that validation enforces, ``null`` meaning\nunbounded.","operationId":"list_dataset_variable_limits_projects__team_id___project_id__datasets__dataset_id__variable_limits_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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.\n\nThe rules themselves live in ``utils.dataset.apply_dataset_variable_limits``,\nshared with the ``set_variable_limits`` MCP tool.","operationId":"patch_dataset_variable_limits_projects__team_id___project_id__datasets__dataset_id__variable_limits_patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"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}/limit_violations":{"get":{"tags":["Datasets"],"summary":"List Dataset Limit Violations","description":"List the variable segments whose data blocks the dataset.\n\nOne row per ``(Slug, Country, Region, Grouping)`` with at least one value\nstrictly below its dataset ``MinLimit`` or strictly above its ``MaxLimit``;\na null bound checks nothing. ``BelowCount`` / ``AboveCount`` count those\nvalues, ``Lowest`` / ``Highest`` give the worst of each. Sorted by the\nnumber of values outside the limits, most first, then by slug and segment.\n\nA dataset that is not ``Blocked`` answers ``[]`` without reading its data.","operationId":"list_dataset_limit_violations_projects__team_id___project_id__datasets__dataset_id__limit_violations_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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/DatasetLimitViolation"},"title":"Response List Dataset Limit Violations Projects  Team Id   Project Id  Datasets  Dataset Id  Limit Violations Get"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/variable_interpolation":{"get":{"tags":["Datasets"],"summary":"List Dataset Variable Interpolation","description":"List the interpolation chain per variable and modelling combination.\n\nA dataset that predates the feature has its config materialised with the\nderived Group/Type defaults on the way in, so the answer is always stored\ndata.","operationId":"list_dataset_variable_interpolation_projects__team_id___project_id__datasets__dataset_id__variable_interpolation_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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}/usage_counts":{"get":{"tags":["Datasets"],"summary":"Get Dataset Usage Counts","description":"Count the models and jobs built on a dataset, per kind, in total and completed.\n\nLists them: GET /models, /simulations, /predictions, /attributions or\n/attributionset with filters='{\"DataSet.IId\": [[\"=\", \"<dataset_id>\"]]}'.","operationId":"get_dataset_usage_counts_projects__team_id___project_id__datasets__dataset_id__usage_counts_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"The dataset's IId, or 'active' for the active dataset","title":"Dataset Id"},"description":"The dataset's IId, or 'active' for the 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/DataSetUsageCounts"}}}},"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":"lz_data_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"data_filters lz-string compressed, for filters too long for a URL","title":"Lz Data Filters"},"description":"data_filters lz-string compressed, for filters too long for a URL"},{"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":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value.","title":"Start Date"},"description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data.","title":"End Date"},"description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data."},{"name":"lz_data_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"data_filters lz-string compressed, for filters too long for a URL","title":"Lz Data Filters"},"description":"data_filters lz-string compressed, for filters too long for a URL"},{"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":"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/datasets/{dataset_id}/variable":{"post":{"tags":["Datasets"],"summary":"List Variables Post ","description":"List dataset variables.\n\nRetrieves available variables for a specific dataset in a project,\nformatted by the set function.","operationId":"list_variables_post__projects__team_id___project_id__datasets__dataset_id__variable_post","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"set_fn","in":"query","required":false,"schema":{"enum":["union","grouped","intersect"],"type":"string","default":"union","title":"Set Fn"}},{"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":{"type":"array","items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"},"description":"List of modelling combinations to get variables for.","title":"Combinations"},"description":"List of modelling combinations to get variables for."},{"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}/sales_economics":{"get":{"tags":["Datasets"],"summary":"Get Sales Economics","description":"Pair each product's units sold with its price, cost and profit variables.\n\nLists what a revenue or profit optimization target lacks in this dataset,\nusing the pairing the optimization submit validates against.","operationId":"get_sales_economics_projects__team_id___project_id__datasets__dataset_id__sales_economics_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"set_fn","in":"query","required":false,"schema":{"enum":["union","grouped","intersect"],"type":"string","default":"union","title":"Set Fn"}},{"name":"combinations","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"},"description":"List of modelling combinations to get variables for.","title":"Combinations"},"description":"List of modelling combinations to get variables for."},{"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/SalesEconomics"}}}},"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.\n\nWithout ``dataset_names``, the union is the combinations the dataset itself holds\n(exact when it was built with filters or from other datasets).","operationId":"list_modelling_combinations_projects__team_id___project_id__datasets__dataset_id__modelling_combinations_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"dataset_names","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Dataset Names"}},{"name":"column_names","in":"query","required":false,"schema":{"type":"array","items":{"enum":["Country","Region","Grouping"],"type":"string"},"default":["Country","Region","Grouping"],"title":"Column Names"}},{"name":"join_op","in":"query","required":false,"schema":{"enum":["union","intersect","both"],"type":"string","default":"union","title":"Join Op"}},{"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.\n\nEvery table but Events answers from ``DataSetMetricsCache``, which the\ndependency already loaded: its two dates are a MIN/MAX over ``VariableStats``,\nfrozen once the dataset is COMPLETE. Events have no ``VariableStats`` rows,\nso their ``StartDate`` / ``EndDate`` still take one query. A dataset whose\ncache is missing, or predates ``EarliestDataPointDate`` and has not been\nthrough ``backfill_dataset_variable_interpolation`` yet, scans every table.","operationId":"get_dataset_dates_min_max_projects__team_id___project_id__datasets__dataset_id__dates_min_max_get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Use the dataset scoped id or the keyword 'active' to use active dataset.","title":"Dataset Id"},"description":"Use the dataset scoped id or the keyword 'active' to use active dataset."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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 on the result columns.","operationId":"download_feature_importance_projects__team_id___project_id__importance__importance_id__data_get","parameters":[{"name":"importance_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide feature importance job IId.","title":"Importance Id"},"description":"Provide feature importance job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter feature importance result data rows.\n\n        Filterable columns: Quantile, Target, Variable, Importance.\n\n        Examples:\n        - By target: result_filters='{\"Target\": [[\"=\", \"sales\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter feature importance result data rows.\n\n        Filterable columns: Quantile, Target, Variable, Importance.\n\n        Examples:\n        - By target: result_filters='{\"Target\": [[\"=\", \"sales\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"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/all":{"get":{"tags":["Variables"],"summary":"List All Variables","description":"List all variables.\n\nThis endpoint retrieves every variable in a project as-is, with no\nfiltering, ordering, or pagination.","operationId":"list_all_variables_projects__team_id___project_id__variables_all_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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 All Variables Projects  Team Id   Project Id  Variables All Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/variables/{var_id}":{"patch":{"tags":["Variables"],"summary":"Update Varaible","description":"Update a variable.\n\nThis endpoint updates the attributes of an existing variable based on the provided\nupdate data.","operationId":"update_varaible_projects__team_id___project_id__variables__var_id__patch","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"var_id","in":"path","required":true,"schema":{"type":"integer","description":"Variable IId.","title":"Var Id"},"description":"Variable IId."},{"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. Repeating\na key within one batch is allowed and the last item wins, so a batch that\nsets and then clears the same key ends up cleared.\n\n``Sales.Metric``, ``Media.Metric``, ``Media.Channel`` and\n``CompetitorMedia.Channel`` are not relabelable — their base values are a\nfixed enum validated on import — and a non-null ``OverrideValue`` for them\nis rejected with 400. Clearing one is still allowed. A blank\n``OverrideValue`` is rejected; use null to clear.\n\nExample:\n```\n[\n  {\"Type\": \"Brand\", \"Attribute\": \"Brand\",\n   \"OriginalValue\": \"b1\", \"OverrideValue\": \"b2\"},\n  {\"Type\": \"Brand\", \"Attribute\": \"Metric\",\n   \"OriginalValue\": \"m1\", \"OverrideValue\": null}\n]\n```","operationId":"post_variable_util_overrides_projects__team_id___project_id__variable_util_overrides_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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. The locked attributes and blank-value rules of the bulk POST apply\nhere too: ``Sales.Metric``, ``Media.Metric``, ``Media.Channel`` and\n``CompetitorMedia.Channel`` accept only null.\n\nExample body for ``PATCH .../variable_util_overrides/Brand``:\n```\n{\"Brand\": {\"b1\": \"b2\"}, \"Metric\": {\"m1\": \"Volume\"}}\n```","operationId":"patch_variable_util_overrides_projects__team_id___project_id__variable_util_overrides__var_type__patch","parameters":[{"name":"var_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/VariableTypes","description":"Variable Type to relabel, e.g. 'Brand'."},"description":"Variable Type to relabel, e.g. 'Brand'."},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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}/variable_hide_plan_input":{"get":{"tags":["Variables"],"summary":"List Variable Hide Plan Input","description":"List variables hidden from plan (predict/simulate/optimize) input.","operationId":"list_variable_hide_plan_input_projects__team_id___project_id__variable_hide_plan_input_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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/VariableHidePlanInput"},"title":"Response List Variable Hide Plan Input Projects  Team Id   Project Id  Variable Hide Plan Input Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Variables"],"summary":"Post Variable Hide Plan Input","description":"Hide variables from plan (predict/simulate/optimize) input.\n\nPass a list of Variable IIds to hide. Already-hidden variables are left as-is.","operationId":"post_variable_hide_plan_input_projects__team_id___project_id__variable_hide_plan_input_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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":{"type":"integer"},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableHidePlanInput"},"title":"Response Post Variable Hide Plan Input Projects  Team Id   Project Id  Variable Hide Plan Input Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Variables"],"summary":"Delete Variable Hide Plan Input","description":"Unhide variables from plan (predict/simulate/optimize) input.","operationId":"delete_variable_hide_plan_input_projects__team_id___project_id__variable_hide_plan_input_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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":{"type":"integer"},"description":"Variable IIds to unhide.","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VariableHidePlanInput"},"title":"Response Delete Variable Hide Plan Input Projects  Team Id   Project Id  Variable Hide Plan Input Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graphs":{"get":{"tags":["Models"],"summary":"List Graphs","description":"List saved graph structures for model building.\n\nGraphs define the causal structure (nodes and edges) used for model training.\nThey can be reused across multiple models to ensure consistent methodology.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results\n      Example: '{\"Id\": [[\"=\", \"1\"]]}'\n\nResponse:\n    Paginated list of graphs with their model instances.\n\nRelated:\n    - POST /build/graphs: Save a new graph\n    - POST /build/model: Use a graph to train a model","operationId":"list_graphs_projects__team_id___project_id__build_graphs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By ID: filters='{\"Id\": [[\"=\", \"1\"]]}'\n        - By instances job: filters='{\"InstancesJobId\": [[\"isnot\", \"NULL\"]]}'\n        - Multiple IDs: filters='{\"Id\": [[\"in\", \"[1, 2, 3]\"]]}'\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results.\n\n        Examples:\n        - By ID: filters='{\"Id\": [[\"=\", \"1\"]]}'\n        - By instances job: filters='{\"InstancesJobId\": [[\"isnot\", \"NULL\"]]}'\n        - Multiple IDs: filters='{\"Id\": [[\"in\", \"[1, 2, 3]\"]]}'\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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"}}}},"409":{"description":"The requested attribution name is already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graphs/{graph_id}":{"get":{"tags":["Models"],"summary":"Get Graph","description":"Get a graph by ID.\n\nThis endpoint retrieves a graph by its ID within a specified project.\n\nResponse:\n    The graph's `nodes` and `edges`, with its `Name`, `Note`, `CreatedAt`,\n    `CreatorId`, `NodeCount` and `EdgeCount` beside them.","operationId":"get_graph_projects__team_id___project_id__build_graphs__graph_id__get","parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"integer","title":"Graph Id"}},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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. Send only\n`name` and `note` to rename or annotate it; its nodes and edges stay as\nthey are unless `graph` is sent.","operationId":"update_graph_projects__team_id___project_id__build_graphs__graph_id__patch","parameters":[{"name":"graph_id","in":"path","required":true,"schema":{"type":"integer","title":"Graph Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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"}}}},"409":{"description":"The requested attribution name is already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/model_multiple":{"post":{"tags":["Models"],"summary":"Build Multiple Models","description":"Train multiple ML models for different market segments in batch.\n\nEfficient batch training for scenarios requiring models across multiple\nmodelling combinations (country/region/grouping). All models share the\nsame graph structure and training parameters but are trained independently\non their respective data segments.\n\nUse Cases:\n    - Train models for multiple countries simultaneously\n    - Create region-specific models with consistent methodology\n    - Build product-line specific models in parallel\n\nResponse:\n    List of created model objects. Use GET /models/{model_id} to check status.\n\nNotes:\n    - Models train in parallel for efficiency\n    - Failure of one model does not affect others\n    - Use GET /models/{model_id} to check individual model status\n\nRelated:\n    - POST /build/model: Train a single model\n    - GET /models: List all models with filtering","operationId":"build_multiple_models_projects__team_id___project_id__build_model_multiple_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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"}}}},"409":{"description":"The requested attribution name is already taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/build/graph_basic":{"post":{"tags":["Models"],"summary":"Get Basic Graph","description":"Get default graph.\n\nThis endpoint generates a basic graph based on the provided request data, project,\nand session.","operationId":"get_basic_graph_projects__team_id___project_id__build_graph_basic_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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/quality":{"get":{"tags":["Models"],"summary":"Get Models Quality","description":"Batch-fetch everything the model-quality verdict needs, for many models.\n\nReplaces per-model calls to GET /models/{model_id} plus the four\nattribution metrics endpoints (group_metrics, variable_metrics, group_roi,\nvariable_roi) with a single round trip for an entire table page — showing\nthe quality column for N rows otherwise fires up to 5*N requests.\n\nThe query itself lives in `utils.model_quality`, shared with the MCP\n`get_model_quality` tool, which evaluates the verdict these rows feed.\n\nQuery Parameters:\n    - model_ids: Repeated model IId query params, e.g.\n      ?model_ids=1&model_ids=2\n\nResponse:\n    Dict keyed by model IId. Ids that don't resolve to a model in this\n    project (wrong project, deleted, unknown id) are simply absent from\n    the result rather than erroring.\n\nRelated:\n    - GET /models/{model_id}: Full model details for a single model\n    - GET /attributions/{attributionjob_id}/group_metrics: Per-model,\n      non-batched equivalent of one slice of this response","operationId":"get_models_quality_projects__team_id___project_id__models_quality_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"model_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer"},"description":"Model IIds to fetch quality-verdict inputs for.","title":"Model Ids"},"description":"Model IIds to fetch quality-verdict inputs for."},{"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":"object","additionalProperties":{"$ref":"#/components/schemas/ModelQualitySummary"},"title":"Response Get Models Quality Projects  Team Id   Project Id  Models Quality Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/response_curves":{"get":{"tags":["Response Curves"],"summary":"Get Model Response Curves","description":"The model's curves per variable, and what is computing, failed or missing.","operationId":"get_model_response_curves_projects__team_id___project_id__models__model_id__response_curves_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/ModelResponseCurves"}}}},"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"}}}}}},"post":{"tags":["Response Curves"],"summary":"Start Model Response Curves","description":"Compute the model's response curves on the platform default grid.\n\nWithout `variables` it queues the inputs in the project's\nresponse_curve_groups that the curves lack for the worker (no\n`ResponseCurveId` yet), starting nothing while curves for the model are\npending. Named variables are computed even when the\nmodel has curves for them: the new curve replaces the old. `replace`\nmakes the new curves alone the model's curves. Variables with no default\ngrid (zero throughout, or no range within their limits) are `Skipped`.","operationId":"start_model_response_curves_projects__team_id___project_id__models__model_id__response_curves_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/ModelResponseCurvesPost"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCurvesStarted"}}}},"400":{"description":"Invalid request - validation error or malformed data","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"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/response_curves/data":{"get":{"tags":["Response Curves"],"summary":"Download Model Response Curves","description":"Get the model's response curves as one file.\n\nColumns: Variable, Quantile, Response, Effect, Level, Type, Marginal,\nOperatingPoint, DataMin and DataMax (the variable's range over the\ndataset: a Level outside it is the model's extrapolation), ROI, RROI,\nEROI, CPX, mROI, mRROI, mCPX. `Marginal` is null for curves computed\nbefore marginals.","operationId":"download_model_response_curves_projects__team_id___project_id__models__model_id__response_curves_data_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":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter rows by Variable, Response, Type or Quantile.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"=\", \"media_tv_spend\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter rows by Variable, Response, Type or Quantile.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"=\", \"media_tv_spend\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"overrides","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON per-KPI economics replacing the dataset's for the money metrics: {\"<kpi slug>\": {\"Price\": 12.5, \"Profit\": 4.0}}","title":"Overrides"},"description":"JSON per-KPI economics replacing the dataset's for the money metrics: {\"<kpi slug>\": {\"Price\": 12.5, \"Profit\": 4.0}}"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"Invalid request - validation error or malformed data","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"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/response_curves/temporal":{"get":{"tags":["Response Curves"],"summary":"Download Model Response Curves Temporal","description":"Get the temporal response curves of the model as one CSV file.","operationId":"download_model_response_curves_temporal_projects__team_id___project_id__models__model_id__response_curves_temporal_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":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Filter rows by Variable, Response, Type or Quantile.","title":"Result Filters"},"description":"Filter rows by Variable, Response, Type or Quantile."},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"Invalid request - validation error or malformed data","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"}}}}}}},"/api/projects/{team_id}/{project_id}/models":{"get":{"tags":["Models"],"summary":"List Models","description":"List all trained models in the project with optional filtering.\n\nReturns a paginated list of models, useful for finding trained models\nto use in predictions, simulations, or optimizations.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results\n      Example: '{\"Status\": [[\"=\", \"COMPLETED\"]], \"Country\": [[\"=\", \"USA\"]]}'\n\nResponse:\n    Paginated list of models.\n\nRelated:\n    - GET /models/{model_id}: Get full model details\n    - POST /build/model: Train a new model\n    - POST /models/{model_id}/activate: Set as active model","operationId":"list_models_projects__team_id___project_id__models_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By country: filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By name pattern: filters='{\"Name\": [[\"ilike\", \"%Q4%\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Active models only: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By related dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Combined: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n        - Best name match first:\n          filters='{\"Name\": [[\"ilike\", \"%Q4%\"], [\"orderbyrelevance\", \"Q4\"]]}'\n          orderbyrelevance takes the raw term, not a LIKE pattern.\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By country: filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By name pattern: filters='{\"Name\": [[\"ilike\", \"%Q4%\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Active models only: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By related dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Combined: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n        - Best name match first:\n          filters='{\"Name\": [[\"ilike\", \"%Q4%\"], [\"orderbyrelevance\", \"Q4\"]]}'\n          orderbyrelevance takes the raw term, not a LIKE pattern.\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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_ListedModels_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Models"],"summary":"Bulk Delete Models","description":"Bulk delete models matching the given filters.\n\nMarks all matching models for deletion and publishes delete messages to\nRabbitMQ concurrently in the background via a single DB round-trip each.\nActive models and models with active attribution sets are excluded.","operationId":"bulk_delete_models_projects__team_id___project_id__models_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /models.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By country: filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /models.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By country: filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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 find its fit prediction and attribution.\n\nPath Parameters:\n    - model_id: The IId of the model to retrieve\n\nResponse:\n    Detailed model object with its fit jobs and performance metrics.\n\nRelated:\n    - GET /models/{model_id}/usage_counts: How many jobs ran on this model\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"}}}},"409":{"description":"Another model in the project already has this name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/usage_counts":{"get":{"tags":["Models"],"summary":"Get Model Usage Counts","description":"Count the jobs run on a model, per kind, in total and completed.\n\nLists them: GET /simulations, /predictions, /optimizations or /attributions\nwith filters='{\"Model.IId\": [[\"=\", \"<model_id>\"]]}'.","operationId":"get_model_usage_counts_projects__team_id___project_id__models__model_id__usage_counts_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/ModelUsageCounts"}}}},"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    - Starts the model's default response curves when it has none and\n      none are being computed\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 the variables a scenario can change on a model.\n\nThe model's input nodes, as dataset slugs — the vocabulary for a\nsimulation's `updated_values` and an optimization's `opt_nodes`. Not\nevery variable the model touches.","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 the variables a model predicts.\n\nThe model's result nodes, as dataset slugs — the vocabulary for an\noptimization's `targets.variables`, and the names its results come back\nunder.","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 a model's target nodes, as dataset slugs.\n\nDespite the name this returns Variables, never the graph's node ids —\nthose stay inside the engine boundary (see `db.models.ModelNodes`).","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}/models/{model_id}/node_map":{"get":{"tags":["Models"],"summary":"Node Map","description":"Map a renamed graph node's own variable to the one it stands for.\n\nA result file names its rows by graph node id, and `utils.variables.\npush_variables` registers every id it finds as a `Type=Model` variable of\nits own. So a node the graph renamed ends up with two Variables rows: the\none it is named after, and the one it actually means. Both sides here are\nIIds.\n\nOnly renamed nodes appear — for the rest the two rows are the same one.\nSo does a node no result file has named yet: it has no variable of its own\nto key on, and no caller can be holding an IId that was never issued.","operationId":"node_map_projects__team_id___project_id__models__model_id__node_map_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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":"object","additionalProperties":{"type":"integer"},"title":"Response Node Map Projects  Team Id   Project Id  Models  Model Id  Node Map Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/models/{model_id}/node_slugs":{"get":{"tags":["Models"],"summary":"Node Slugs","description":"Map each renamed node id in the model's results to its dataset slug.\n\nUnrenamed nodes are left out, so `{}` means nothing to translate.","operationId":"node_slugs_projects__team_id___project_id__models__model_id__node_slugs_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the Model IId","title":"Model Id"},"description":"Provide the Model IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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":"object","additionalProperties":{"type":"string"},"title":"Response Node Slugs Projects  Team Id   Project Id  Models  Model Id  Node Slugs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/model_target_nodes":{"get":{"tags":["Models"],"summary":"Project Model Target Nodes","description":"Get the distinct target Variables across all models in a project.\n\nReturns the union of Variables flagged ``TargetNode=True`` in any\nnon-deleted model that belongs to the given project.","operationId":"project_model_target_nodes_projects__team_id___project_id__model_target_nodes_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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":{"$ref":"#/components/schemas/ModelRefitRequest","default":{"model_param":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30},"model_detail":{"activate":false}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"}}}},"400":{"description":"Invalid refit request: source model not completed, invalid configuration, or dataset incompatible with model graph","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Source model not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/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":{"type":"array","items":{"$ref":"#/components/schemas/GroupedModelList"},"title":"Response Get Grouped Model List Projects  Team Id   Project Id  Modelinfo Grouped List Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models":{"post":{"tags":["LiveModels"],"summary":"Create Live Model","description":"Create an express model from its config and fitted artifact, in one request.\n\nA model and its fit arrive together, so there is no state in which a row\nexists without one - the orphaned half-built model is not a case to handle,\nit is unreachable. The row is inserted before the artifact upload and the\ntransaction only commits once the bytes are stored, so a failed upload\nleaves nothing behind.\n\n``ConfigHash`` and ``ArtifactHash`` are computed server-side over the\ncanonical (RFC 8785) config and the actual artifact bytes; a client-claimed\n``X-Content-SHA256`` for the artifact that disagrees is a 400.\n``dataset_id`` and ``parent_id`` are IIds, resolved within the project, and\n``Version`` is the parent's plus one.","operationId":"create_live_model_projects__team_id___project_id__live_models_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-content-sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Content-Sha256"}},{"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_create_live_model_projects__team_id___project_id__live_models_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedLiveModels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["LiveModels"],"summary":"List Live Models","description":"List the project's express models (paginated, excludes soft-deleted).","operationId":"list_live_models_projects__team_id___project_id__live_models_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_LiveModels_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}":{"get":{"tags":["LiveModels"],"summary":"Get Live Model","description":"Get an express model with its config, hashes, and provenance columns.","operationId":"get_live_model_projects__team_id___project_id__live_models__live_model_id__get","parameters":[{"name":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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/DetailedLiveModels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["LiveModels"],"summary":"Patch Live Model","description":"Rename or re-note an express model.\n\nName and note are the whole mutable surface. Config, dataset, artifact and\nlineage are fixed at creation - they are what the hashes bind - so a model\nthat needs a different one of those is a different model: create it, with\n`parent_id` set to this one.","operationId":"patch_live_model_projects__team_id___project_id__live_models__live_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":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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/LiveModelPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedLiveModels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["LiveModels"],"summary":"Delete Live Model","description":"Soft-delete an express model; artifacts and results clean up in background.","operationId":"delete_live_model_projects__team_id___project_id__live_models__live_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":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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}/live_models/{live_model_id}/artifact":{"get":{"tags":["LiveModels"],"summary":"Get Live Model Artifact","description":"Download the FittedModel msgpack artifact.","operationId":"get_live_model_artifact_projects__team_id___project_id__live_models__live_model_id__artifact_get","parameters":[{"name":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}/param_densities":{"put":{"tags":["LiveModels"],"summary":"Put Live Model Param Densities","description":"Upload the per-parameter prior-vs-posterior density curves.\n\nThese are a derived *view* of the fit, not part of it: the builder computes\nthem from the fit's param registry and uploads them so the details page can\nrender the same panel without running a wasm engine.\n\nWrite-once, like everything else a hash on this row binds. A model whose\nsave never attached one, or attached a blob a later reader cannot use, is\nserved by `POST .../param_densities/recover`, which rebuilds them from the\nartifact rather than trusting a second upload to describe the same fit.","operationId":"put_live_model_param_densities_projects__team_id___project_id__live_models__live_model_id__param_densities_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":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel IId"},{"name":"x-content-sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Content-Sha256"}},{"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/DetailedLiveModels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["LiveModels"],"summary":"Get Live Model Param Densities","description":"Download the per-parameter prior-vs-posterior density curves.","operationId":"get_live_model_param_densities_projects__team_id___project_id__live_models__live_model_id__param_densities_get","parameters":[{"name":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}/param_densities/recover":{"post":{"tags":["LiveModels"],"summary":"Recover Live Model Param Densities","description":"Rebuild the parameter-density sidecar from the stored artifact.\n\nFor a model whose save never attached one - saved before the sidecar existed, or\nsaved from a session that had loaded a fitted artifact and so had no parameter\nregistry to collect. Rebuilds the same blob the browser would have written, from the\nmodel's own config, its dataset rows over the fit window, and the artifact.\n\nThe engine refuses inputs that do not regenerate the artifact's DSL, so this either\nproduces the fit's real priors or fails - it never produces plausible wrong ones.\n\nWrite-once like `PUT`, and for the same reason: `ParamDensitiesHash` is a column\nof an otherwise immutable row. A rebuild that reproduces the stored bytes is a\nno-op; one that does not is a 409 unless `force=true`, because \"the sidecar this\nmodel has is not the one its artifact produces\" is a fact worth surfacing rather\nthan overwriting.","operationId":"recover_live_model_param_densities_projects__team_id___project_id__live_models__live_model_id__param_densities_recover_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":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel IId"},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}},{"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/DetailedLiveModels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}/portables":{"post":{"tags":["LiveModels"],"summary":"Add Live Model Portable","description":"Append a baked portable .wasm build.\n\nAppending is always legal, and re-baking never overwrites: a result binds\nthe engine hash it ran, so that engine has to stay resolvable for replay.\nThe newest build is the one ops dispatch to.\n\nRe-posting identical bytes is a no-op rather than an error - the key is the\ndigest, so it would rewrite the same object with the same content, and a\nretried upload is not a client mistake worth a 409.","operationId":"add_live_model_portable_projects__team_id___project_id__live_models__live_model_id__portables_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":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel IId"},{"name":"x-content-sha256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Content-Sha256"}},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedLiveModels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}/portable":{"get":{"tags":["LiveModels"],"summary":"Get Live Model Portable","description":"Download the newest baked portable .wasm (verify X-Content-SHA256 client-side).\n\nThe newest build, because that is the one an op would dispatch to. Older\nbuilds are not addressable here: they exist so replay can resolve the engine\na past result ran, which happens server-side.","operationId":"get_live_model_portable_projects__team_id___project_id__live_models__live_model_id__portable_get","parameters":[{"name":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}/op_spec":{"post":{"tags":["LiveModels"],"summary":"Post Live Model Op Spec","description":"The complete op(s) a browser run should execute.\n\nReturns the rows, their dates, the op itself and the `input_hash` that op\nbinds — everything the browser needs to run exactly what the server would\nrun, and nothing it has to reconstruct. The submit path rebuilds the same op\nfrom the same builder and refuses a result whose `browser_input_hash`\ndisagrees, so agreement is checked rather than assumed.\n\nA `predict_multi` body (prediction, simulation) gets one op; a body\ncarrying `curve_inputs` gets one op per curve input over the same rows.\n\nThis replaced a GET that returned only `data`/`dates`/`variables` and left\nthe browser to assemble the op params itself. The two assemblies were\nseparate implementations of one contract and had already drifted — the\nbrowser filtered scenario overrides by a different rule than\n`scenario_overrides`, and pairing the returned `variables` with a narrowing\n`target_nodes` was an unavoidable 422.","operationId":"post_live_model_op_spec_projects__team_id___project_id__live_models__live_model_id__op_spec_post","parameters":[{"name":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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/OpSpecRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OpSpecResponse"},{"$ref":"#/components/schemas/ResponseCurveOpSpecResponse"}],"title":"Response Post Live Model Op Spec Projects  Team Id   Project Id  Live Models  Live Model Id  Op Spec Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}/results":{"post":{"tags":["LiveModels"],"summary":"Save Browser Result","description":"Save a browser-computed result after validating its envelope (SPEC §3).\n\nThe result bytes are uploaded; the rows it ran on are named, not sent.\n`meta.input` records the dataset, combination and window to read them back\nfrom, which is what a replay uses to check the claimed `input_hash`.","operationId":"save_browser_result_projects__team_id___project_id__live_models__live_model_id__results_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":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel IId"},{"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_save_browser_result_projects__team_id___project_id__live_models__live_model_id__results_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveModelResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["LiveModels"],"summary":"List Results","description":"List an express model's results (paginated, excludes soft-deleted).","operationId":"list_results_projects__team_id___project_id__live_models__live_model_id__results_get","parameters":[{"name":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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":"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_LiveModelResults_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}/results/{result_id}/verify":{"post":{"tags":["LiveModels"],"summary":"Verify Result","description":"Flip a completed result to PENDING and enqueue replay verification.\n\nTakes no body: the mode is derived from what the result is (exact replay\nfor a portable predict, tolerant otherwise) and the tolerances are the\nreplay worker's defaults. No caller ever chose differently, and a knob\nnothing turns is only a way to submit a verification that lies.","operationId":"verify_result_projects__team_id___project_id__live_models__live_model_id__results__result_id__verify_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":"result_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModelResult IId","title":"Result Id"},"description":"Provide the LiveModelResult IId"},{"name":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel IId"},{"name":"x-user-id","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveModelResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/fits":{"post":{"tags":["LiveModels"],"summary":"Create Live Model By Fit","description":"Fit a new express model on the server.\n\nInserts the row this fit will fill and submits the job in one request. The\nrow is FITTING: it carries the config and lineage the fit was asked for, and\nnothing else until the result lands, at which point it becomes READY with\nits artifact - or FAILED, kept so the error is readable.\n\nThere is no \"fit an existing model\". A fit is what makes a model, so fitting\ndifferent data or a different config produces a different model; pass\n`parent_id` to record which one it succeeds.\n\nThe rows are read from `dataset_id` here and never stored.","operationId":"create_live_model_by_fit_projects__team_id___project_id__live_models_fits_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/LiveModelFitPost"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedLiveModels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/live_models/{live_model_id}/materialize":{"post":{"tags":["LiveModels"],"summary":"Materialize Live Model","description":"Materialize, or fail the model rather than leave it half-usable.\n\nEvery op dispatches on the materialized `Models` row - `POST /predictions`\nand friends read `Models.LiveModelId` to decide which engine runs - so a\nmodel that cannot be materialized can run nothing. It is marked FAILED\ninstead of sitting READY and refusing every op it is asked for.\n\nA model is never repaired: the way to get a working one is to save again,\nwhich creates a new model, so there is nothing here to retry into.\n\nOnly an unexpected failure fails the model. An `HTTPException` is the\nrequest being wrong, not the model - a rejected body, a combination this\nproject does not have, or a second click landing on the advisory lock while\nthe first request materializes successfully. Failing on those turned a\ndouble-click into a permanently unusable model.","operationId":"materialize_live_model_projects__team_id___project_id__live_models__live_model_id__materialize_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":"live_model_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide the LiveModel IId","title":"Live Model Id"},"description":"Provide the LiveModel 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/MaterializeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveModelMaterialized"}}}},"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, orderbyrelevance, similarity\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - By scenario dates: filters='{\"ScenarioStartDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Recent simulations: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - With notes only: filters='{\"Note\": [[\"isnot\", \"NULL\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        - Name search: filters='{\"Name\": [[\"similarity\", \"scenario analysis\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /simulations.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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.\n\nAnswered from the recorded statistics of the stored result.","operationId":"get_simulation_dates_min_max_projects__team_id___project_id__simulations__simulation_id__dates_min_max_get","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide simulation IId","title":"Simulation Id"},"description":"Provide simulation IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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 (dataset slug)\n    - Effect: Simulated value\n    - Quantile: Uncertainty percentile\n    - Type: \"BaseScenario\" or \"Scenario\" (for comparison)\n    - Date: Forecast date\n    - Country/Region/Grouping: Geographic dimensions (if applicable)\n\nRelated:\n    - GET /simulations/{simulation_id}: Check job status first\n    - GET /simulations/{simulation_id}/variables: List available variables","operationId":"download_simulation_projects__team_id___project_id__simulations__simulation_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"simulation_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide simulation IId","title":"Simulation Id"},"description":"Provide simulation IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"\n        Filter the simulation result data rows (not the job metadata).\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - Scenario vs baseline: result_filters='{\"Type\": [[\"=\", \"Scenario\"]]}'\n        - Combined: result_filters='{\"Type\": [[\"=\", \"BaseScenario\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter the simulation result data rows (not the job metadata).\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - Scenario vs baseline: result_filters='{\"Type\": [[\"=\", \"Scenario\"]]}'\n        - Combined: result_filters='{\"Type\": [[\"=\", \"BaseScenario\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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, orderbyrelevance, similarity\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - By date: filters='{\"StartDate\": [[\">=\", \"2024-01-01\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Exclude failed: filters='{\"Status\": [[\"notin\", \"[\\\"FAILED\\\"]\"]]}'\n        - Sort newest first: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n        - Fuzzy name search: filters='{\"Name\": [[\"similarity\", \"Q4 forecast\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /predictions.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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.\n\nAnswered from the recorded statistics of the stored result.","operationId":"get_prediction_dates_min_max_projects__team_id___project_id__predictions__prediction_id__dates_min_max_get","parameters":[{"name":"prediction_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide prediction IId","title":"Prediction Id"},"description":"Provide prediction IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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 (dataset slug)\n    - Effect: Predicted value\n    - Quantile: Uncertainty percentile (matches requested quantiles)\n    - Scenario: Scenario name (from updated_values)\n    - Date: Forecast date\n    - Country/Region/Grouping: Geographic dimensions (if applicable)\n\nRelated:\n    - GET /predictions/{prediction_id}: Check job status first\n    - GET /predictions/{prediction_id}/variables: List available variables","operationId":"download_prediction_projects__team_id___project_id__predictions__prediction_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"prediction_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide prediction IId","title":"Prediction Id"},"description":"Provide prediction IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter the prediction result data rows (not the job metadata).\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By scenario: result_filters='{\"Scenario\": [[\"=\", \"Baseline\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter the prediction result data rows (not the job metadata).\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"sales\"]]}'\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By scenario: result_filters='{\"Scenario\": [[\"=\", \"Baseline\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - Recent jobs: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Sort by date: filters='{\"Date\": [[\"orderby\", \"desc\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /attributions.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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.\nShares `create_attribution` with `POST /attributions`, so everything that\nroute does applies here too: `seed` and `auto_activate` are honoured, an\nexpress model's attribution is submitted inline without a task, the dataset's\nvariable limits are seeded before the job is registered, and a blocked\ndataset or a baseline outside those limits is refused on a strict project\nor with `validate_limits`, and returned in `LimitWarnings` otherwise.","operationId":"submit_attribution_from_job_projects__team_id___project_id__attributions_from_job_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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. Variable and Response are dataset slugs.","operationId":"download_attribution_projects__team_id___project_id__attributions__attributionjob_id__data_get","parameters":[{"name":"attributionjob_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide attribution job IId.","title":"Attributionjob Id"},"description":"Provide attribution job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter attribution result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By response: result_filters='{\"Response\": [[\"=\", \"sales\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter attribution result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By response: result_filters='{\"Response\": [[\"=\", \"sales\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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. A renamed node lists its dataset variable;\n`node_ids=true` lists the variable registered under its node id instead.","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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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, circular reference, or an attribution created from a simulation/prediction/optimization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Attribution Sets"],"summary":"List Attribution Sets","description":"List all attribution sets in the project with optional filtering.\n\nReturns a paginated list of attribution sets, useful for finding\navailable dashboard views or auditing attribution history.\n\nQuery Parameters:\n    - filters: JSON filter expressions to narrow results\n      Example: '{\"Status\": [[\"=\", \"COMPLETE\"]], \"Selected\": [[\"=\", true]]}'\n\nResponse:\n    Paginated list of attribution sets.\n\nRelated:\n    - GET /attributionset/{attributionset_id}: Get full details\n    - POST /attributionset: Create a new attribution set","operationId":"list_attribution_sets_projects__team_id___project_id__attributionset_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"with_variable_ids","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"With Variable Ids"}},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - Active sets only: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - Recent sets: filters='{\"CreatedDate\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - Active sets only: filters='{\"Selected\": [[\"=\", \"true\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - Recent sets: filters='{\"CreatedDate\": [[\">=\", \"2024-10-01\"]]}'\n        - By dataset: filters='{\"DataSet.Name\": [[\"contains\", \"Marketing\"]]}'\n        - Sort by date: filters='{\"CreatedDate\": [[\"orderby\", \"desc\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /attributionset.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"complete\"]]}'\n        - By name: filters='{\"Name\": [[\"contains\", \"Q4\"]]}'\n        - By date: filters='{\"CreatedDate\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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 ordered by start date to avoid double-counting.\n\nUse Case:\n    When you have multiple attributions with overlapping time periods\n    (e.g., monthly attributions that overlap at boundaries), this endpoint\n    orders them so the earlier one wins each overlap.\n\nDate Alignment Logic:\n    - Attributions are sorted by start date\n    - For each (Country, Region, Grouping, Date) that several attributions\n      cover, the one that starts earlier contributes all of its effects\n      there and the others contribute none\n    - Dates or segments only a later attribution covers come from it\n\nResponse:\n    Returns the created attribution set.\n\nRelated:\n    - POST /attributionset: Create without automatic date alignment","operationId":"create_attribution_set_align_dates_projects__team_id___project_id__attributionset_align_dates_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"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, circular reference, or an attribution created from a simulation/prediction/optimization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Project is in read-only state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/active-history":{"get":{"tags":["Attribution Sets"],"summary":"List Attribution Set Active History","description":"List the history of active attribution set changes for this project.","operationId":"list_attribution_set_active_history_projects__team_id___project_id__attributionset_active_history_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), AttributionSetId (=, in). Example: filters='{\"UpdatedByUser\": [[\"=\", \"alice\"]]}'","title":"Filters"},"description":"JSON filter expressions. Filterable fields: UpdatedAt (>=, <=), UpdatedByUser (=, contains), AttributionSetId (=, in). Example: filters='{\"UpdatedByUser\": [[\"=\", \"alice\"]]}'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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}/node_slugs":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Node Slugs","description":"Map each renamed node id in the set's results to its dataset slug.\n\nMerged across the set's models. When they map one node id to different\nslugs, 409 with those ids in `detail.node_ids` rather than guess.","operationId":"get_attribution_set_node_slugs_projects__team_id___project_id__attributionset__attributionset_id__node_slugs_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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":"object","additionalProperties":{"type":"string"},"title":"Response Get Attribution Set Node Slugs Projects  Team Id   Project Id  Attributionset  Attributionset Id  Node Slugs Get"}}}},"404":{"description":"Attribution set not found with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/attributionset/{attributionset_id}/dates_min_max":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Dates Min Max","description":"Get min and max dates from attribution results within this attribution set.","operationId":"get_attribution_set_dates_min_max_projects__team_id___project_id__attributionset__attributionset_id__dates_min_max_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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}/response_curves/coverage":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Curve Coverage","description":"Which project-group inputs the curves of the set's models lack.\n\nOne entry per model the project's response_curve_source values the set's\nperiods on (`active` for the project's active set), covered or not: the\nproject's response_curve_groups and input variables its curves do not\ncover, and whether a curve job for it is running. `POST\n/models/{ModelId}/response_curves` computes a model's missing ones.","operationId":"get_attribution_set_curve_coverage_projects__team_id___project_id__attributionset__attributionset_id__response_curves_coverage_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":{"type":"array","items":{"$ref":"#/components/schemas/ModelCurveCoverage"},"title":"Response Get Attribution Set Curve Coverage Projects  Team Id   Project Id  Attributionset  Attributionset Id  Response Curves Coverage Get"}}}},"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}/response_curves":{"get":{"tags":["Attribution Sets"],"summary":"Get Attribution Set Response Curves","description":"The response curves behind an attribution set, per period.\n\nOne entry per combination of the set (`active` for the project's active\nset), with segments of dates each valued on one model's response curves:\nits curve rows with marginal and money metrics, as\n`GET /models/{id}/response_curves/data` returns them. A source model\nwithout curves falls back to the active model, flagged on its segment. A\nmodel without curves gives null data.","operationId":"get_attribution_set_response_curves_projects__team_id___project_id__attributionset__attributionset_id__response_curves_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":"groups","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Variable groups to keep, repeated or comma separated, e.g. groups=Media&groups=CompetitorMedia; either spelling of a group (CompetitorMedia, Competitor_media) selects both","title":"Groups"},"description":"Variable groups to keep, repeated or comma separated, e.g. groups=Media&groups=CompetitorMedia; either spelling of a group (CompetitorMedia, Competitor_media) selects both"},{"name":"overrides","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON per-KPI economics replacing the dataset's for the money metrics: {\"<kpi slug>\": {\"Price\": 12.5, \"Profit\": 4.0}}","title":"Overrides"},"description":"JSON per-KPI economics replacing the dataset's for the money metrics: {\"<kpi slug>\": {\"Price\": 12.5, \"Profit\": 4.0}}"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseCurveSource"},{"type":"null"}],"description":"source_model values each period on the model that produced it, active on the combination's active model; omitted takes the project's response_curve_source","title":"Source"},"description":"source_model values each period on the model that produced it, active on the combination's active model; omitted takes the project's response_curve_source"},{"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/AttributionSetResponseCurves"},"title":"Response Get Attribution Set Response Curves Projects  Team Id   Project Id  Attributionset  Attributionset Id  Response Curves Get"}}}},"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}/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; a node id the set's models map to\n      different variables stays as the engine named it\n    - Response: Target KPI slug\n    - Effect: Attributed impact value\n    - Date: Time period\n    - Quantile: Uncertainty percentile\n    - Group: Variable group category\n    - Type: Variable type\n    - Country/Region/Grouping: Geographic dimensions\n\nRelated:\n    - GET /attributionset/{attributionset_id}/variables: List available variables\n    - GET /attributionset/{attributionset_id}/parquet_data: Get Parquet format","operationId":"download_attribution_set_projects__team_id___project_id__attributionset__attributionset_id__data_get","parameters":[{"name":"attributionset_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"description":"Provide attribution set IId or use 'active'","title":"Attributionset Id"},"description":"Provide attribution set IId or use 'active'"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter attribution result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By response type: result_filters='{\"Response\": [[\"=\", \"sales\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter attribution result data rows.\n\n        Examples:\n        - By country: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        - Multiple: result_filters='{\"Country\": [[\"in\", \"[\\\"USA\\\", \\\"GBR\\\"]\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By response type: result_filters='{\"Response\": [[\"=\", \"sales\"]]}'\n        - Combined: result_filters='{\"Country\": [[\"=\", \"USA\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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. A renamed node lists its dataset variable;\n`node_ids=true` lists the variable registered under its node id instead.","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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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, orderbyrelevance, similarity\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Multiple filters create OR logic.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By model ID: filters='{\"Model.IId\": [[\"=\", \"42\"]]}'\n        - Recent optimizations: filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By improvement: filters='{\"Improvement\": [[\">=\", \"0.1\"]]}'\n        - High performers: filters='{\"TargetResult\": [[\">=\", \"100000\"]]}'\n        - Sort by improvement: filters='{\"Improvement\": [[\"orderby\", \"desc\"]]}'\n        - Name search: filters='{\"Name\": [[\"similarity\", \"budget optimization\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance, similarity\n        "},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size","default":50,"title":"Size"},"description":"Page size"},{"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"USA_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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.\n\nAnswered from the recorded statistics of the stored result.","operationId":"get_optimization_dates_min_max_projects__team_id___project_id__optimizations__optimization_id__dates_min_max_get","parameters":[{"name":"optimization_id","in":"path","required":true,"schema":{"type":"integer","description":"Provide optimization IId","title":"Optimization Id"},"description":"Provide optimization IId"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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        Filterable columns are Date, Variable, Value and VarTable.Type;\n        anything else is rejected. The result holds one value per variable\n        per date, with no market-segment columns of its own.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media_spend\"]]}'\n        - By date: result_filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By type: result_filters='{\"VarTable.Type\": [[\"=\", \"Media\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter optimization result data rows.\n\n        Filterable columns are Date, Variable, Value and VarTable.Type;\n        anything else is rejected. The result holds one value per variable\n        per date, with no market-segment columns of its own.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media_spend\"]]}'\n        - By date: result_filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By type: result_filters='{\"VarTable.Type\": [[\"=\", \"Media\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"lz_result_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"result_filters lz-string compressed, for long filters","title":"Lz Result Filters"},"description":"result_filters lz-string compressed, for long filters"},{"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        Filterable columns are Date, Variable, Value and VarTable.Type;\n        anything else is rejected. The result holds one value per variable\n        per date, with no market-segment columns of its own.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media_spend\"]]}'\n        - By date: result_filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By type: result_filters='{\"VarTable.Type\": [[\"=\", \"Media\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter optimization result data rows.\n\n        Filterable columns are Date, Variable, Value and VarTable.Type;\n        anything else is rejected. The result holds one value per variable\n        per date, with no market-segment columns of its own.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media_spend\"]]}'\n        - By date: result_filters='{\"Date\": [[\">=\", \"2024-10-01\"]]}'\n        - By type: result_filters='{\"VarTable.Type\": [[\"=\", \"Media\"]]}'\n        "},{"name":"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}/predictions/{prediction_id}/response_curves":{"get":{"tags":["Plan Response"],"summary":"Prediction Response Curves","description":"Curves, per-period spend and units to value the prediction's plan on.\n\nReturns the model's response curve rows for the plan's Media variables,\neach layer's per-period spend as the run used it (long format) and each\nrow's unit. Curves the model lacks are listed in `Missing` (POST\nstarts them) or `Computing` while a job for the model runs. Variables that\ncannot get curves are in `Unavailable`, with why. 400 while the run is not\ncompleted.","operationId":"prediction_response_curves_projects__team_id___project_id__predictions__prediction_id__response_curves_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/PlanCurves"}}}},"400":{"description":"Prediction job not in COMPLETED status - poll status first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"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"}}}}}},"post":{"tags":["Plan Response"],"summary":"Start Prediction Response Curves","description":"Start the curves the prediction's plan lacks, then read as GET does.","operationId":"start_prediction_response_curves_projects__team_id___project_id__predictions__prediction_id__response_curves_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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanCurves"}}}},"400":{"description":"Prediction job not in COMPLETED status - poll status first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"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}/simulations/{simulation_id}/response_curves":{"get":{"tags":["Plan Response"],"summary":"Simulation Response Curves","description":"Curves, per-period spend and units to value the simulation's plan on.\n\nAs the prediction's: the baseline and scenario layers, `Missing` curves\nstarted by POST. 400 while the run is not completed.","operationId":"simulation_response_curves_projects__team_id___project_id__simulations__simulation_id__response_curves_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/PlanCurves"}}}},"400":{"description":"Simulation job not in COMPLETED status - poll status first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"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"}}}}}},"post":{"tags":["Plan Response"],"summary":"Start Simulation Response Curves","description":"Start the curves the simulation's plan lacks, then read as GET does.","operationId":"start_simulation_response_curves_projects__team_id___project_id__simulations__simulation_id__response_curves_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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanCurves"}}}},"400":{"description":"Simulation job not in COMPLETED status - poll status first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"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}/optimizations/{optimization_id}/response_curves":{"get":{"tags":["Plan Response"],"summary":"Optimization Response Curves","description":"Curves, per-period spend and units to value the optimization's plan on.\n\nAs the prediction's: the baseline and optimized layers, plus `Bounds`, each\nrow's min and max summed over `BoundDates` (the optimization's date subset,\nnull for its whole window). 400 while the run is not completed.","operationId":"optimization_response_curves_projects__team_id___project_id__optimizations__optimization_id__response_curves_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/PlanCurves"}}}},"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"}}}}}},"post":{"tags":["Plan Response"],"summary":"Start Optimization Response Curves","description":"Start the curves the optimization's plan lacks, then read as GET does.","operationId":"start_optimization_response_curves_projects__team_id___project_id__optimizations__optimization_id__response_curves_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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanCurves"}}}},"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}/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. Jobs computing a model's\nown curves are left out unless include_model_jobs is set.","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":"include_model_jobs","in":"query","required":false,"schema":{"type":"boolean","description":"Also list the jobs computing models' own response curves (Origin model), which GET /models/{model_id}/response_curves serves","default":false,"title":"Include Model Jobs"},"description":"Also list the jobs computing models' own response curves (Origin model), which GET /models/{model_id}/response_curves serves"},{"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.\nJobs holding a model's current curves are excluded.","operationId":"bulk_delete_response_curves_projects__team_id___project_id__response_curve_delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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. A job holding a\nmodel's current curves is refused.","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":{}}}},"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}/response_curve/{curve_id}/dates_min_max":{"get":{"tags":["Response Curves"],"summary":"Get Response Curve Dates Min Max","description":"Get min and max dates from temporal curve result data.\n\nA job with no stored result, or none with temporal rows (every job predating\nthe temporal curves), answers ``{null, null}`` rather than raising.","operationId":"get_response_curve_dates_min_max_projects__team_id___project_id__response_curve__curve_id__dates_min_max_get","parameters":[{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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\nColumns: Variable, Quantile, Response, Effect, Level, Type, Marginal\n(dEffect/dLevel, null for jobs computed before marginals), OperatingPoint\n(true on the row at the variable's mean for default-grid inputs) and the\nmoney metrics ROI, RROI, EROI, CPX, mROI, mRROI, mCPX (null for variables\nthat are not investments). Variable and Response are dataset slugs.","operationId":"download_response_curve_projects__team_id___project_id__response_curve__curve_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter response curve result data rows.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter response curve result data rows.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"overrides","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON per-KPI economics replacing the dataset's for the money metrics: {\"<kpi slug>\": {\"Price\": 12.5, \"Profit\": 4.0}}","title":"Overrides"},"description":"JSON per-KPI economics replacing the dataset's for the money metrics: {\"<kpi slug>\": {\"Price\": 12.5, \"Profit\": 4.0}}"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"overrides","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON per-KPI economics replacing the dataset's for the money metrics: {\"<kpi slug>\": {\"Price\": 12.5, \"Profit\": 4.0}}","title":"Overrides"},"description":"JSON per-KPI economics replacing the dataset's for the money metrics: {\"<kpi slug>\": {\"Price\": 12.5, \"Profit\": 4.0}}"},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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. Variable and Response are dataset slugs.","operationId":"get_temporal_csv_output_projects__team_id___project_id__response_curve__curve_id__temporal_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"curve_id","in":"path","required":true,"schema":{"type":"integer","description":"Response curve job IId.","title":"Curve Id"},"description":"Response curve job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter response curve data rows.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"=\", \"media_tv_spend\"]]}'\n        - Multiple: result_filters='{\"Variable\": [[\"in\", \"[\\\"media_tv\\\"]\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter response curve data rows.\n\n        Examples:\n        - By variable: result_filters='{\"Variable\": [[\"=\", \"media_tv_spend\"]]}'\n        - Multiple: result_filters='{\"Variable\": [[\"in\", \"[\\\"media_tv\\\"]\"]]}'\n        "},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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, orderbyrelevance\n        ","title":"Filters"},"description":"\n        JSON filter expressions to narrow results. Same syntax as GET /.\n\n        Examples:\n        - By status: filters='{\"Status\": [[\"=\", \"COMPLETED\"]]}'\n        - By model: filters='{\"Model.Name\": [[\"contains\", \"US_Model\"]]}'\n        - By date: filters='{\"Date\": [[\"<\", \"2024-01-01\"]]}'\n\n        Operators: =, !=, >, >=, <, <=, contains, startswith, endswith,\n        ilike, in, notin, is, isnot, orderby, orderbyrelevance\n        "},{"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. Variable and Target are dataset slugs.","operationId":"download_prior_posterior_projects__team_id___project_id__prior_posterior__prior_posterior_id__data_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"prior_posterior_id","in":"path","required":true,"schema":{"type":"integer","description":"Prior vs posterior job IId.","title":"Prior Posterior Id"},"description":"Prior vs posterior job IId."},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"result_filters","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"\n        Filter prior/posterior result data rows.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By distribution type: result_filters='{\"Type\": [[\"=\", \"posterior\"]]}'\n        ","title":"Result Filters"},"description":"\n        Filter prior/posterior result data rows.\n\n        Examples:\n        - By quantile: result_filters='{\"Quantile\": [[\"=\", \"50\"]]}'\n        - By variable: result_filters='{\"Variable\": [[\"contains\", \"media\"]]}'\n        - By distribution type: result_filters='{\"Type\": [[\"=\", \"posterior\"]]}'\n        "},{"name":"output_format","in":"query","required":false,"schema":{"enum":["csv","parquet"],"type":"string","default":"csv","title":"Output Format"}},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids.","default":false,"title":"Node Ids"},"description":"true answers in the engine's own names: a renamed graph node's id (e.g. `sales_kpi`) instead of its dataset slug in Variable, Response and Target, and filters match those ids."},{"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":"project_id","in":"path","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":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/lineage/{kind}/{iid}":{"get":{"tags":["Lineage"],"summary":"Get Lineage","description":"Upstream and downstream objects of one object, of the kinds the caller reads.\n\nReturns:\n    The lineage graph rooted at the object, bridged over hidden kinds.\n\nRaises:\n    HTTPException: If the object does not exist.","operationId":"get_lineage_projects__team_id___project_id__lineage__kind___iid__get","parameters":[{"name":"kind","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LineageKind"}},{"name":"iid","in":"path","required":true,"schema":{"type":"integer","title":"Iid"}},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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/LineageGraph"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Lineage"],"summary":"Cascade Delete Lineage","description":"Delete one object and everything built on it.\n\nForcing past active objects needs the delete permission of each one's kind.\n\nReturns:\n    The objects that were deleted, or a 409 with the preview that blocked it.\n\nRaises:\n    HTTPException: 403 if forcing needs delete permissions the caller lacks.","operationId":"cascade_delete_lineage_projects__team_id___project_id__lineage__kind___iid__delete","parameters":[{"name":"kind","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LineageKind"}},{"name":"iid","in":"path","required":true,"schema":{"type":"integer","title":"Iid"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}},{"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/LineageDeletePreview"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineageDeleteBlocked"}}},"description":"Conflict"},"503":{"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/projects/{team_id}/{project_id}/lineage/{kind}/{iid}/delete-preview":{"post":{"tags":["Lineage"],"summary":"Preview Lineage Delete","description":"What a cascade delete of one object would remove.\n\nReturns:\n    The objects the delete removes and the active ones blocking it.","operationId":"preview_lineage_delete_projects__team_id___project_id__lineage__kind___iid__delete_preview_post","parameters":[{"name":"kind","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LineageKind"}},{"name":"iid","in":"path","required":true,"schema":{"type":"integer","title":"Iid"}},{"name":"project_id","in":"path","required":true,"schema":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Use project Id or slug","title":"Project Id"},"description":"Use project Id or slug"},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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/LineageDeletePreview"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/{team_id}":{"post":{"tags":["Templates"],"summary":"Create Template","description":"Create a template.\n\nThis endpoint creates a new template based on the provided request data.","operationId":"create_template_templates__team_id__post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","description":"Use team id","title":"Team Id"},"description":"Use team id"},{"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/activity/{team_id}":{"get":{"tags":["Activity"],"summary":"List Team Activity","description":"Newest-first activity across the team's projects.\n\nJob submissions and dataset/model/attribution-set (de)activations, with who\ndid it and when.\n\nJobs submitted before v1.155.0 carry the creation time of the resource they\nran on once the ``backfill_task_created_at`` background job has reached\nthem; until then, and for the few with nothing to backfill from, they are\nleft out. Deleted projects are left out.\n\nOnly what the caller can open in the UI: a resource whose\n``create:comnav:<resource>`` grant they lack is left out, with its\n(de)activations and the jobs it created (a fit's predictions and\nattributions, an optimization's simulations, a simulation's or a\nprediction's attributions). A superuser holds every grant.\n\nRaises:\n    HTTPException: 503 when the teams service cannot say what the caller holds.","operationId":"list_team_activity_activity__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":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this user's activity.","title":"User Id"},"description":"Only this user's activity."},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only this project.","title":"Project Id"},"description":"Only this project."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`next_cursor` of the previous page; omit for the newest.","title":"Cursor"},"description":"`next_cursor` of the previous page; omit for the newest."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"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/ActivityPage"}}}},"503":{"description":"Service Unavailable"},"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.\n\nA scoped access token is checked as an ordinary member, never as a\nsuperadmin, and within what the token holds.","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"}},{"name":"X-Access-Token-Id","in":"header","required":false,"schema":{"title":"X-Access-Token-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams":{"get":{"tags":["Teams"],"summary":"List ","description":"List or search for multiple teams.\n\nA scoped access token lists every team its user is a member of, whatever\nits scope, and never a superadmin's view of every team.","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"}},{"name":"X-Access-Token-Id","in":"header","required":false,"schema":{"title":"X-Access-Token-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.d2wibi.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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/me/permissions":{"get":{"tags":["Teams"],"summary":"My Permissions","description":"Every permission the caller holds, keyed by team id.\n\nThe membership grant of `service.grants.member_grants`, which is what\n`api.permission_check._check_permissions` allows in each team.\n\nA superuser holds the owner grant in every team, unioned over whatever\ntheir own membership grants them there, with the team's blocked\npermissions not subtracted. That is what `_resolve_access` does: it\nresolves superadmin status whether or not a membership exists, and\nanswers 204 before `_check_permissions` runs.\n\nA scoped access token holds only the teams in its scope, each limited to\nwhat the token holds there and tokens may hold at all, with no superadmin\nunion, as the forward-auth check allows it.","operationId":"my_permissions_teams_me_permissions_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"}},{"name":"X-Access-Token-Id","in":"header","required":false,"schema":{"title":"X-Access-Token-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/MyPermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/me/superuser":{"get":{"tags":["Teams"],"summary":"My Superuser Status","description":"Whether the caller is a platform superuser, which a scoped token never is.","operationId":"my_superuser_status_teams_me_superuser_get","parameters":[{"name":"X-User-Id","in":"header","required":false,"schema":{"title":"X-User-Id"}},{"name":"X-Access-Token-Id","in":"header","required":false,"schema":{"title":"X-Access-Token-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SuperuserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/me/permission_groups":{"get":{"tags":["Teams"],"summary":"My Permission Groups","description":"The token permission groups the caller can grant a new access token.\n\nTeam groups for every team the caller is a member of and that isn't\nsuspended, within the membership's grant, and per team the permissions\ntoken creation adds there by itself. Account groups in full for a session\nor a full-access token. A scoped token offers only what it holds, since it\ncan only create a token narrower than itself.","operationId":"my_permission_groups_teams_me_permission_groups_get","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}},{"name":"X-Access-Token-Id","in":"header","required":false,"schema":{"title":"X-Access-Token-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/PermissionGroupsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/GetCurrentTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/TeamUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/TeamWithMemberships"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/ntfy-token":{"get":{"tags":["Teams"],"summary":"Get Ntfy Token","description":"Get a short-lived ntfy token for the team's job status notifications.\n\nThe token can subscribe to the team's topics only. It is cached until just\nbefore it expires, so a new one is issued about once per TTL per team. If\nntfy is rate limiting or down, a cached token is still returned; without one\nthe request fails with a 503 and `Retry-After`.","operationId":"get_ntfy_token_teams__team_id__ntfy_token_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/NtfyTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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.d2wibi.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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/Invitation"}}},"description":"Created"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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 the users domain.","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.d2wibi.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.d2wibi.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.d2wibi.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.d2wibi.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.d2wibi.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.d2wibi.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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/permissions":{"get":{"tags":["Permissions"],"summary":"Get Permission Names","description":"Get every permission and role name the deployed config defines.\n\nThe names come from `PERMISSIONS_CONFIG` and `ROLES_CONFIG`, loaded once at\nboot. The UI generates its own name lists from the same files and compares\nthem with this answer in dev to catch a stale copy.","operationId":"get_permission_names_permissions_get","parameters":[{"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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/PermissionNames"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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.d2wibi.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.d2wibi.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.d2wibi.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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/Invitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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.d2wibi.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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/UserInvitation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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.d2wibi.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.d2wibi.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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/CurrentBannerMessage"}}}}}}},"/team/teams/{team_id}/sso/connections":{"get":{"tags":["SSO"],"summary":"List Connections","description":"List the team's SSO connections, without their IdP config.","operationId":"list_connections_teams__team_id__sso_connections_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoConnection"},"title":"Response List Connections Teams  Team Id  Sso Connections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["SSO"],"summary":"Create Connection","description":"Create an SSO connection with no IdP config yet.\n\nThe response carries the values the customer enters into their IdP;\nthe IdP config follows in a PATCH once they have it.","operationId":"create_connection_teams__team_id__sso_connections_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoConnectionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/sso/connections/{connection_id}":{"get":{"tags":["SSO"],"summary":"Get Connection","description":"Get an SSO connection with its IdP config, secrets excluded.","operationId":"get_connection_teams__team_id__sso_connections__connection_id__get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SSO"],"summary":"Update Connection","description":"Update an SSO connection, its IdP config, or whether it is enabled.","operationId":"update_connection_teams__team_id__sso_connections__connection_id__patch","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"X-User-Id","in":"header","required":true,"schema":{"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoConnectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SSO"],"summary":"Delete Connection","description":"Delete an SSO connection and its Logto connector.\n\nMembers who joined through it stay in the team.","operationId":"delete_connection_teams__team_id__sso_connections__connection_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/sso/connections/{connection_id}/domains":{"post":{"tags":["SSO"],"summary":"Add Domain","description":"Claim an email domain for an SSO connection.\n\nA domain belongs to at most one connection across all teams.","operationId":"add_domain_teams__team_id__sso_connections__connection_id__domains_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoDomainCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/sso/connections/{connection_id}/domains/{domain}":{"delete":{"tags":["SSO"],"summary":"Remove Domain","description":"Release an email domain from an SSO connection.","operationId":"remove_domain_teams__team_id__sso_connections__connection_id__domains__domain__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}},{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}},{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"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.d2wibi.my.id/v1/team/openapi.json#/components/schemas/SsoConnection"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/team/teams/{team_id}/mfa_enforcement":{"put":{"tags":["MFA"],"summary":"Update Mfa Enforcement","description":"Require MFA from every member of the team, or stop requiring it.\n\nEnabling is refused unless the caller is compliant themselves, so they\ncannot lock themselves out.","operationId":"update_mfa_enforcement_teams__team_id__mfa_enforcement_put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/MfaEnforcementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/MfaEnforcement"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/team/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/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.d2wibi.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":{"type":"string","minLength":1,"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"https://api.d2wibi.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.d2wibi.my.id/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Access Token"],"summary":"Create User Token","description":"Create a scoped user token.\n\nEach team must be one the user is a member of and that isn't suspended,\nwith permissions the membership grants there, and every permission must be\none a token may hold. A group requiring another needs that group's read\nlevel in the same team. `read:team` is added to every team, and so are the\nimplied permissions of what was asked for, as far as the membership and a\ncalling scoped token hold them. A scoped token can only create a token\nnarrower than itself.","operationId":"create_user_token_access_tokens_post","parameters":[{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string","minLength":1,"title":"X-User-Id"}},{"name":"X-Access-Token-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Access-Token-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/user/openapi.json#/components/schemas/CreateAccessTokenBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/user/openapi.json#/components/schemas/CreateAccessTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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":{"type":"string","minLength":1,"title":"X-User-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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":{"type":"string","minLength":1,"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/user/openapi.json#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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":{"type":"string","minLength":1,"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/user/openapi.json#/components/schemas/UpdateUserBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.my.id/v1/user/openapi.json#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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, avatar_url, mfa\"\n        ","title":"Include Fields"},"description":"Comma-separated list of fields to include in the response.\n            supported fields: picture, avatar_url, mfa\"\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.d2wibi.my.id/v1/user/openapi.json#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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.d2wibi.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.d2wibi.my.id/v1/user/openapi.json#/components/schemas/HTTPValidationError"}}}}}}},"/user/avatar/{user_id}":{"get":{"tags":["User"],"summary":"Get Avatar","description":"Get the avatar of a user by user_id.","operationId":"get_avatar_avatar__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"if-none-match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-None-Match"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"https://api.d2wibi.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."},"ActivityEvent":{"properties":{"Key":{"type":"string","title":"Key"},"Kind":{"$ref":"#/components/schemas/ActivityKind"},"At":{"type":"string","format":"date-time","title":"At"},"UserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userid"},"ProjectId":{"type":"integer","title":"Projectid"},"ProjectName":{"type":"string","title":"Projectname"},"ProjectSlug":{"type":"string","title":"Projectslug"},"TargetType":{"anyOf":[{"$ref":"#/components/schemas/ActivityTarget"},{"type":"null"}]},"TargetIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Targetiid"},"TargetName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetname"},"Topic":{"anyOf":[{"$ref":"#/components/schemas/TaskTopics"},{"type":"null"}]},"Status":{"anyOf":[{"$ref":"#/components/schemas/TaskState"},{"type":"null"}]},"Country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"Region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"Grouping":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grouping"}},"type":"object","required":["Key","Kind","At","UserId","ProjectId","ProjectName","ProjectSlug","TargetType","TargetIId","TargetName","Topic","Status","Country","Region","Grouping"],"title":"ActivityEvent","description":"One entry of the feed."},"ActivityKind":{"type":"string","enum":["job","activated","deactivated"],"title":"ActivityKind","description":"What happened."},"ActivityPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActivityEvent"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"ActivityPage","description":"A newest-first page of the feed."},"ActivityTarget":{"type":"string","enum":["optimization","response_curve","prior_posterior","simulation","prediction","attribution","attribution_set","excel","feature_importance","graph_basic","graph_synergy","live_model_result","live_model","model","graph","dataset","data_import"],"title":"ActivityTarget","description":"The kind of resource an event is about; what the UI links to."},"AttrBaseline":{"properties":{"Variable":{"$ref":"#/components/schemas/_Variable"},"Baseline":{"type":"number","title":"Baseline"}},"type":"object","required":["Variable","Baseline"],"title":"AttrBaseline","description":"Schema for attribution baseline values."},"AttrEffectTypes":{"type":"string","enum":["Direct","Indirect","Total"],"title":"AttrEffectTypes","description":"Attribution Effect Types."},"Attribution":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for attribution"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Start of the attribution date range."},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"End of the attribution date range."},"Source":{"anyOf":[{"type":"string","enum":["manual","fit","optimization","simulation","prediction"]},{"type":"null"}],"title":"Source","description":"What produced this attribution: manual, fit, optimization, simulation or prediction. Filled on the list endpoint only."},"Fit":{"type":"boolean","title":"Fit","description":"Whether this is a fit attribution (FitModelId is set)","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Model","Date","Fit"],"title":"Attribution","description":"Response schema for attribution analysis jobs.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00Z","Fit":false,"IId":1,"JobId":123,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"Marketing Model","Region":"all"},"Name":"Q4 Attribution Analysis","Note":"Attribution analysis for Q4 marketing data","Status":"completed"}]},"AttributionAfterJob":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","description":"Set predicted targets as data.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed. If omitted, the chained attribution inherits the parent job's seed."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."}},"type":"object","title":"AttributionAfterJob","description":"Run attribution after a job."},"AttributionFilters":{"properties":{"attribution_id":{"type":"integer","title":"Attribution Id","description":"The id of the attribution job."},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order","description":"Priority order for overlapping results (lower = higher priority). Defaults to list position."}},"type":"object","required":["attribution_id"],"title":"AttributionFilters","description":"Attribution filters for the attribution set."},"AttributionFromJobRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"model_id":{"type":"integer","title":"Model Id","description":"The id of the model that should be used to do the attribution with."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","default":true},"fit_attribution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fit Attribution","description":"Set attribution as fit attribution of the model.","default":false},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"The updated values variable."},"job_input":{"anyOf":[{"$ref":"#/components/schemas/SimulationAttributionInput"},{"$ref":"#/components/schemas/PredictionAttributionInput"},{"$ref":"#/components/schemas/OptimizationAttributionInput"}],"title":"Job Input","description":"Source job (simulation/prediction/optimization) for attribution."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"auto_activate":{"type":"boolean","title":"Auto Activate","description":"If true, automatically creates and activates an attribution set from this job once it completes.","default":false},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserDecomposePayload"},{"type":"null"}],"description":"A `decompose` result computed in the browser against this express model's portable engine. When set on an express model, the attribution is materialized from this payload instead of dispatched as a job. Ignored for non-express models."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree."}},"type":"object","required":["model_id","job_input"],"title":"AttributionFromJobRequest","description":"Schema for an attribution job using another job as input.\n\nSame as `AttributionRequest`, but `job_input` is required. The dataset (and\nthe prediction fit model, when applicable) is derived from the source job —\n`dataset_id` is ignored.","examples":[{"baseline":[{"baseline":1000.0,"variable":"base_sales"}],"dataset_id":"active","end_date":"2024-12-31T00:00:00","fit_attribution":false,"job_input":{"id":1,"job_type":"simulation","quantile":50,"scenario":"Scenario"},"model_id":1,"name":"USA Market Attribution Q4","note":"Attribution analysis for USA market Q4 2024","predicted_targets_as_data":true,"priority":30,"quantiles":[1,25,50,75,99],"referece_point_fallback":"Min","samples":20,"start_date":"2024-01-01T00:00:00"}]},"AttributionGroupMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"SumEffect":{"type":"number","title":"Sumeffect"},"ShareOfEffect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shareofeffect"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","VarGroup","RespIId","Type","SumEffect","ShareOfEffect"],"title":"AttributionGroupMetric","description":"Response schema for AttributionGroupMetrics — effect/share per group."},"AttributionGroupROIMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"Investment":{"type":"number","title":"Investment"},"CPX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpx"},"EffectROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectroi"},"RevenueROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueroi"},"ProfitROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitroi"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","VarGroup","RespIId","Type","Investment","CPX","EffectROI","RevenueROI","ProfitROI"],"title":"AttributionGroupROIMetric","description":"Response schema for AttributionGroupROI — investment/ROI for Media/CX groups."},"AttributionMultipleRequest":{"properties":{"names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Names","description":"Name list for the model, the list needs to be the same length with modelling_combinations."},"notes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notes","description":"Description for the model/dataset"},"prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Prefixes","description":"Prefix for the name."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"dataset_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}]},"type":"array"},{"type":"null"}],"title":"Dataset Ids","description":"List of dataset id to be used for attribution calculation for each model_id, set to None to use active dataset"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","default":true},"model_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Model Ids","description":"The ids of the model that should be used to do the attribution with. If no one is selected, the `active` models will be used."},"fit_attribution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fit Attribution","description":"Set attribution as fit attribution of the model.","default":false},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"The updated values variable."},"job_inputs":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/SimulationAttributionInput"},{"$ref":"#/components/schemas/PredictionAttributionInput"},{"$ref":"#/components/schemas/OptimizationAttributionInput"}],"description":"job_type"},"type":"array"},{"type":"null"}],"title":"Job Inputs","description":"Run attribution from other job result."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed shared across the batch."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false}},"type":"object","required":["model_ids"],"title":"AttributionMultipleRequest","description":"Schemas of attribution multiple request endpoint.","examples":[{"baseline":[{"baseline":1000.0,"variable":"base_sales"}],"dataset_ids":["active","active","active"],"end_date":"2024-12-31T00:00:00","fit_attribution":false,"model_ids":[1,2,3],"names":["USA Attribution","GBR Attribution","DE Attribution"],"notes":["USA market analysis","GBR market analysis","DE market analysis"],"predicted_targets_as_data":true,"priority":30,"quantiles":[1,25,50,75,99],"referece_point_fallback":"Min","samples":20,"start_date":"2024-01-01T00:00:00"}]},"AttributionOptimizationAssociation":{"properties":{"OptimizationJob":{"$ref":"#/components/schemas/OptimizationJobsRef"}},"type":"object","required":["OptimizationJob"],"title":"AttributionOptimizationAssociation","description":"Reference schema for attribution optimization association."},"AttributionPredictionAssociation":{"properties":{"PredictionJob":{"$ref":"#/components/schemas/PredictionJobsRef"},"Quantile":{"type":"number","title":"Quantile"},"Scenario":{"type":"string","title":"Scenario"}},"type":"object","required":["PredictionJob","Quantile","Scenario"],"title":"AttributionPredictionAssociation","description":"Reference schema for attribution prediction association."},"AttributionRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Date":{"type":"string","format":"date-time","title":"Date"},"Status":{"$ref":"#/components/schemas/JobState"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate"},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate"},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids"},"DataSet":{"$ref":"#/components/schemas/DataSetRef"},"Model":{"$ref":"#/components/schemas/ModelsRef"},"ReferencePointSource":{"$ref":"#/components/schemas/ReferencePointSource","default":"DataMin"},"ReferencePointFallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}]}},"type":"object","required":["IId","Date","Status","DataSet","Model"],"title":"AttributionRef","description":"Schema for Attribution jobs."},"AttributionRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"model_id":{"type":"integer","title":"Model Id","description":"The id of the model that should be used to do the attribution with."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","default":true},"fit_attribution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fit Attribution","description":"Set attribution as fit attribution of the model.","default":false},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"The updated values variable."},"job_input":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/SimulationAttributionInput"},{"$ref":"#/components/schemas/PredictionAttributionInput"},{"$ref":"#/components/schemas/OptimizationAttributionInput"}],"description":"job_type"},{"type":"null"}],"title":"Job Input","description":"Run attribution from other job result."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"auto_activate":{"type":"boolean","title":"Auto Activate","description":"If true, automatically creates and activates an attribution set from this job once it completes.","default":false},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserDecomposePayload"},{"type":"null"}],"description":"A `decompose` result computed in the browser against this express model's portable engine. When set on an express model, the attribution is materialized from this payload instead of dispatched as a job. Ignored for non-express models."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree."}},"type":"object","required":["model_id"],"title":"AttributionRequest","description":"Schemas of attribution request endpoint, samples priority, and model id.","examples":[{"baseline":[{"baseline":1000.0,"variable":"base_sales"}],"dataset_id":"active","end_date":"2024-12-31T00:00:00","fit_attribution":false,"model_id":1,"name":"USA Market Attribution Q4","note":"Attribution analysis for USA market Q4 2024","predicted_targets_as_data":true,"priority":30,"quantiles":[1,25,50,75,99],"referece_point_fallback":"Min","samples":20,"start_date":"2024-01-01T00:00:00"}]},"AttributionRequestNoValidation":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"attributionjob_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionFilters"}]},"type":"array"},{"type":"null"}],"title":"Attributionjob Ids","description":"List of attribution job IDs (integers) or filter objects to include. Referenced jobs must be in COMPLETED status. Use filter objects to apply variable/date filters when merging."},"activate":{"type":"boolean","title":"Activate","description":"Set to true to make this the active attribution set for the Effects Dashboard immediately after creation completes.","default":false},"attributionset_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionSetType"},{"$ref":"#/components/schemas/AttributionSetFilters"}]},"type":"array"},{"type":"null"}],"title":"Attributionset Ids","description":"List of existing attribution set IDs to merge into this set. Use 'active' to reference the currently active set, or filter objects to apply variable filters when merging."}},"type":"object","title":"AttributionRequestNoValidation","description":"Attribution set request wihtout validation."},"AttributionSet":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active attribution set for the dashboard"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Set creation timestamp"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the set"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/TaskState","description":"Processing state: PENDING, PROCESSING, COMPLETE, or FAILED"},"CreationFilters":{"anyOf":[{},{"type":"null"}],"title":"Creationfilters","description":"Filters for auto-generating attributions (Country/Region)"},"Attributions":{"items":{"$ref":"#/components/schemas/AttributionRef"},"type":"array","title":"Attributions","description":"List of attribution jobs included in this set"},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable across all attributions in this set, when requested with `with_variable_ids=true`. NULL when not requested."},"DataSet":{"anyOf":[{"$ref":"#/components/schemas/DataSetRef"},{"type":"null"}],"description":"Reference to the associated dataset"}},"type":"object","required":["IId","Selected","CreatedDate","Status","Attributions"],"title":"AttributionSet","description":"Response schema for attribution sets (grouped attribution analyses).","examples":[{"Attributions":[{"DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00Z","IId":1,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"Marketing Model","Region":"all"},"Name":"Attribution 1","Status":"completed"}],"CreatedDate":"2024-01-15T10:30:00Z","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"IId":1,"Name":"Q4 Attribution Set","Note":"Combined attribution analysis for Q4","Selected":true,"Status":"complete"}]},"AttributionSetActiveHistory":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attributionsetid"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["Id","AttributionSetId","UpdatedByUser","UpdatedAt"],"title":"AttributionSetActiveHistory","description":"Response schema for attribution set active history records."},"AttributionSetFilters":{"properties":{"attributionset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionSetType"}],"title":"Attributionset Id","description":"The id of the attribution set."},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order","description":"Priority order for overlapping results (lower = higher priority). Defaults to list position."}},"type":"object","required":["attributionset_id"],"title":"AttributionSetFilters","description":"Attribution set filters for the attribution set."},"AttributionSetGroupMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"SumEffect":{"type":"number","title":"Sumeffect"},"ShareOfEffect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shareofeffect"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","VarGroup","RespIId","Type","SumEffect","ShareOfEffect"],"title":"AttributionSetGroupMetric","description":"Response schema for AttributionSetGroupMetrics — effect/share per group."},"AttributionSetGroupROIMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"Investment":{"type":"number","title":"Investment"},"CPX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpx"},"EffectROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectroi"},"RevenueROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueroi"},"ProfitROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitroi"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","VarGroup","RespIId","Type","Investment","CPX","EffectROI","RevenueROI","ProfitROI"],"title":"AttributionSetGroupROIMetric","description":"Response schema for AttributionSetGroupROI — investment/ROI for Media/CX groups."},"AttributionSetRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Selected":{"type":"boolean","title":"Selected"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"},"Status":{"$ref":"#/components/schemas/TaskState"}},"type":"object","required":["IId","Selected","CreatedDate","Status"],"title":"AttributionSetRef","description":"reference schema for Attribution set."},"AttributionSetRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"attributionjob_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionFilters"}]},"type":"array"},{"type":"null"}],"title":"Attributionjob Ids","description":"List of attribution job IDs (integers) or filter objects to include. Referenced jobs must be in COMPLETED status. Use filter objects to apply variable/date filters when merging."},"activate":{"type":"boolean","title":"Activate","description":"Set to true to make this the active attribution set for the Effects Dashboard immediately after creation completes.","default":false},"attributionset_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionSetType"},{"$ref":"#/components/schemas/AttributionSetFilters"}]},"type":"array"},{"type":"null"}],"title":"Attributionset Ids","description":"List of existing attribution set IDs to merge into this set. Use 'active' to reference the currently active set, or filter objects to apply variable filters when merging."}},"type":"object","title":"AttributionSetRequest","description":"Schema for attribution set creation.","examples":[{"activate":true,"attributionjob_ids":[1,2,{"attribution_id":3,"variable_filters":[{"end_date":"2024-06-30T00:00:00","start_date":"2024-01-01T00:00:00","variable_id":101}]}],"attributionset_ids":["active"],"creation_filter":["country:USA","region:all"],"name":"Q4 Attribution Set","note":"Combined attribution analysis for Q4 campaigns"}]},"AttributionSetRequestAlignDates":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"attributionjob_ids":{"items":{"type":"integer"},"type":"array","title":"Attributionjob Ids","description":"List of attribution job IDs to include. Order matters - earlier jobs take precedence for overlapping date periods. Jobs must be in COMPLETED status."},"activate":{"type":"boolean","title":"Activate","description":"Set to true to make this the active attribution set for the Effects Dashboard immediately after creation completes.","default":false}},"type":"object","required":["attributionjob_ids"],"title":"AttributionSetRequestAlignDates","description":"Attributionset request algining dates."},"AttributionSetResponseCurves":{"properties":{"Combination":{"$ref":"#/components/schemas/ResponseCurveCombination","description":"The combination the entry is for"},"Segments":{"items":{"$ref":"#/components/schemas/ResponseCurveSegment"},"type":"array","title":"Segments","description":"Runs of dates, in order; a date is valued on the last segment starting on or before it"}},"type":"object","required":["Combination","Segments"],"title":"AttributionSetResponseCurves","description":"One combination of an attribution set with its curves per period."},"AttributionSetTotal":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"TotalEffect":{"type":"number","title":"Totaleffect"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","RespIId","Type","TotalEffect"],"title":"AttributionSetTotal","description":"Response schema for AttributionSetTotals — shared TotalEffect denominator."},"AttributionSetType":{"type":"string","enum":["active"],"title":"AttributionSetType","description":"Attribution set type."},"AttributionSetVariableMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarIId":{"type":"integer","title":"Variid"},"VarSlug":{"type":"string","title":"Varslug"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"SumEffect":{"type":"number","title":"Sumeffect"},"ShareOfEffect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shareofeffect"},"VarUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","VarIId","VarSlug","VarGroup","RespIId","Type","SumEffect","ShareOfEffect"],"title":"AttributionSetVariableMetric","description":"Response schema for AttributionSetVariableMetrics — effect/share per variable."},"AttributionSetVariableROIMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionSetId":{"type":"integer","title":"Attributionsetid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarIId":{"type":"integer","title":"Variid"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"Investment":{"type":"number","title":"Investment"},"CPX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpx"},"EffectROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectroi"},"RevenueROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueroi"},"ProfitROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitroi"},"VarUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionSetId","CombinationId","VarIId","RespIId","Type","Investment","CPX","EffectROI","RevenueROI","ProfitROI"],"title":"AttributionSetVariableROIMetric","description":"Response schema for AttributionSetVariableROI — investment/ROI for Media/CX variables."},"AttributionSimulationAssociation":{"properties":{"SimulationJob":{"$ref":"#/components/schemas/SimulationJobsRef"},"Quantile":{"type":"number","title":"Quantile"},"Scenario":{"type":"string","title":"Scenario"}},"type":"object","required":["SimulationJob","Quantile","Scenario"],"title":"AttributionSimulationAssociation","description":"Reference schema for attribution simulation association."},"AttributionTotal":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"TotalEffect":{"type":"number","title":"Totaleffect"},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","RespIId","Type","TotalEffect"],"title":"AttributionTotal","description":"Response schema for AttributionTotals — shared TotalEffect denominator."},"AttributionVariableMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarIId":{"type":"integer","title":"Variid"},"VarSlug":{"type":"string","title":"Varslug"},"VarGroup":{"type":"string","title":"Vargroup"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"SumEffect":{"type":"number","title":"Sumeffect"},"ShareOfEffect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shareofeffect"},"VarUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","VarIId","VarSlug","VarGroup","RespIId","Type","SumEffect","ShareOfEffect"],"title":"AttributionVariableMetric","description":"Response schema for AttributionVariableMetrics — effect/share per variable."},"AttributionVariableROIMetric":{"properties":{"Id":{"type":"integer","title":"Id"},"AttributionId":{"type":"integer","title":"Attributionid"},"CombinationId":{"type":"integer","title":"Combinationid"},"VarIId":{"type":"integer","title":"Variid"},"RespIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Respiid"},"Type":{"$ref":"#/components/schemas/AttrEffectTypes"},"Investment":{"type":"number","title":"Investment"},"CPX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpx"},"EffectROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectroi"},"RevenueROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenueroi"},"ProfitROI":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Profitroi"},"VarUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]},"RespUtilAttr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}]}},"type":"object","required":["Id","AttributionId","CombinationId","VarIId","RespIId","Type","Investment","CPX","EffectROI","RevenueROI","ProfitROI"],"title":"AttributionVariableROIMetric","description":"Response schema for AttributionVariableROI — investment/ROI for Media/CX variables."},"BasicGraphJobRequest":{"properties":{"modelling_combination":{"$ref":"#/components/schemas/ModellingCombinationBaseModel","description":"Modelling combination for the model."},"graph_variables":{"anyOf":[{"$ref":"#/components/schemas/BasicModelVariables"},{"type":"null"}],"description":"High-level effect information to use when auto-creating basic models."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates","description":"List of dates."},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30}},"type":"object","required":["modelling_combination"],"title":"BasicGraphJobRequest","description":"Schemas of basic graph job request endpoint."},"BasicGraphRequest":{"properties":{"modelling_combination":{"$ref":"#/components/schemas/ModellingCombinationBaseModel","description":"Modelling combination for the model."},"graph_variables":{"anyOf":[{"$ref":"#/components/schemas/BasicModelVariables"},{"type":"null"}],"description":"High-level effect information to use when auto-creating basic models."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates","description":"List of dates."}},"type":"object","required":["modelling_combination"],"title":"BasicGraphRequest","description":"Schemas of basic graph request endpoint."},"BasicModelVariables":{"properties":{"targets":{"anyOf":[{"$ref":"#/components/schemas/Target"},{"type":"null"}],"default":{"targets":[],"revenue_nodes":false,"profit_nodes":false}},"trend":{"anyOf":[{"$ref":"#/components/schemas/Trend"},{"type":"null"}],"default":{"influence":"neutral","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"}}},"season":{"anyOf":[{"$ref":"#/components/schemas/Season"},{"type":"null"}],"default":{"effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"shared":false,"multiplicative":false}},"holidays":{"anyOf":[{"$ref":"#/components/schemas/Holidays"},{"type":"null"}],"default":{"influence":"neutral","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"shared":false}},"media":{"anyOf":[{"$ref":"#/components/schemas/Media"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"effect_in_days":120,"variables":[],"match_product":false,"net_profit_node":false}},"customer_experience":{"anyOf":[{"$ref":"#/components/schemas/CustomerExperience"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"effect_in_days":120,"variables":[],"match_product":false,"net_profit_node":false}},"price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":{"influence":"negative","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"match_product":false,"variables":[]}},"distribution":{"anyOf":[{"$ref":"#/components/schemas/Distribution"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"match_product":false,"variables":[]}},"brand":{"anyOf":[{"$ref":"#/components/schemas/Brand"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"variables":[]}},"events":{"anyOf":[{"$ref":"#/components/schemas/Events"},{"type":"null"}],"default":{"influence":"neutral","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"variables":[]}},"macro":{"anyOf":[{"$ref":"#/components/schemas/Macro"},{"type":"null"}],"default":{"influence":"neutral","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"variables":[]}},"visits":{"anyOf":[{"$ref":"#/components/schemas/Visits"},{"type":"null"}],"default":{"influence":"positive","effect":{"mean":0.1,"std":0.2,"type":"Effect.ImpactSize"},"variables":[]}},"weather":{"anyOf":[{"$ref":"#/components/schemas/Weather"},{"type":"null"}],"default":{"influence":"neutral","variables":[]}},"extra":{"anyOf":[{"$ref":"#/components/schemas/Extra"},{"type":"null"}],"default":{"influence":"neutral","variables":[]}},"competitor_price":{"anyOf":[{"$ref":"#/components/schemas/CompetitorPrice"},{"type":"null"}],"default":{"influence":"positive","variables":[],"match_product":false}},"competitor_media":{"anyOf":[{"$ref":"#/components/schemas/CompetitorMedia"},{"type":"null"}],"default":{"influence":"negative","effect_in_days":120,"variables":[],"match_product":false}},"competitor_brand":{"anyOf":[{"$ref":"#/components/schemas/CompetitorBrand"},{"type":"null"}],"default":{"influence":"negative","variables":[]}},"competitor_distribution":{"anyOf":[{"$ref":"#/components/schemas/CompetitorDistribution"},{"type":"null"}],"default":{"influence":"negative","variables":[],"match_product":false}}},"type":"object","title":"BasicModelVariables","description":"Variables config for the basic model."},"Body_create_live_model_projects__team_id___project_id__live_models_post":{"properties":{"config":{"type":"string","contentMediaType":"application/octet-stream","title":"Config","description":"bayes-lmb ModelConfig JSON."},"artifact":{"type":"string","contentMediaType":"application/octet-stream","title":"Artifact","description":"FittedModel msgpack bytes."},"dataset_id":{"type":"integer","title":"Dataset Id","description":"IId of the dataset fitted on."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"dataset_fingerprint":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Dataset Fingerprint"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"}},"type":"object","required":["config","artifact","dataset_id"],"title":"Body_create_live_model_projects__team_id___project_id__live_models_post"},"Body_save_browser_result_projects__team_id___project_id__live_models__live_model_id__results_post":{"properties":{"meta":{"type":"string","title":"Meta"},"output":{"type":"string","contentMediaType":"application/octet-stream","title":"Output"}},"type":"object","required":["meta","output"],"title":"Body_save_browser_result_projects__team_id___project_id__live_models__live_model_id__results_post"},"Body_upload_data_projects__team_id___project_id__datauploads_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The file to upload. Only .csv, .xls, .xlsx, .xlsb is supported or or gzip file containing one supported file (.gz)"}},"type":"object","required":["file"],"title":"Body_upload_data_projects__team_id___project_id__datauploads_post"},"Brand":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the brand effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the brand effect"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Brand","description":"Control the brand."},"BrowserConstraintViolation":{"properties":{"violationRatio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Violationratio"},"lhs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lhs"},"violation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Violation"}},"additionalProperties":true,"type":"object","title":"BrowserConstraintViolation","description":"One constraint's final numbers, as the optimization ingest accepts them.\n\nThe strict sibling of `ConstraintViolation`, which stays permissive because it\nalso parses server results the engine produced. These three fields are written\nto `ConstraintViolations` rows and to a job column after `SAVING_RESULTS` is\nalready committed, so a boolean or a non-finite here has to be a 422 rather\nthan a wedged job."},"BrowserDecomposePayload":{"properties":{"responses":{"items":{"type":"string"},"type":"array","title":"Responses"},"types":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Types"},"variables":{"items":{"type":"string"},"type":"array","title":"Variables"},"n":{"type":"integer","title":"N"},"quantiles":{"items":{"type":"number"},"type":"array","minItems":1,"title":"Quantiles"},"quantiled":{"additionalProperties":{"additionalProperties":{"additionalProperties":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":1},"type":"object","minProperties":1},"type":"object"},"type":"object","minProperties":1,"title":"Quantiled"}},"additionalProperties":true,"type":"object","required":["responses","types","variables","n","quantiles","quantiled"],"title":"BrowserDecomposePayload","description":"A browser-computed `decompose` result, as the attribution ingest accepts it.\n\nSame reasoning as `BrowserPredictMultiPayload`: client input that reaches the\nparquet writer through a hook which commits `SAVING_RESULTS` before it reads the\npayload, so anything the writer indexes is validated here while a 422 is still\nfree. `attribution_rows_from_decompose` reads only `quantiles` and `quantiled`;\n`responses`/`types`/`variables`/`n` are the engine's own account of what it ran and\nare declared so a misshaped payload is rejected rather than KeyError'd downstream.\n\nOne level deeper than the prediction payload: `quantiled` is keyed\ntype -> response -> variable, where type is `Total` (plus `Direct`/`Indirect` for a\nhierarchical model) and the variable set is the channels plus the base label."},"BrowserOptimizePayload":{"properties":{"optVars":{"items":{"type":"string"},"type":"array","title":"Optvars"},"n":{"type":"integer","title":"N"},"solution":{"additionalProperties":{"items":{"type":"number"},"type":"array","minItems":1},"type":"object","minProperties":1,"title":"Solution"},"objective":{"type":"number","title":"Objective"},"baselineTarget":{"type":"number","title":"Baselinetarget"},"baselineTargetResult":{"type":"number","title":"Baselinetargetresult"},"improvement":{"type":"number","title":"Improvement"},"iterations":{"type":"integer","title":"Iterations"},"constraintViolations":{"additionalProperties":{"$ref":"#/components/schemas/BrowserConstraintViolation"},"type":"object","title":"Constraintviolations"}},"additionalProperties":true,"type":"object","required":["optVars","n","solution","objective","baselineTarget","baselineTargetResult","improvement","iterations"],"title":"BrowserOptimizePayload","description":"A browser-computed `optimize` result, as the optimization ingest accepts it.\n\nSame standard as the three browser payloads above: `_materialize_optimization`\ncommits `SAVING_RESULTS` before it reads the payload and there is no worker to\nretry an inline call, so everything the row writer and the scalar columns index\nis a validation error here while a 422 is still free.\n\nAgreement with the op — that these are the right opt vars over the right window\n— is checked against the server-built op in `fe_actions`, since only it knows\nwhat was asked for. Field names are the engine's camelCase wire names, as\n`OptimizeResultPayload` reads them off a server run."},"BrowserPredictMultiPayload":{"properties":{"scenarios":{"items":{"type":"string"},"type":"array","title":"Scenarios"},"variables":{"items":{"type":"string"},"type":"array","title":"Variables"},"n":{"type":"integer","title":"N"},"quantiles":{"items":{"type":"number"},"type":"array","minItems":1,"title":"Quantiles"},"quantiled":{"additionalProperties":{"additionalProperties":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":1},"type":"object","minProperties":1},"type":"object","minProperties":1,"title":"Quantiled"}},"additionalProperties":true,"type":"object","required":["scenarios","variables","n","quantiles","quantiled"],"title":"BrowserPredictMultiPayload","description":"A browser-computed `predict_multi` result, as the ingest path accepts it.\n\nStricter than `PredictMultiResultPayload`, which describes the same shape\ncoming back from a drun worker. This one is client input that reaches the\nparquet writer through a hook committing `SAVING_RESULTS` before it reads\nthe payload, so a NaN, an infinity or an integer too large for an f64 would\nbe discovered only after the job is already wedged. Everything the writer\nindexes is therefore a validation error here, while a 422 is still free.\n\n`scenarios`/`variables`/`n` are the engine's own account of what it ran;\nthey are declared so a payload missing them is rejected as the wrong shape\nrather than KeyError'd downstream."},"BrowserResponseCurvePayload":{"properties":{"variable":{"type":"string","title":"Variable"},"responses":{"items":{"type":"string"},"type":"array","title":"Responses"},"types":{"items":{"type":"string"},"type":"array","title":"Types"},"values":{"items":{"type":"number"},"type":"array","minItems":1,"title":"Values"},"dates":{"items":{"type":"string"},"type":"array","title":"Dates"},"quantiles":{"items":{"type":"number"},"type":"array","minItems":1,"title":"Quantiles"},"static_curves":{"additionalProperties":{"additionalProperties":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":1},"type":"object","minProperties":1},"type":"object","minProperties":1,"title":"Static Curves"},"temporal":{"additionalProperties":{"additionalProperties":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","minItems":1},"type":"object","minProperties":1},"type":"object","minProperties":1,"title":"Temporal"}},"additionalProperties":true,"type":"object","required":["variable","responses","types","values","dates","quantiles","static_curves","temporal"],"title":"BrowserResponseCurvePayload","description":"A browser-computed `response_curve` result for one curve input, as ingested.\n\nThe response-curve sibling of `BrowserPredictMultiPayload`, held to the same\nstandard: the completion hook commits `SAVING_RESULTS` before it reads the\npayload, so everything the row writer indexes - the bands' count and\nlengths, every measurement being a finite number - is a validation error\nhere while a 422 is still free. Agreement with the op (variable, grid,\nwindow, targets) is checked against the server-built op in `fe_actions`,\nsince only it knows what was asked for.\n\nBoth curve maps are `type -> response -> [quantiles][...]`: static bands run\nover the `values` grid, temporal bands over the unique `dates`."},"CandidateAttach":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"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. 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","description":"Direction of the competitor brand effect","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the competitor brand effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"CompetitorBrand","description":"Control the competitor brand variables."},"CompetitorDistribution":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the competitor distribution effect","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the competitor distribution effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false}},"type":"object","title":"CompetitorDistribution","description":"Control the competitor distribution variables."},"CompetitorMedia":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the competitor media effect","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the competitor media effect; null (the default) adds no effect-size prior, so the data alone sets it"},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days into the future do we expect a media investment to have an impact","default":120},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false}},"type":"object","title":"CompetitorMedia","description":"Control the competitor media variables."},"CompetitorPrice":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the competitor price effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the competitor price effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false}},"type":"object","title":"CompetitorPrice","description":"Control the competitor price variables."},"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. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"graph":{"additionalProperties":true,"type":"object","title":"Graph"}},"type":"object","required":["graph"],"title":"CreateTemplate","description":"Schema for create template.","examples":[{"graph":{"edges":[{"arguments":["positive"],"source":"media","target":"sales"}],"nodes":[{"id":"sales","key":"File:Sales","type":"Node.Data"},{"id":"media","key":"File:Media","type":"Node.Data"}]},"name":"Marketing Mix Model Template","note":"Template for standard marketing mix analysis"}]},"Currency":{"properties":{"currency_code":{"type":"string","title":"Currency Code"},"symbol":{"type":"string","title":"Symbol"}},"type":"object","required":["currency_code","symbol"],"title":"Currency","description":"Schema for currency data."},"CustomerExperience":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the customer experience effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the customer experience effect"},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days into the future do we expect a media investment to have an impact","default":120},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false},"net_profit_node":{"type":"boolean","title":"Net Profit Node","description":"Construct a `NetProfit` node i.e. Profit-investments. This will be shown in the dashboards etc. as a `Response`","default":false}},"type":"object","title":"CustomerExperience","description":"Control the customer experience."},"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. A sim/pred/attribution/optimize/response-curve submission on a strict project (or with `validate_limits`) rejects a Blocked dataset until the limits are patched to cover the data; otherwise the job runs with a warning.","default":false},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Start of the window the dataset was built with; NULL when unbounded. What it was *asked* for — `MinDate` is what the data actually covers."},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"End of the window the dataset was built with."},"MergeOrderBy":{"$ref":"#/components/schemas/MergeOrderBy","description":"What ranked duplicate rows when this dataset was merged."}},"type":"object","required":["IId","Selected","Name","CreatedDate","DataImports","Status","MergeOrderBy"],"title":"DataSet","description":"Response schema for datasets (collections of data imports).","examples":[{"CreatedDate":"2024-01-15T10:30:00Z","CreatorId":"user-123","DataImports":[{"DatasetName":"Sales","Date":"2024-01-15T10:30:00","External":false,"IId":1,"Status":"complete"}],"IId":1,"MergeOrderBy":"insert_date","Name":"Marketing Dataset Q4","Note":"Combined sales and marketing data","Selected":true,"Status":"complete"}]},"DataSetActiveHistory":{"properties":{"Id":{"type":"integer","title":"Id"},"DataSetId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Datasetid"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["Id","DataSetId","UpdatedByUser","UpdatedAt"],"title":"DataSetActiveHistory","description":"Response schema for dataset active history records."},"DataSetCorrelationRequest":{"properties":{"targets":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Targets"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Variables"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}},"type":"object","required":["targets"],"title":"DataSetCorrelationRequest","description":"Schema for dataset correlation request."},"DataSetFilterRule":{"properties":{"mode":{"$ref":"#/components/schemas/FilterMode","description":"`include` keeps matching rows, `exclude` drops them. A row survives when it matches at least one include — or no include was given at all — and no exclude."},"variable_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Variable Id","description":"`IId` of the variable this rule is about; unset means any."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Unset means any country."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"Unset means any region."},"grouping":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grouping","description":"Unset means any grouping."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Rule applies from this date; unset is unbounded."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"Rule applies until this date; unset is unbounded."}},"type":"object","required":["mode"],"title":"DataSetFilterRule","description":"One include/exclude rule applied while a dataset is built.\n\nEvery field but `mode` is optional and unset means \"any\", so a rule narrows\nonly the dimensions it names."},"DataSetImportance":{"properties":{"targets":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Targets"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Variables"},"quantiles":{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array","minItems":1,"title":"Quantiles","default":[10,25,50,75,90]},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}},"type":"object","required":["targets"],"title":"DataSetImportance","description":"Schema for dataset importance request."},"DataSetImportanceJobRequest":{"properties":{"targets":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Targets"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Variables"},"quantiles":{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array","minItems":1,"title":"Quantiles","default":[10,25,50,75,90]},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30}},"type":"object","required":["targets","dataset_id"],"title":"DataSetImportanceJobRequest","description":"Schema for dataset importance job request."},"DataSetRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"Name":{"type":"string","title":"Name"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"},"Status":{"$ref":"#/components/schemas/TaskState"},"Selected":{"type":"boolean","title":"Selected"}},"type":"object","required":["IId","Name","CreatedDate","Status","Selected"],"title":"DataSetRef","description":"Reference schema for DataSet."},"DataSetRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name, unique within the project: a taken name returns 409, send `prefix` instead to get a free one. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"activate":{"type":"boolean","title":"Activate","description":"Activate the model/dataset as soon as it is done training.","default":false},"upload_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Upload Ids","description":"List of data uploads to include in the new dataset, will be merged with the provided `dataset_ids`."},"dataset_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"}]},"type":"array"},{"type":"null"}],"title":"Dataset Ids","description":"List of datasets to include in the new dataset where the data uploads they are comprised of will be merged with the provided upload_ids to form a new data set. Use the string active as a value if the to use the active dataset."},"external_datasets":{"anyOf":[{"items":{"$ref":"#/components/schemas/DataUploadsExternalPost"},"type":"array"},{"type":"null"}],"title":"External Datasets","description":"External dataset to merge with dataset."},"derivations":{"anyOf":[{"items":{"$ref":"#/components/schemas/DerivationPost"},"type":"array"},{"type":"null"}],"title":"Derivations","description":"Variables to build by aggregating existing ones. Each becomes a new variable in a data upload created for this dataset, holding only the derived variables — so the inputs stay available at their original granularity unless a filter excludes them."},"variable_limits":{"anyOf":[{"items":{"$ref":"#/components/schemas/PatchDatasetVariableLimit"},"type":"array"},{"type":"null"}],"title":"Variable Limits","description":"Optional per-row VariableStats limits applied at dataset creation. Each row targets a single (VariableIId, Country, Region, Grouping) tuple. A row whose tuple `filters` remove (no include names it, or an exclude without dates does) is dropped rather than refused, and listed under the dataset task's `dropped_variable_limits`. Any other row must name a tuple one of the sources holds, or the request is refused with a 400. User-supplied values take precedence over both the source-dataset min/max merge and the data-derived defaults."},"interpolation_priority":{"anyOf":[{"items":{"$ref":"#/components/schemas/InterpolationPriority"},"type":"array"},{"type":"null"}],"title":"Interpolation Priority","description":"Resolves interpolation-config conflicts between the sources: for the named variable, the named upload/dataset's config wins. Variables without an entry fall back to declaration order (upload_ids first, then dataset_ids)."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Drop data before this date from the whole dataset. Applied while the dataset is built, so it also narrows what a LINEAR interpolation chain has as a leading anchor. Unset means unbounded, and `filters` narrow it further on top."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"Drop data after this date from the whole dataset."},"filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/DataSetFilterRule"},"type":"array"},{"type":"null"}],"title":"Filters","description":"Include/exclude rules over variables, modelling combinations and dates. A row is kept when it matches at least one `include` — or none was given — and no `exclude`; a rule narrows only the dimensions it names. Combination match is exact, so `all` is a stored value rather than a wildcard. These bound the dataset further than `start_date` / `end_date`, never wider."},"merge_order_by":{"$ref":"#/components/schemas/MergeOrderBy","description":"What ranks duplicate rows; the last one wins. `insert_date` ranks by the date each row's upload landed, whatever order the sources were declared in (the historical behaviour). `source_order` ranks by the source's position in `upload_ids` + `dataset_ids`, with the insert date as tiebreak — so to keep the first declared source instead, declare them the other way round.","default":"insert_date"}},"type":"object","title":"DataSetRequest","description":"Schema for creating dataset request.","examples":[{"activate":true,"dataset_ids":["active",5],"external_datasets":[{"Name":"Macro Indicators","Note":"Economic indicators","dataset_name":"Macro","indicators":["Short-term interest rates","Consumer Confidence Index"]}],"filters":[{"country":"USA","grouping":"all","mode":"include","region":"all"},{"end_date":"2024-01-01T00:00:00","mode":"exclude","variable_id":101}],"name":"Marketing Dataset Q4","note":"Combined sales and marketing data for Q4 analysis","upload_ids":[1,2,3],"variable_limits":[{"Country":"USA","Grouping":"all","MaxLimit":100000,"MinLimit":0,"Region":"all","VariableIId":101}]}]},"DataSetUsageCounts":{"properties":{"Models":{"$ref":"#/components/schemas/JobCounts"},"Simulations":{"$ref":"#/components/schemas/JobCounts","description":"Every simulation, including those an optimization submitted"},"Predictions":{"$ref":"#/components/schemas/JobCounts"},"Attributions":{"$ref":"#/components/schemas/JobCounts"},"AttributionSets":{"$ref":"#/components/schemas/JobCounts"}},"type":"object","required":["Models","Simulations","Predictions","Attributions","AttributionSets"],"title":"DataSetUsageCounts","description":"Undeleted models and jobs built on one dataset, per kind."},"DataUploadsExternalPost":{"properties":{"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"indicators":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Indicators","description":"List of indicators"},"dataset_name":{"type":"string","enum":["Macro","Weather"],"title":"Dataset Name"}},"type":"object","required":["dataset_name"],"title":"DataUploadsExternalPost","description":"Schema for creating external datasource.","examples":[{"Name":"Macro Economic Indicators","Note":"External macro data for Q4","dataset_name":"Macro","indicators":["Short-term interest rates","Long-term interest rates","Consumer Confidence Index"]}]},"DataUploadsUpdate":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"DataUploadsUpdate","description":"Schema for updating data uploads.","examples":[{"Name":"Updated Sales Data Q4","Note":"Corrected version with December figures"}]},"Dataset":{"type":"string","enum":["Brand","CompetitorBrand","Distribution","CompetitorDistribution","Events","Macro","Media","CustomerExperience","CompetitorMedia","Sales","CompetitorPrice","Visits","Weather","Extra"],"title":"Dataset","description":"User upload datasets."},"DatasetCheck":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/MergeIssue"},"type":"array","title":"Issues","default":[]},"truncated":{"type":"integer","title":"Truncated","description":"Issues beyond the listed ones","default":0},"checked":{"type":"boolean","title":"Checked","description":"False when the merge cannot break a rule and was skipped"},"reason":{"anyOf":[{"type":"string","enum":["no_media","single_media_source"]},{"type":"null"}],"title":"Reason"},"check_id":{"type":"integer","title":"Check Id"},"status":{"$ref":"#/components/schemas/TaskState"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["checked","check_id","status"],"title":"DatasetCheck","description":"A dataset merge check's progress and, once COMPLETE, its result."},"DatasetCheckSubmitted":{"properties":{"check_id":{"type":"integer","title":"Check Id","description":"IId of the check, for GET /datasets/check"}},"type":"object","required":["check_id"],"title":"DatasetCheckSubmitted","description":"A submitted dataset merge check."},"DatasetLimitViolation":{"properties":{"Slug":{"type":"string","title":"Slug","description":"Variable slug"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit","description":"The dataset's lower bound; null means unbounded"},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit","description":"The dataset's upper bound; null means unbounded"},"BelowCount":{"type":"integer","title":"Belowcount","description":"Rows strictly below MinLimit"},"Lowest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lowest","description":"The lowest value below MinLimit; null when none is"},"AboveCount":{"type":"integer","title":"Abovecount","description":"Rows strictly above MaxLimit"},"Highest":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Highest","description":"The highest value above MaxLimit; null when none is"}},"type":"object","required":["Slug","Country","Region","Grouping","MinLimit","MaxLimit","BelowCount","Lowest","AboveCount","Highest"],"title":"DatasetLimitViolation","description":"One variable segment whose data falls outside its dataset-level limits."},"DatasetType":{"type":"string","enum":["active"],"title":"DatasetType","description":"Dataset type."},"DatasetVariableLimit":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid","description":"Variable IId within the project"},"Slug":{"type":"string","title":"Slug","description":"Variable slug"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit"},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit"},"ProjectMinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projectminlimit","description":"The project-level MinLimit this row falls back to"},"ProjectMaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projectmaxlimit","description":"The project-level MaxLimit this row falls back to"},"EffectiveMinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectiveminlimit","description":"The lower bound enforced: MinLimit, else ProjectMinLimit; null means unbounded"},"EffectiveMaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effectivemaxlimit","description":"The upper bound enforced: MaxLimit, else ProjectMaxLimit; null means unbounded"}},"type":"object","required":["VariableIId","Slug","Country","Region","Grouping"],"title":"DatasetVariableLimit","description":"Per-variable, per-modelling-combination dataset-level limits."},"DateRange-Input":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date"},"end_date":{"type":"string","format":"date-time","title":"End Date"}},"type":"object","required":["start_date","end_date"],"title":"DateRange","description":"Date range selector.\n\n`NaiveDatetime`, like every date an optimization is built from: the dataset\nrows, the periodicity checks and the compiled `node[...]` slices are all\nnaive, so a trailing `Z` here used to reach `parse_dates` and raise\n`TypeError: can't compare offset-naive and offset-aware datetimes` as a 500.\nRefused as a 422 instead, rather than silently stripped - the caller means a\ndifferent instant than the one that would be stored."},"DateRange-Output":{"properties":{"min":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Max"}},"type":"object","required":["min","max"],"title":"DateRange","description":"Min and max dates for a resource collection."},"DateSelector":{"properties":{"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"$ref":"#/components/schemas/DateRange-Input"},{"type":"null"}],"title":"Dates","description":"Select all dates by set to None, select specific dates, or select range"}},"type":"object","title":"DateSelector","description":"Dates selector."},"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":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for attribution"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Attribution analysis start date"},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"Attribution analysis end date"},"Source":{"anyOf":[{"type":"string","enum":["manual","fit","optimization","simulation","prediction"]},{"type":"null"}],"title":"Source","description":"What produced this attribution: manual, fit, optimization, simulation or prediction. Filled on the list endpoint only."},"AttributionSets":{"items":{"$ref":"#/components/schemas/AttributionSetRef"},"type":"array","title":"Attributionsets","description":"Attribution sets that include this job"},"FitModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}],"description":"Model used for fit-period attribution"},"ReferencePointFallback":{"$ref":"#/components/schemas/ReferencePointFallback","description":"How to handle missing reference points: 'zero' or 'mean'"},"ReferencePointSource":{"$ref":"#/components/schemas/ReferencePointSource","description":"Source of reference points not supplied by the caller","default":"DataMin"},"PredictedTargetsAsData":{"type":"boolean","title":"Predictedtargetsasdata","description":"Whether predicted target values are used as input data"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable present in this attribution. NULL when not requested."},"UpdateVariable":{"items":{"$ref":"#/components/schemas/UpdateVariable"},"type":"array","title":"Updatevariable","description":"Variable modifications applied during attribution"},"SimulationAssociation":{"anyOf":[{"$ref":"#/components/schemas/AttributionSimulationAssociation"},{"type":"null"}],"description":"Linked simulation job (if created from simulation)"},"PredictionAssociation":{"anyOf":[{"$ref":"#/components/schemas/AttributionPredictionAssociation"},{"type":"null"}],"description":"Linked prediction job (if created from prediction)"},"OptimizationAssociation":{"anyOf":[{"$ref":"#/components/schemas/AttributionOptimizationAssociation"},{"type":"null"}],"description":"Linked optimization job (if created from optimization)"},"Fit":{"type":"boolean","title":"Fit","description":"Whether this is a fit attribution (FitModelId is set)","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Model","Date","AttributionSets","ReferencePointFallback","PredictedTargetsAsData","UpdateVariable","Fit"],"title":"DetailedAttribution","description":"Detailed response schema for attribution jobs with configuration.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00Z","IId":1,"JobId":123,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"Marketing Model","Region":"all"},"Name":"Q4 Attribution Analysis","Note":"Attribution analysis for Q4","PredictedTargetsAsData":true,"ReferencePointFallback":"Zero","Status":"completed","UIFilterAttributionSets":[],"UpdateVariable":[]}]},"DetailedAttributionSet":{"properties":{"Error":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Error"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active attribution set for the dashboard"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Set creation timestamp"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the set"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/TaskState","description":"Processing state: PENDING, PROCESSING, COMPLETE, or FAILED"},"CreationFilters":{"anyOf":[{},{"type":"null"}],"title":"Creationfilters","description":"Filters for auto-generating attributions (Country/Region)"},"Attributions":{"items":{"$ref":"#/components/schemas/AttributionRef"},"type":"array","title":"Attributions","description":"List of attribution jobs included in this set"},"VariableIIds":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Variableiids","description":"`IId` of every variable across all attributions in this set, when requested with `with_variable_ids=true`. NULL when not requested."},"DataSet":{"anyOf":[{"$ref":"#/components/schemas/DataSetRef"},{"type":"null"}],"description":"Reference to the associated dataset"}},"type":"object","required":["IId","Selected","CreatedDate","Status","Attributions"],"title":"DetailedAttributionSet","description":"Detailed response schema for attribution sets with task progress.","examples":[{"Attributions":[{"DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00Z","IId":1,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"Marketing Model","Region":"all"},"Name":"Attribution 1","Status":"completed"}],"CreatedDate":"2024-01-15T10:30:00Z","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Q4 Dataset","Selected":true,"Status":"complete"},"IId":1,"Name":"Q4 Attribution Set","Note":"Combined attribution analysis for Q4","Selected":true,"Status":"complete"}]},"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. A sim/pred/attribution/optimize/response-curve submission on a strict project (or with `validate_limits`) rejects a Blocked dataset until the limits are patched to cover the data; otherwise the job runs with a warning.","default":false},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Start of the window the dataset was built with; NULL when unbounded. What it was *asked* for — `MinDate` is what the data actually covers."},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"End of the window the dataset was built with."},"MergeOrderBy":{"$ref":"#/components/schemas/MergeOrderBy","description":"What ranked duplicate rows when this dataset was merged."},"Issues":{"anyOf":[{"$ref":"#/components/schemas/MergeIssues"},{"type":"null"}],"description":"Merge issues that failed the build; NULL when it did not"}},"type":"object","required":["IId","Selected","Name","CreatedDate","DataImports","Status","MergeOrderBy"],"title":"DetailedDataSet","description":"Detailed response schema for datasets.\n\nWhat was built on it is counted by GET datasets/{dataset_id}/usage_counts and\nlisted by the list routes filtered on `DataSet.IId`.","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"}]},"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."},"DetailedLiveModels":{"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"},"Status":{"$ref":"#/components/schemas/LiveModelStatus"},"ConfigHash":{"type":"string","title":"Confighash"},"ArtifactHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifacthash"},"PortableHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portablehash"},"ParamDensitiesHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paramdensitieshash"},"BayesKitVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bayeskitversion"},"AbiVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abiversion"},"DataSetIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Datasetiid"},"DatasetFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasetfingerprint"},"Version":{"type":"integer","title":"Version"},"Date":{"type":"string","format":"date-time","title":"Date"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"ParentIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parentiid"},"MaterializedModelIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Materializedmodeliid"},"Config":{"title":"Config"},"RuntimeVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtimeversion"},"Capabilities":{"anyOf":[{},{"type":"null"}],"title":"Capabilities"},"BakeVersion":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bakeversion"}},"type":"object","required":["IId","Status","ConfigHash","Version","Date","Config"],"title":"DetailedLiveModels","description":"Detailed express model response including the config document."},"DetailedModel":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active model for its market segment"},"Country":{"type":"string","title":"Country","description":"Country code from modelling combination (e.g., 'USA', 'GBR')"},"Region":{"type":"string","title":"Region","description":"Region code from modelling combination (e.g., 'all', 'northeast')"},"Grouping":{"type":"string","title":"Grouping","description":"Grouping code from modelling combination (e.g., 'all', 'retail')"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Model training completion timestamp"},"LiveModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodelid","description":"Internal id of the LiveModels row this model was materialized from; null for drun-trained models. Discriminator only - not an API path id."},"LiveModelIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodeliid","description":"Public IId of the source express model (valid in /live_models/{id} paths and builder deep links); populated on the detail endpoint only, null for drun-trained models."},"Parameters":{"anyOf":[{},{"type":"null"}],"title":"Parameters","description":"Model training hyperparameters and configuration"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible model training"},"GraphInstance":{"anyOf":[{"$ref":"#/components/schemas/GraphsInstanceGraph"},{"type":"null"}],"description":"Graph instance defining model structure"},"FullPrediction":{"anyOf":[{"$ref":"#/components/schemas/PredictionJobsRef"},{"type":"null"}],"description":"Full-period prediction job (if generated)"},"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"},"ResponseCurvesSummary":{"anyOf":[{"$ref":"#/components/schemas/ModelResponseCurvesSummary"},{"type":"null"}],"description":"The model's response curves and the variables still computing; null when it has none and nothing is pending"}},"type":"object","required":["IId","DataSet","Status","Selected","Country","Region","Grouping","CreatedDate"],"title":"DetailedModel","description":"Detailed response schema for trained models.\n\nThe jobs run on it are counted by GET models/{model_id}/usage_counts and listed\nby the list routes filtered on `Model.IId`.","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"}]},"DetailedOptimization":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for optimization"},"Params":{"anyOf":[{},{"type":"null"}],"title":"Params","description":"Full optimization configuration parameters"},"TargetResult":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Targetresult","description":"Final objective value achieved by optimization"},"BaselineTarget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baselinetarget","description":"Target goal value (for goal-seek optimizations)"},"BaselineTargetResult":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baselinetargetresult","description":"Objective value at baseline (before optimization)"},"Improvement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Improvement","description":"Percentage improvement over baseline"},"Loss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Loss","description":"Final objective function loss value"},"ConstraintLoss":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Constraintloss","description":"Penalty from constraint violations"},"ConstraintViolations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConstraintViolations"},"type":"array"},{"type":"null"}],"title":"Constraintviolations","description":"List of violated constraints with details"},"ConstraintViolation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Constraintviolation","description":"Total constraint violation magnitude"},"AdditionalConfig":{"anyOf":[{},{"type":"null"}],"title":"Additionalconfig","description":"Additional optimization configuration"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"},"SimulationJob":{"anyOf":[{"$ref":"#/components/schemas/SimulationJobsRef"},{"type":"null"}],"description":"Simulation job created from optimization results"},"UpdateVariable":{"items":{"$ref":"#/components/schemas/UpdateVariable"},"type":"array","title":"Updatevariable","description":"Optimized variable values (the solution)"},"AttributionAssociation":{"items":{"$ref":"#/components/schemas/OptimizationAttributionAssociation"},"type":"array","title":"Attributionassociation","description":"Attribution jobs linked to this optimization"}},"type":"object","required":["IId","DataSet","Status","Date","Model","UpdateVariable","AttributionAssociation"],"title":"DetailedOptimization","description":"Detailed response schema for optimization jobs with results and constraints.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":456,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Budget Optimization","Note":"Optimizing marketing spend for Q4","Status":"completed","UIFilterAttributionAssociation":[],"UpdateVariable":[]}]},"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":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Forecast period start date"},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"Forecast period end date"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for this prediction"},"Scenarios":{"items":{"$ref":"#/components/schemas/_DetailedPredictionScenarios"},"type":"array","title":"Scenarios","description":"Named scenarios with variable modifications"},"AdditionalConfig":{"anyOf":[{},{"type":"null"}],"title":"Additionalconfig","description":"Additional prediction configuration parameters"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"},"AttributionAssociation":{"items":{"$ref":"#/components/schemas/PredictionAttributionAssociation"},"type":"array","title":"Attributionassociation","description":"Attribution jobs linked to this prediction"},"FullModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}],"description":"Model used for full-period prediction"},"FreezeNodes":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Freezenodes","description":"Variables frozen to data values during prediction"},"Quantiles":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Quantiles","description":"Uncertainty quantiles computed (e.g., [5, 50, 95])"},"TargetNodes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Targetnodes","description":"Target variables being predicted"},"Fit":{"type":"boolean","title":"Fit","description":"Whether this is a fit prediction (ModelFitId is set)","readOnly":true},"Source":{"type":"string","enum":["manual","fit","optimization","simulation","prediction"],"title":"Source","description":"What produced this prediction: manual or fit","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Date","Model","Scenarios","AttributionAssociation","Fit","Source"],"title":"DetailedPredictionJobs","description":"Detailed response schema for prediction jobs with scenarios and configuration.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":789,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Sales Prediction","Note":"Prediction for Q4 sales","Scenarios":[],"Status":"completed","UIFilterAttributionAssociation":[]}]},"DetailedPriorPosterior":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for analysis"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"ReferencePointFallback":{"$ref":"#/components/schemas/ReferencePointFallback","description":"How to handle missing reference points: 'zero' or 'mean'"},"FitModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}],"description":"Reference model for fit comparison (if analyzing model fit)"},"Baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttrBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline","description":"Baseline values for variables"}},"type":"object","required":["IId","DataSet","Status","Model","Date","ReferencePointFallback"],"title":"DetailedPriorPosterior","description":"Detailed response schema for prior/posterior distribution analysis.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":101,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Prior Posterior Analysis","Note":"Comparing prior and posterior distributions","ReferencePointFallback":"Zero","Status":"completed"}]},"DetailedSimulationJobs":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for this simulation"},"ScenarioStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scenariostartdate","description":"Start date for scenario comparison period"},"ScenarioEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scenarioenddate","description":"End date for scenario comparison period"},"UpdateVariable":{"items":{"$ref":"#/components/schemas/SimulationUpdateVariable"},"type":"array","title":"Updatevariable","description":"Variable modifications per scenario (baseline vs scenario values)"},"AdditionalConfig":{"anyOf":[{},{"type":"null"}],"title":"Additionalconfig","description":"Additional simulation configuration parameters"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed used for reproducible runs"},"AttributionAssociation":{"items":{"$ref":"#/components/schemas/SimulationAttributionAssociation"},"type":"array","title":"Attributionassociation","description":"Attribution jobs linked to this simulation"},"OptimizationJob":{"anyOf":[{"$ref":"#/components/schemas/OptimizationJobsRef"},{"type":"null"}],"description":"Optimization job that created this simulation (if applicable)"},"Source":{"type":"string","enum":["manual","fit","optimization","simulation","prediction"],"title":"Source","description":"What produced this simulation: manual or optimization","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Date","Model","UpdateVariable","AttributionAssociation","Source"],"title":"DetailedSimulationJobs","description":"Detailed response schema for simulation jobs with scenario configurations.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":456,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Sales Simulation","Note":"Simulation for Q4 marketing scenarios","Status":"completed","UIFilterAttributionAssociation":[],"UpdateVariable":[]}]},"Difference":{"properties":{"scenario":{"type":"string","title":"Scenario"},"base":{"type":"string","title":"Base"}},"additionalProperties":false,"type":"object","required":["scenario","base"],"title":"Difference","description":"The extra per-draw difference layer (bayes-ops predict_multi::DifferenceSpec).\n\nBoth names must be scenarios of the same op. The engine differences them\ninside each posterior draw and reduces to quantiles only afterwards, which\nis why the layer cannot be recomputed from the absolute bands it sits beside."},"Direction":{"properties":{"op":{"$ref":"#/components/schemas/DirectionOP"},"variable":{"type":"string","title":"Variable","description":"Variable slug, named the same way as `targets.variables`"}},"type":"object","required":["op","variable"],"title":"Direction","description":"Define node directions."},"DirectionOP":{"type":"string","enum":["Minimize","Maximize","Neutral"],"title":"DirectionOP","description":"Equality and Inquality operators."},"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","description":"Direction of the distribution effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the distribution effect"},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Distribution","description":"Control the distribution."},"DownloadPredictionBody":{"properties":{"result_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Result Filters"},"minimize_format":{"type":"boolean","title":"Minimize Format","default":false},"output_format":{"type":"string","enum":["csv","parquet"],"title":"Output Format","default":"csv"}},"type":"object","title":"DownloadPredictionBody","description":"Request body for prediction download _query endpoint."},"EarlyStopping":{"properties":{"patience":{"type":"integer","minimum":1.0,"title":"Patience","description":"How many of the last epochs should be used.","default":100},"absolute_tolerance":{"type":"number","minimum":0.0,"title":"Absolute Tolerance","description":"The absolute tolerance to use to determine to stop","default":0.1},"relative_tolerance":{"type":"number","minimum":0.0,"title":"Relative Tolerance","description":"The relative tolerance to use to determine to stop","default":0.1}},"type":"object","title":"EarlyStopping","description":"Config for early stopping."},"EffectType":{"type":"string","enum":["Effect.ImpactSize","Effect.ROISize"],"title":"EffectType","description":"How an effect prior's mean and std are read."},"EqualityInequalityConstraints":{"properties":{"constraint":{"$ref":"#/components/schemas/Code"},"op":{"$ref":"#/components/schemas/EqualityOP"},"value":{"type":"number","title":"Value"}},"type":"object","required":["constraint","op","value"],"title":"EqualityInequalityConstraints","description":"Defines equality and inequality constraint."},"EqualityOP":{"type":"string","enum":["<=",">=","=="],"title":"EqualityOP","description":"Equality and Inquality operators."},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable error message"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"Standard error response schema.","examples":[{"detail":"Resource not found"}]},"Events":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the event effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the event effect"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Events","description":"Control the events."},"ExcelJobs":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier for the export job"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Export job creation timestamp"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Type":{"type":"string","title":"Type","description":"Export type identifier"}},"type":"object","required":["IId","Date","Status","Type"],"title":"ExcelJobs","description":"Response schema for Excel export jobs."},"ExcelPostAttribution":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"attribution","title":"Excel Type","default":"attribution"},"attribution_id":{"type":"integer","title":"Attribution Id"},"quantile":{"type":"integer","title":"Quantile","default":50}},"type":"object","required":["attribution_id"],"title":"ExcelPostAttribution","description":"Post attribution excel job."},"ExcelPostAttributionSet":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"attributionset","title":"Excel Type","default":"attributionset"},"attribution_set_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/AttributionSetType"}],"title":"Attribution Set Id"},"quantile":{"type":"integer","title":"Quantile","default":50}},"type":"object","required":["attribution_set_id"],"title":"ExcelPostAttributionSet","description":"Post attributionset excel job."},"ExcelPostDataUpload":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"dataupload","title":"Excel Type","default":"dataupload"},"upload_id":{"type":"integer","title":"Upload Id"}},"type":"object","required":["upload_id"],"title":"ExcelPostDataUpload","description":"Post dataset excel job."},"ExcelPostDataset":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"dataset","title":"Excel Type","default":"dataset"},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."}},"type":"object","title":"ExcelPostDataset","description":"Post dataset excel job."},"ExcelPostOptimization":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"optimization","title":"Excel Type","default":"optimization"},"optimization_id":{"type":"integer","title":"Optimization Id"}},"type":"object","required":["optimization_id"],"title":"ExcelPostOptimization","description":"Post optimization excel job."},"ExcelPostPrediction":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"prediction","title":"Excel Type","default":"prediction"},"prediction_id":{"type":"integer","title":"Prediction Id"}},"type":"object","required":["prediction_id"],"title":"ExcelPostPrediction","description":"Post prediction excel job."},"ExcelPostSimulation":{"properties":{"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":90},"excel_type":{"type":"string","const":"simulation","title":"Excel Type","default":"simulation"},"simulation_id":{"type":"integer","title":"Simulation Id"}},"type":"object","required":["simulation_id"],"title":"ExcelPostSimulation","description":"Post simulation excel job."},"Extra":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the extra effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the extra effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Extra","description":"Control the extra variables."},"FeatureImportance":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Internal identifier for the feature importance job"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"}},"type":"object","required":["IId","Status"],"title":"FeatureImportance","description":"Response schema for feature importance analysis jobs."},"FileType":{"type":"string","enum":["csv","excel"],"title":"FileType","description":"File type enum."},"FilterMode":{"type":"string","enum":["include","exclude"],"title":"FilterMode","description":"Whether a dataset filter rule keeps rows or drops them.\n\nA row is kept when it matches at least one ``INCLUDE`` (or none is given)\nand no ``EXCLUDE``."},"FitMetric":{"properties":{"scope":{"type":"string","const":"fit","title":"Scope"},"kind":{"$ref":"#/components/schemas/FitMetricKind"},"stage":{"$ref":"#/components/schemas/Stage"}},"type":"object","required":["scope","kind","stage"],"title":"FitMetric","description":"Fit-scope rule metric."},"FitMetricKind":{"type":"string","enum":["r2_score","bayes_r2","mean_absolute_error","mean_absolute_percentage_error","weighted_mean_absolute_percentage_error","mean_squared_error","root_mean_squared_error"],"title":"FitMetricKind","description":"Goodness-of-fit metric kinds (model performance)."},"Graph":{"properties":{"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes"},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges"}},"type":"object","required":["nodes","edges"],"title":"Graph","description":"Schema for graph componens."},"GraphDetail":{"properties":{"graph":{"anyOf":[{"$ref":"#/components/schemas/Graph"},{"type":"null"}],"description":"Graph to build model for. The graph consists of nodes and edge, ex. {'nodes':[{'type':'Node.Data','id':'macro','key':'File:Macro|Indicator:CCI'},{'type':'Node.GraphGenerator.KPI','id':'sales', 'key':'File:Sales|Product:Health|Metric:UnitsSold'}],'edges':[{'arguments':['neutral'],'source':'macro','target':'sales'}]}"},"graph_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Graph Id","description":"The id of graph to use to create models."},"graph_variables":{"anyOf":[{"$ref":"#/components/schemas/BasicModelVariables"},{"type":"null"}],"description":"High-level effect information to use when auto-creating basic models."}},"type":"object","title":"GraphDetail","description":"schema class of graph detail. graph, graph id, and graph variables."},"GraphInstanceModel":{"properties":{"Id":{"type":"integer","title":"Id"},"HasFinished":{"type":"boolean","title":"Hasfinished"},"Models":{"items":{"$ref":"#/components/schemas/ModelsRef"},"type":"array","title":"Models"}},"type":"object","required":["Id","HasFinished","Models"],"title":"GraphInstanceModel","description":"Reference schema for graph instantiations with model info."},"GraphRequest":{"properties":{"graph":{"$ref":"#/components/schemas/Graph","description":"Graph structure defining variable relationships for modeling. Contains 'nodes' (variables) and 'edges' (causal relationships between variables). Each node has type, id, and key; edges define source→target connections."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name the graph is listed under, so it can be found again."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-text note on what the graph is for."}},"type":"object","required":["graph"],"title":"GraphRequest","description":"Request body for creating a new graph structure."},"GraphUpdate":{"properties":{"graph":{"anyOf":[{"$ref":"#/components/schemas/Graph"},{"type":"null"}],"description":"graph instances which want to be updated, consist of node and edge. Leave out to rename or annotate the graph without touching its nodes."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name the graph is listed under, so it can be found again."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Free-text note on what the graph is for."}},"type":"object","title":"GraphUpdate","description":"Schemas of graph patch request endpoint, consist of graph."},"Graphs":{"properties":{"Id":{"type":"integer","title":"Id","description":"Graph identifier"},"Graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph","description":"Graph structure with nodes (variables) and edges (relationships)"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name the graph was saved under"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Note saved with the graph"},"CreatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat","description":"When the graph was saved"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid","description":"User who saved the graph"},"NodeCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nodecount","description":"Nodes in the stored structure, once there is one"},"EdgeCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edgecount","description":"Edges in the stored structure, once there is one"},"InstancesJobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instancesjobid","description":"Background job ID for graph instantiation"},"Instantions":{"items":{"$ref":"#/components/schemas/GraphInstanceModel"},"type":"array","title":"Instantions","description":"List of graph instances created from this graph"}},"type":"object","required":["Id","Instantions"],"title":"Graphs","description":"Response schema for causal graph structures."},"GraphsBasicJob":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Internal identifier for the graph job"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"}},"type":"object","required":["IId","Status"],"title":"GraphsBasicJob","description":"Response schema for graph instantiation jobs."},"GraphsDetail":{"properties":{"graphs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Graph"},"type":"array"},{"type":"null"}],"title":"Graphs","description":"List of graphs to build models for. Each graph consists of nodes and edge, ex. {'nodes':[{'type':'Node.Data','id':'macro','key':'File:Macro|Indicator:CCI'},{'type':'Node.GraphGenerator.KPI','id':'sales', 'key':'File:Sales|Product:Health|Metric:UnitsSold'}],'edges':[{'arguments':['neutral'],'source':'macro','target':'sales'}]}"},"graph_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Graph Ids","description":"List of ids of graphs to use to create models."},"graph_variables":{"anyOf":[{"$ref":"#/components/schemas/BasicModelVariables"},{"type":"null"}],"description":"High-level effect information to use when auto-creating basic models."}},"type":"object","title":"GraphsDetail","description":"schema class of graphs detail. graphs, graph ids, and graph variables."},"GraphsInstanceGraph":{"properties":{"Id":{"type":"integer","title":"Id"},"HasFinished":{"type":"boolean","title":"Hasfinished"},"Graph":{"$ref":"#/components/schemas/GraphsRef"}},"type":"object","required":["Id","HasFinished","Graph"],"title":"GraphsInstanceGraph","description":"Reference schema for graph instantiations with graph info."},"GraphsRef":{"properties":{"Id":{"type":"integer","title":"Id"},"InstancesJobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instancesjobid"},"HasFinished":{"type":"boolean","title":"Hasfinished"}},"type":"object","required":["Id","HasFinished"],"title":"GraphsRef","description":"Reference schema for graphs."},"GroupedModel":{"properties":{"IId":{"type":"integer","title":"Iid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Selected":{"type":"boolean","title":"Selected"},"Status":{"$ref":"#/components/schemas/JobState"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"},"DataSetIId":{"type":"integer","title":"Datasetiid"},"DataSetName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasetname"}},"type":"object","required":["IId","Name","Selected","Status","CreatedDate","DataSetIId","DataSetName"],"title":"GroupedModel","description":"One model inside a modelling-combination group."},"GroupedModelList":{"properties":{"country_code":{"type":"string","title":"Country Code"},"region_code":{"type":"string","title":"Region Code"},"grouping":{"type":"string","title":"Grouping"},"models":{"items":{"$ref":"#/components/schemas/GroupedModel"},"type":"array","title":"Models"},"active_id":{"type":"integer","title":"Active Id","description":"IId of the selected model, -1 when none is."}},"type":"object","required":["country_code","region_code","grouping","models","active_id"],"title":"GroupedModelList","description":"A modelling combination with its models and the selected one."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Holidays":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the holiday effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the holiday effect"},"shared":{"type":"boolean","title":"Shared","description":"Should the effect be shared between the targets or should the effect be individual per targets.","default":false}},"type":"object","title":"Holidays","description":"Control the holidays."},"ImpactSize":{"properties":{"mean":{"type":"number","title":"Mean","description":"The mean impact of the variable","default":0.1},"std":{"type":"number","title":"Std","description":"Allowed Variation in the model","default":0.2},"type":{"$ref":"#/components/schemas/EffectType","description":"Effect.ImpactSize reads mean and std as the share of the KPI the group moves; Effect.ROISize, honoured on media and customer_experience only, as a return on investment","default":"Effect.ImpactSize"}},"type":"object","title":"ImpactSize","description":"How big impact will the varible group have on sales."},"InitValue":{"properties":{"variable":{"type":"string","title":"Variable","description":"variable name"},"value":{"$ref":"#/components/schemas/InitValues"}},"type":"object","required":["variable","value"],"title":"InitValue","description":"Define init values."},"InitValues":{"type":"string","enum":["random","min","max","mean","median","range10","range20","range30","range40","range50","range60","range70","range80","range90"],"title":"InitValues","description":"Init value types."},"InterpStep":{"type":"string","enum":["ffill","bfill","linear","set_zero"],"title":"InterpStep","description":"One step of a variable's interpolation chain.\n\nAlso the ``InterpolationStep`` Postgres enum: the stored per-variable config\nis an ordered array of these, and the DuckDB fill engine dispatches on the\nsame values."},"InterpolateUploadBody":{"properties":{"data_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data Filters"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data."},"interpolation_overrides":{"anyOf":[{"items":{"$ref":"#/components/schemas/PreviewVariableInterpolation"},"type":"array"},{"type":"null"}],"title":"Interpolation Overrides","description":"Preview-only interpolation chains, applied to this request and never stored. Each row overrides the chain of one variable in one modelling combination; anything unlisted keeps its stored config. Rows are validated against the variables and combinations the entity carries, regardless of date — a variable with no data in the requested window is still a valid target, because the fill extrapolates into it."}},"type":"object","title":"InterpolateUploadBody","description":"Request body for interpolated upload _query endpoint."},"InterpolateVariableDataBody":{"properties":{"data_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data Filters"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Start date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid starts at the first date holding a non-null value."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"End date for extrapolated data. This parameter is only for extrapolation, not to limit the data; to filter the data pass it into data_filters. Omitted, the grid ends at the last date in the data."},"interpolation_overrides":{"anyOf":[{"items":{"$ref":"#/components/schemas/PreviewVariableInterpolation"},"type":"array"},{"type":"null"}],"title":"Interpolation Overrides","description":"Preview-only interpolation chains, applied to this request and never stored. Each row overrides the chain of one variable in one modelling combination; anything unlisted keeps its stored config. Rows are validated against the variables and combinations the entity carries, regardless of date — a variable with no data in the requested window is still a valid target, because the fill extrapolates into it."},"dataset_names":{"anyOf":[{"items":{"$ref":"#/components/schemas/Dataset"},"type":"array"},{"type":"null"}],"title":"Dataset Names"}},"type":"object","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``."},"JobCounts":{"properties":{"Total":{"type":"integer","title":"Total","description":"Undeleted rows of this kind"},"Completed":{"type":"integer","title":"Completed","description":"Of those, the ones that completed"}},"type":"object","required":["Total","Completed"],"title":"JobCounts","description":"How many undeleted rows of one kind there are, and how many completed."},"JobOrigin":{"type":"string","enum":["manual","plan","fit","model"],"title":"JobOrigin","description":"Where a simulation/prediction/optimization/response-curve job originated.\n\n``manual`` is a user-created one-off; ``plan`` is a planning candidate's\njob; ``fit`` is an in-sample fit / diagnostic run; ``model`` is a response\ncurve job computed for a model's own curves."},"JobState":{"type":"string","enum":["pending","running","failed","saving_results","completed","processing_upload","submitted","stopped"],"title":"JobState","description":"Drun job states."},"JobStatus":{"properties":{"IId":{"type":"integer","title":"Iid"},"Status":{"$ref":"#/components/schemas/JobState"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Its drun job; null before submission and for kinds run in-process"}},"type":"object","required":["IId","Status","JobId"],"title":"JobStatus","description":"One undeleted job's state, from GET <kind>/status."},"LineageActivePeriod":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"},"by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"By"}},"type":"object","required":["start","end","by"],"title":"LineageActivePeriod","description":"A stretch of time during which an object was the active one."},"LineageBlocker":{"properties":{"key":{"type":"string","title":"Key"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["key","reason"],"title":"LineageBlocker","description":"An active object that a cascade delete would remove."},"LineageDeleteBlocked":{"properties":{"detail":{"$ref":"#/components/schemas/LineageDeletePreview"}},"type":"object","required":["detail"],"title":"LineageDeleteBlocked","description":"Body of a cascade delete refused because of active objects."},"LineageDeletePreview":{"properties":{"will_delete":{"items":{"type":"string"},"type":"array","title":"Will Delete"},"blockers":{"items":{"$ref":"#/components/schemas/LineageBlocker"},"type":"array","title":"Blockers"},"outside_nodes":{"items":{"$ref":"#/components/schemas/LineageNode"},"type":"array","title":"Outside Nodes"},"other_deleted":{"additionalProperties":{"type":"integer"},"type":"object","title":"Other Deleted"},"hidden_deleted":{"additionalProperties":{"type":"integer"},"type":"object","title":"Hidden Deleted"},"hidden_blockers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Hidden Blockers"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["will_delete","blockers","outside_nodes","other_deleted","hidden_deleted","hidden_blockers","truncated"],"title":"LineageDeletePreview","description":"What a cascade delete of the root would remove."},"LineageEdge":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"}},"type":"object","required":["source","target"],"title":"LineageEdge","description":"Parent to child link between two lineage nodes."},"LineageGraph":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/LineageNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/LineageEdge"},"type":"array","title":"Edges"},"truncated":{"type":"boolean","title":"Truncated"},"restricted":{"type":"boolean","title":"Restricted"}},"type":"object","required":["nodes","edges","truncated","restricted"],"title":"LineageGraph","description":"Upstream and downstream objects of a root object."},"LineageKind":{"type":"string","enum":["uploads","datasets","models","predictions","simulations","optimizations","response_curves","attributions","attribution_sets"],"title":"LineageKind","description":"Object kinds in the lineage graph."},"LineageNode":{"properties":{"key":{"type":"string","title":"Key"},"kind":{"$ref":"#/components/schemas/LineageKind"},"iid":{"type":"integer","title":"Iid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"selected":{"type":"boolean","title":"Selected"},"is_live":{"type":"boolean","title":"Is Live"},"is_root":{"type":"boolean","title":"Is Root"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"active_periods":{"items":{"$ref":"#/components/schemas/LineageActivePeriod"},"type":"array","title":"Active Periods"}},"type":"object","required":["key","kind","iid","name","created_at","selected","is_live","is_root","status"],"title":"LineageNode","description":"One object in a lineage graph."},"ListedModels":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active model for its market segment"},"Country":{"type":"string","title":"Country","description":"Country code from modelling combination (e.g., 'USA', 'GBR')"},"Region":{"type":"string","title":"Region","description":"Region code from modelling combination (e.g., 'all', 'northeast')"},"Grouping":{"type":"string","title":"Grouping","description":"Grouping code from modelling combination (e.g., 'all', 'retail')"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Model training completion timestamp"},"LiveModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodelid","description":"Internal id of the LiveModels row this model was materialized from; null for drun-trained models. Discriminator only - not an API path id."},"LiveModelIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodeliid","description":"Public IId of the source express model (valid in /live_models/{id} paths and builder deep links); populated on the detail endpoint only, null for drun-trained models."},"GraphInstanceId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Graphinstanceid","description":"Id of the graph instance the model was trained on; null for models materialized from an express model"},"GraphId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Graphid","description":"Id of the graph the model's graph instance was built from"}},"type":"object","required":["IId","DataSet","Status","Selected","Country","Region","Grouping","CreatedDate"],"title":"ListedModels","description":"Response schema for one row of the model list, with its graph lineage.\n\nKept off `Models` because the other routes returning that schema do not load\n`GraphInstance`, and its `lazy=\"raise\"` would fail them.","examples":[{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Grouping":"all","IId":1,"JobId":123,"Name":"USA All Model","Note":"Model for USA market","Region":"all","Selected":true,"Status":"completed"}]},"LiveModelEngineKind":{"type":"string","enum":["wasm-browser","portable-wasm","native-cli","native-py"],"title":"LiveModelEngineKind","description":"Engine that produced a live-model result (SPEC section 3)."},"LiveModelFitPost":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"bayes-lmb ModelConfig JSON (spec of the model)."},"dataset_id":{"type":"integer","title":"Dataset Id","description":"IId of the dataset to fit on, within the project. Becomes the model's dataset. Required: a fit on no dataset produces a model that adds no value, and comnav names the rows a fit runs on rather than receiving them."},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id","description":"IId of the previous version, if any, within the project."},"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"},"seed":{"type":"integer","title":"Seed","description":"Every bayes-ops Spec defaults `samples` to 200, so a seedless fit is not reproducible - SPEC §5.2."},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Priority","default":5}},"type":"object","required":["config","dataset_id","seed"],"title":"LiveModelFitPost","description":"Request body for creating an express model by fitting it on the server.\n\nCarries the model (`config`, lineage, dataset) and the fit (`seed`,\nwindow) in one request, because the row it inserts exists only to hold\nthat fit's result. The dataset fingerprint is not taken from the client:\nthe worker that runs the fit computes it from the rows it actually fitted\non and stamps it at completion."},"LiveModelJobStatus":{"properties":{"IId":{"type":"integer","title":"Iid"},"Status":{"$ref":"#/components/schemas/LiveModelStatus"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Its drun job; null before submission and for kinds run in-process"}},"type":"object","required":["IId","Status","JobId"],"title":"LiveModelJobStatus","description":"One undeleted express model's state."},"LiveModelMaterialized":{"properties":{"ModelIId":{"type":"integer","title":"Modeliid"}},"type":"object","required":["ModelIId"],"title":"LiveModelMaterialized","description":"Response for POST /live_models/{id}/materialize."},"LiveModelPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."}},"additionalProperties":false,"type":"object","title":"LiveModelPatch","description":"Request body for renaming or re-noting an express model.\n\nName and note are the entire mutable surface. Everything a hash binds -\nconfig, artifact, dataset, lineage - is fixed at creation, so `extra` is\nforbidden and a client still sending `config` gets a 422 rather than a\nsilent no-op."},"LiveModelReplayStatus":{"type":"string","enum":["unverified","pending","verified_exact","verified_tolerance","failed"],"title":"LiveModelReplayStatus","description":"Replay-verification verdict for a live-model result."},"LiveModelResultKind":{"type":"string","enum":["prediction","simulation","response_curve","attribution","optimization","prior_posterior"],"title":"LiveModelResultKind","description":"Kind of a live-model result."},"LiveModelResultOrigin":{"type":"string","enum":["browser","server"],"title":"LiveModelResultOrigin","description":"Where a live-model result was computed."},"LiveModelResults":{"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/LiveModelResultKind"},"Origin":{"$ref":"#/components/schemas/LiveModelResultOrigin"},"Status":{"$ref":"#/components/schemas/JobState"},"LiveModelIId":{"type":"integer","title":"Livemodeliid"},"Params":{"title":"Params"},"Seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"Op":{"anyOf":[{"type":"string","enum":["predict","predict_multi","simulate","response_curve","decompose","optimize","prior_posterior"]},{"type":"null"}],"title":"Op"},"EngineKind":{"$ref":"#/components/schemas/LiveModelEngineKind"},"EngineHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enginehash"},"ModelHash":{"type":"string","title":"Modelhash"},"InputHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inputhash"},"OutputHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputhash"},"Input":{"anyOf":[{},{"type":"null"}],"title":"Input","description":"Dataset, combination and window the op ran on. The rows are read back from here for replay; comnav stores no copy of them."},"Versions":{"title":"Versions"},"ReplayStatus":{"$ref":"#/components/schemas/LiveModelReplayStatus"},"ReplayDetail":{"anyOf":[{},{"type":"null"}],"title":"Replaydetail"},"Date":{"type":"string","format":"date-time","title":"Date"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"}},"type":"object","required":["IId","Kind","Origin","Status","LiveModelIId","Params","EngineKind","ModelHash","Versions","ReplayStatus","Date"],"title":"LiveModelResults","description":"Response schema for a live-model result row."},"LiveModelStatus":{"type":"string","enum":["fitting","ready","failed"],"title":"LiveModelStatus","description":"Lifecycle of a live (bayes-kit) model.\n\nThere is no draft: a row exists only because it carries a fit, or because\none is in flight. `FITTING` is the single state in which artifact columns are\nstill NULL, and its only exits are `READY` and `FAILED`."},"LiveModels":{"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"},"Status":{"$ref":"#/components/schemas/LiveModelStatus"},"ConfigHash":{"type":"string","title":"Confighash"},"ArtifactHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Artifacthash"},"PortableHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portablehash"},"ParamDensitiesHash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paramdensitieshash"},"BayesKitVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bayeskitversion"},"AbiVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abiversion"},"DataSetIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Datasetiid"},"DatasetFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Datasetfingerprint"},"Version":{"type":"integer","title":"Version"},"Date":{"type":"string","format":"date-time","title":"Date"},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"ParentIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parentiid"},"MaterializedModelIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Materializedmodeliid"}},"type":"object","required":["IId","Status","ConfigHash","Version","Date"],"title":"LiveModels","description":"Response schema for express model listing."},"LogTypes":{"type":"string","enum":["stderr","stdout"],"title":"LogTypes","description":"Drun log type."},"Macro":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the macro effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the macro effect"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Macro","description":"Control the macro variables."},"MaterializeRequest":{"properties":{"result_iids":{"items":{"type":"integer"},"type":"array","title":"Result Iids","description":"IIds of this model's completed results to build the derived views from. Their dates, KPI and modelling combination are read from the rows themselves."},"performance":{"items":{"$ref":"#/components/schemas/PerformanceEntry"},"type":"array","title":"Performance","description":"Fit metrics from the run that produced these results. Sent because they are the browser fit's own output and comnav has no other source for them."},"combination":{"anyOf":[{"$ref":"#/components/schemas/ModellingCombinationBaseModel"},{"type":"null"}],"description":"Which combination to materialize on. Only consulted when no result is attached to read one off - a materialize that carries results uses the combination they actually ran on, and disagreeing with it is not expressible."},"compute_attribution":{"type":"boolean","title":"Compute Attribution","description":"Submit a decompose job when the supplied decomposition is a point estimate. A MAP decomposition carries one quantile and the attribution view renders bands from five, so the fit attribution is unreadable without it. Set false to keep the point rows as-is.","default":true},"compute_prior_posterior":{"type":"boolean","title":"Compute Prior Posterior","description":"Recompute prior-posterior server-side when the client supplied no prior_posterior result. Only consulted in that case - supplied results are always used. Set false to materialize without it: the recompute is the slowest part of this request and the details page simply shows no prior-posterior view until one is attached.","default":true}},"type":"object","title":"MaterializeRequest","description":"Body for POST /live_models/{id}/materialize.\n\nNames what to materialize; everything about the results themselves is read\nback off the stored rows. A result already records the dataset, combination\nand window its op ran on (`LiveModelResults.Input`) and the KPI it was\ncomputed for (`Params.kpi`), so asking a client to restate them made the\nlabelling of every derived row a claim comnav could only length-check."},"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","description":"Direction of the media effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the media effect"},"effect_in_days":{"type":"number","minimum":1.0,"title":"Effect In Days","description":"For how many days into the future do we expect a media investment to have an impact","default":120},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false},"net_profit_node":{"type":"boolean","title":"Net Profit Node","description":"Construct a `NetProfit` node i.e. Profit-investments. This will be shown in the dashboards etc. as a `Response`","default":false}},"type":"object","title":"Media","description":"Control the media."},"MergeIssue":{"properties":{"code":{"type":"string","enum":["media_multiple_metrics","media_inconsistent_dates"],"title":"Code"},"category":{"type":"string","const":"Media","title":"Category"},"group":{"additionalProperties":{"type":"string"},"type":"object","title":"Group","description":"The group's key columns"},"sources":{"items":{"$ref":"#/components/schemas/MergeIssueSource"},"type":"array","title":"Sources"}},"type":"object","required":["code","category","group","sources"],"title":"MergeIssue","description":"A merged group that breaks a dataset rule, with the sources behind it."},"MergeIssueSource":{"properties":{"upload_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Upload Id","description":"Upload IId"},"dataset_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dataset Id","description":"Source dataset IId"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The source's name when the issue was found"},"values":{"items":{"type":"string"},"type":"array","title":"Values","description":"Metrics (multiple metrics) or dates (inconsistent dates)"}},"type":"object","required":["values"],"title":"MergeIssueSource","description":"One source's share of a merge issue: the metrics or dates it contributes."},"MergeIssues":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/MergeIssue"},"type":"array","title":"Issues","default":[]},"truncated":{"type":"integer","title":"Truncated","description":"Issues beyond the listed ones","default":0}},"type":"object","title":"MergeIssues","description":"Merge issues, listed up to a cap; the groups beyond it are counted."},"MergeOrderBy":{"type":"string","enum":["insert_date","source_order"],"title":"MergeOrderBy","description":"What a dataset merge ranks duplicates by; the last one wins.\n\nAlso the ``MergeOrderBy`` Postgres enum. ``INSERT_DATE`` is the historical\nbehaviour; ``SOURCE_ORDER`` ranks by ``DataSetSource.Order``, so keeping the\nfirst declared source is a matter of declaring them the other way round."},"MissingUnitMetric":{"properties":{"UnitsSold":{"type":"string","title":"Unitssold"},"Product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"},"Metric":{"$ref":"#/components/schemas/SalesMetrics"}},"type":"object","required":["UnitsSold","Metric"],"title":"MissingUnitMetric","description":"A per-unit variable a derived optimization target needs and lacks."},"ModelActiveHistory":{"properties":{"Id":{"type":"integer","title":"Id"},"ModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Modelid"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"}},"type":"object","required":["Id","ModelId","UpdatedByUser","UpdatedAt","Country","Region","Grouping"],"title":"ModelActiveHistory","description":"Response schema for model active history records."},"ModelActiveHistoryEntry":{"properties":{"Id":{"type":"integer","title":"Id"},"IId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Iid"},"Action":{"$ref":"#/components/schemas/ActiveHistoryAction"},"UpdatedByUser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedbyuser"},"UpdatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"}},"type":"object","required":["Id","IId","Action","UpdatedByUser","UpdatedAt","Country","Region","Grouping"],"title":"ModelActiveHistoryEntry","description":"A model activation/deactivation event with modelling-combination context."},"ModelAttribution":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","description":"Set predicted targets as data.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed. If omitted, the chained attribution inherits the parent job's seed."},"attribution_set":{"anyOf":[{"$ref":"#/components/schemas/AttributionRequestNoValidation"},{"type":"null"}],"description":"Auto-run attribution set after attribution finished."},"fit_attribution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fit Attribution","description":"Set attribution as fit attribution of the model.","default":true}},"type":"object","title":"ModelAttribution","description":"Model attribution request."},"ModelBuildMultipleRequest":{"properties":{"model_param":{"anyOf":[{"$ref":"#/components/schemas/ModelParams"},{"type":"null"}],"description":"The parameter for the model/models. Will use default values if it's empty.","default":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30}},"models_detail":{"$ref":"#/components/schemas/ModelsDetail","description":"Configuration for all models in the batch: dataset, training dates, and per-model settings (names, notes, modelling combinations). Each combination creates one model."},"graphs_detail":{"anyOf":[{"$ref":"#/components/schemas/GraphsDetail"},{"type":"null"}],"description":"Graph structure(s) defining variable relationships. Provide either graph objects directly, graph IDs to reference existing graphs, or graph_variables for auto-generation."},"add_prediction":{"type":"boolean","title":"Add Prediction","description":"If True, automatically creates a full prediction job after each model completes training. Useful for immediate model validation.","default":false},"add_priorposterior":{"anyOf":[{"$ref":"#/components/schemas/PriorPosterior-Input"},{"type":"null"}],"description":"If provided, automatically runs prior/posterior analysis after model completes. Compares learned parameters against prior distributions."},"add_attribution":{"anyOf":[{"$ref":"#/components/schemas/ModelAttribution"},{"type":"null"}],"description":"Auto-runs attribution analysis after model completes. Quantifies variable contributions to the target KPI."},"allow_no_sales":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow No Sales","description":"Allow submission without required dataset types (e.g., Sales). Set to True for models that don't require outcome data.","default":false},"skip_graph_validation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Graph Validation","description":"If True, skips validation of graph structure.","default":false},"strip_unknown_fields":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strip Unknown Fields","description":"If True, the engine drops node fields their node type does not define instead of rejecting the graph. Applies to this build only and is not stored with the graph. Meant for the UI replaying graphs saved before the engine validated node fields.","default":false},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible model training. If omitted, the server generates a random seed shared across all models in the batch."}},"type":"object","required":["models_detail"],"title":"ModelBuildMultipleRequest","description":"Request body for building multiple models in a single batch job.","examples":[{"add_attribution":{"fit_attribution":true,"name":"Auto Attribution","priority":30,"quantiles":[1,25,50,75,99],"samples":20},"add_prediction":true,"allow_no_sales":false,"graphs_detail":{"graph_ids":[1]},"model_param":{"epochs":500,"grad_clip":10,"learning_rate":0.01,"priority":30,"samples":2},"models_detail":{"activate":true,"dataset_id":1,"early_stopping":{"absolute_tolerance":0.1,"patience":100,"relative_tolerance":0.1},"modelling_combinations":[{"country_code":"USA","grouping":"all","region_code":"all"},{"country_code":"GBR","grouping":"all","region_code":"all"}],"names":["USA National Model","GBR National Model"],"notes":["USA market model","GBR market model"]}}]},"ModelBuildRequest":{"properties":{"model_param":{"anyOf":[{"$ref":"#/components/schemas/ModelParams"},{"type":"null"}],"description":"The parameter for the model/models. Will use default values if it's empty.","default":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30}},"model_detail":{"$ref":"#/components/schemas/ModelDetail","description":"Core model configuration: dataset reference, training/evaluation dates, modelling combination (filters), and metadata (name, note)."},"graph_detail":{"anyOf":[{"$ref":"#/components/schemas/GraphDetail"},{"type":"null"}],"description":"Graph structure defining variable relationships. Provide either a graph object directly, a graph_id to reference an existing graph, or graph_variables for auto-generation."},"add_prediction":{"type":"boolean","title":"Add Prediction","description":"If True, automatically creates a full prediction job after model completes training. Useful for immediate model validation.","default":false},"add_priorposterior":{"anyOf":[{"$ref":"#/components/schemas/PriorPosterior-Input"},{"type":"null"}],"description":"If provided, automatically runs prior/posterior analysis after model completes. Compares learned parameters against prior distributions."},"add_attribution":{"anyOf":[{"$ref":"#/components/schemas/ModelAttribution"},{"type":"null"}],"description":"Auto-runs attribution analysis after model completes. Quantifies variable contributions to the target KPI."},"allow_no_sales":{"type":"boolean","title":"Allow No Sales","description":"Allow submission without required dataset types (e.g., Sales). Set to True for models that don't require outcome data.","default":false},"skip_graph_validation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Graph Validation","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}}]},"ModelCurveCoverage":{"properties":{"ModelId":{"type":"integer","title":"Modelid","description":"The model's IId"},"ModelName":{"type":"string","title":"Modelname"},"MissingGroups":{"items":{"type":"string"},"type":"array","title":"Missinggroups","description":"Project response curve groups with inputs the set lacks"},"MissingVariables":{"items":{"type":"string"},"type":"array","title":"Missingvariables","description":"Input variables in the project groups the set lacks"},"Pending":{"type":"boolean","title":"Pending","description":"Whether a curve job for the model is running"}},"type":"object","required":["ModelId","ModelName","MissingGroups","MissingVariables","Pending"],"title":"ModelCurveCoverage","description":"How far a model's current curves cover its project groups' inputs."},"ModelCurveVariable":{"properties":{"Variable":{"type":"string","title":"Variable"},"ResponseCurveId":{"type":"integer","title":"Responsecurveid","description":"IId of the curve job behind it"},"StartVal":{"type":"number","title":"Startval"},"EndVal":{"type":"number","title":"Endval"},"Steps":{"type":"integer","title":"Steps"},"Health":{"items":{"type":"string"},"type":"array","title":"Health","description":"Health flags of the curve; empty when it looks sound","default":[]}},"type":"object","required":["Variable","ResponseCurveId","StartVal","EndVal","Steps"],"title":"ModelCurveVariable","description":"A variable of a model's response curves, and the job that curves it."},"ModelCurvesStarted":{"properties":{"ResponseCurveId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Responsecurveid","description":"IId of the job; null for a queued top-up or when nothing was missing"},"Variables":{"items":{"type":"string"},"type":"array","title":"Variables","description":"Variables the curves are computed for"},"Skipped":{"items":{"type":"string"},"type":"array","title":"Skipped","description":"Variables without a default grid: zero throughout the dataset or no range within their limits"}},"type":"object","required":["Variables","Skipped"],"title":"ModelCurvesStarted","description":"The curve job a request started for a model's response curves."},"ModelDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"train_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Train Dates","description":"List of train dates."},"eval_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Eval Dates","description":"List of eval dates."},"activate":{"type":"boolean","title":"Activate","description":"Activate the model/dataset as soon as it is done training.","default":false},"early_stopping":{"anyOf":[{"$ref":"#/components/schemas/EarlyStopping"},{"type":"null"}],"description":"Early stopping configuration for the model training."},"modelling_combination":{"$ref":"#/components/schemas/ModellingCombinationBaseModel","description":"Modelling combination for the model."}},"type":"object","required":["modelling_combination"],"title":"ModelDetail","description":"schema  class of model detail."},"ModelParams":{"properties":{"epochs":{"type":"integer","title":"The epochs","description":"Maximum training iterations. Model may stop earlier if early_stopping is configured. Higher values allow more learning but risk overfitting. Default (500) works for most models.","default":500},"learning_rate":{"type":"number","title":"The learning rate","description":"Step size for gradient descent optimization. Lower values (0.001) give more stable but slower training. Higher values (0.1) train faster but may overshoot. Default (0.01) is a good starting point.","default":0.01},"samples":{"type":"integer","title":"The samples","description":"Number of posterior samples during training for Bayesian inference. Higher values improve uncertainty estimates but slow training. Default (2) balances speed and quality.","default":2},"grad_clip":{"type":"number","title":"The grad clip","description":"Maximum gradient magnitude to prevent exploding gradients. Lower values make training more stable but may slow convergence. Default (10) is suitable for most models.","default":10},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"Job queue priority from 1-100. Higher values are processed first. Model training is typically lower priority (30) since it's longer-running.","default":30}},"type":"object","title":"ModelParams","description":"Training hyperparameters and job settings for model building.","examples":[{"epochs":500,"grad_clip":10,"learning_rate":0.01,"priority":30,"samples":2}]},"ModelPerformace":{"properties":{"Variable":{"type":"string","title":"Variable"},"Stage":{"type":"string","title":"Stage"},"Metric":{"type":"string","title":"Metric"},"Value":{"type":"number","title":"Value"}},"type":"object","required":["Variable","Stage","Metric","Value"],"title":"ModelPerformace","description":"Model performance."},"ModelQualitySummary":{"properties":{"Status":{"$ref":"#/components/schemas/JobState"},"ModelPerformance":{"items":{"$ref":"#/components/schemas/ModelPerformace"},"type":"array","title":"Modelperformance"},"FitAttributionIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fitattributioniid"},"FitAttributionStatus":{"anyOf":[{"$ref":"#/components/schemas/JobState"},{"type":"null"}]},"GroupMetrics":{"items":{"$ref":"#/components/schemas/AttributionGroupMetric"},"type":"array","title":"Groupmetrics"},"VariableMetrics":{"items":{"$ref":"#/components/schemas/AttributionVariableMetric"},"type":"array","title":"Variablemetrics"},"GroupRoi":{"items":{"$ref":"#/components/schemas/AttributionGroupROIMetric"},"type":"array","title":"Grouproi"},"VariableRoi":{"items":{"$ref":"#/components/schemas/AttributionVariableROIMetric"},"type":"array","title":"Variableroi"},"CurveHealth":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Curvehealth"}},"type":"object","required":["Status","ModelPerformance","GroupMetrics","VariableMetrics","GroupRoi","VariableRoi"],"title":"ModelQualitySummary","description":"Batched inputs for one model's quality verdict: status, performance, metrics.\n\nAssembled by GET /models/quality for many models in one round trip,\nreplacing what would otherwise be GET /models/{id} plus four attribution\nmetrics calls (group_metrics, variable_metrics, group_roi, variable_roi)\nrepeated per model."},"ModelRefitDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"train_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Train Dates","description":"List of train dates."},"eval_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Eval Dates","description":"List of eval dates."},"activate":{"type":"boolean","title":"Activate","description":"Activate the model/dataset as soon as it is done training.","default":false},"early_stopping":{"anyOf":[{"$ref":"#/components/schemas/EarlyStopping"},{"type":"null"}],"description":"Early stopping configuration for the model training."}},"type":"object","title":"ModelRefitDetail","description":"schemas class of model refit detail."},"ModelRefitRequest":{"properties":{"model_param":{"$ref":"#/components/schemas/ModelParams","description":"The parameter for the model/models. Will use default values if it's empty.","default":{"epochs":500,"learning_rate":0.01,"samples":2,"grad_clip":10,"priority":30}},"model_detail":{"$ref":"#/components/schemas/ModelRefitDetail","description":"Refit configuration: new dataset reference, updated training dates, and metadata. Uses original model's graph structure and settings.","default":{"activate":false}},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible model training. If omitted, the server generates a random seed."}},"type":"object","title":"ModelRefitRequest","description":"Request body for refitting an existing model with new data or settings."},"ModelResponseCurves":{"properties":{"Variables":{"items":{"$ref":"#/components/schemas/ModelCurveVariable"},"type":"array","title":"Variables","description":"Each variable the model has a curve for"},"Computing":{"items":{"type":"string"},"type":"array","title":"Computing","description":"Variables of curve jobs for the model still running, including recomputes of variables it already has"},"Failed":{"items":{"type":"string"},"type":"array","title":"Failed","description":"Variables of the model's newest curve job when it failed"},"Missing":{"items":{"type":"string"},"type":"array","title":"Missing","description":"Inputs in the project's response curve groups without a curve and not computing"},"Pending":{"type":"boolean","title":"Pending","description":"Whether curve work for the model has yet to finish, including a queued start whose variables are not known yet"}},"type":"object","required":["Variables","Computing","Failed","Missing","Pending"],"title":"ModelResponseCurves","description":"A model's response curves, and what is computing, failed or missing."},"ModelResponseCurvesPost":{"properties":{"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"Variable slugs to compute; one the model already has a curve for is recomputed and its new curve replaces the old. Omitted computes the model's inputs in the project's response_curve_groups that its curves lack (all of them with `replace`)."},"replace":{"type":"boolean","title":"Replace","description":"Make the new curves alone the model's curves, dropping the rest.","default":false}},"type":"object","title":"ModelResponseCurvesPost","description":"Compute a model's own response curves on the platform default grid."},"ModelResponseCurvesSummary":{"properties":{"Variables":{"items":{"type":"string"},"type":"array","title":"Variables","description":"Variables the model has curves for"},"Computing":{"items":{"type":"string"},"type":"array","title":"Computing","description":"Variables of curve jobs for the model still running"},"Pending":{"type":"boolean","title":"Pending","description":"Whether curve work for the model is pending","default":false},"Health":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Health","description":"Health flags per variable; null when unknown"}},"type":"object","required":["Variables","Computing"],"title":"ModelResponseCurvesSummary","description":"What a model's response curves cover and what is still computing."},"ModelUsageCounts":{"properties":{"Simulations":{"$ref":"#/components/schemas/JobCounts","description":"Simulations submitted directly, not by an optimization"},"OptimizationSimulations":{"$ref":"#/components/schemas/JobCounts","description":"Simulations an optimization submitted"},"Predictions":{"$ref":"#/components/schemas/JobCounts"},"Optimizations":{"$ref":"#/components/schemas/JobCounts"},"Attributions":{"$ref":"#/components/schemas/JobCounts"}},"type":"object","required":["Simulations","OptimizationSimulations","Predictions","Optimizations","Attributions"],"title":"ModelUsageCounts","description":"Undeleted jobs run on one model, per kind."},"ModellingCombinationBaseModel":{"properties":{"country_code":{"type":"string","title":"Country Code"},"region_code":{"type":"string","title":"Region Code"},"grouping":{"type":"string","title":"Grouping"}},"type":"object","required":["country_code","region_code","grouping"],"title":"ModellingCombinationBaseModel","description":"Schema for getting modelling combination (BaseModel)."},"ModellingCombinationForDataImport":{"properties":{"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"}},"type":"object","required":["Country","Region","Grouping"],"title":"ModellingCombinationForDataImport","description":"Schema for modelling combination for data import."},"Models":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Selected":{"type":"boolean","title":"Selected","description":"Whether this is the active model for its market segment"},"Country":{"type":"string","title":"Country","description":"Country code from modelling combination (e.g., 'USA', 'GBR')"},"Region":{"type":"string","title":"Region","description":"Region code from modelling combination (e.g., 'all', 'northeast')"},"Grouping":{"type":"string","title":"Grouping","description":"Grouping code from modelling combination (e.g., 'all', 'retail')"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate","description":"Model training completion timestamp"},"LiveModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodelid","description":"Internal id of the LiveModels row this model was materialized from; null for drun-trained models. Discriminator only - not an API path id."},"LiveModelIId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livemodeliid","description":"Public IId of the source express model (valid in /live_models/{id} paths and builder deep links); populated on the detail endpoint only, null for drun-trained models."}},"type":"object","required":["IId","DataSet","Status","Selected","Country","Region","Grouping","CreatedDate"],"title":"Models","description":"Response schema for trained models listing and summary views.","examples":[{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Grouping":"all","IId":1,"JobId":123,"Name":"USA All Model","Note":"Model for USA market","Region":"all","Selected":true,"Status":"completed"}]},"ModelsDetail":{"properties":{"names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Names","description":"Name list for the model, the list needs to be the same length with modelling_combinations."},"notes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Notes","description":"Description for the model/dataset"},"prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Prefixes","description":"Prefix for the name."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"train_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Train Dates","description":"List of train dates."},"eval_dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Eval Dates","description":"List of eval dates."},"activate":{"type":"boolean","title":"Activate","description":"Activate the model/dataset as soon as it is done training.","default":false},"early_stopping":{"anyOf":[{"$ref":"#/components/schemas/EarlyStopping"},{"type":"null"}],"description":"Early stopping configuration for the model training."},"modelling_combinations":{"items":{"$ref":"#/components/schemas/ModellingCombinationBaseModel"},"type":"array","title":"Modelling Combinations","description":"Modelling combination list for the models."}},"type":"object","required":["modelling_combinations"],"title":"ModelsDetail","description":"schema  class of models detail."},"ModelsRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"}},"type":"object","required":["IId","Country","Region","Grouping","CreatedDate"],"title":"ModelsRef","description":"Reference schema for models."},"OpSpecCurveOp":{"properties":{"variable":{"type":"string","title":"Variable","description":"The `curve_inputs[].variable` this op sweeps - the key `browser_results` and `browser_input_hashes` take on POST /response_curve."},"op":{"$ref":"#/components/schemas/OpSpecOp"},"input_hash":{"type":"string","title":"Input Hash"}},"type":"object","required":["variable","op","input_hash"],"title":"OpSpecCurveOp","description":"One curve input's op, with the hash the browser echoes back to save it."},"OpSpecOp":{"properties":{"kind":{"type":"string","enum":["predict_multi","decompose","response_curve","optimize"],"title":"Kind"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"seed":{"type":"integer","title":"Seed"}},"type":"object","required":["kind","params","seed"],"title":"OpSpecOp","description":"The canonical op object, as `op_object` builds it (SPEC §5.2)."},"OpSpecRequest":{"properties":{"dataset_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dataset Id","description":"Dataset IId to slice; omitted, the model's own. Selectable because the browser must be able to read whatever dataset the server op will run on, or the two engines hash different inputs for one request. Not for kind optimize, whose dataset rides on optimization.dataset_id."},"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"},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"Scenario overrides, in the shape POST /predictions takes."},"reference_fill":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ReferenceFill"},"type":"object"},{"type":"null"}],"title":"Reference Fill","description":"Fill variables from a past reference window, keyed like updated_values, in the shape POST /predictions takes. Expanded server-side into the op this returns, so the browser runs the same values the submit path will rebuild and input_hash still agrees."},"difference":{"anyOf":[{"$ref":"#/components/schemas/Difference"},{"type":"null"}],"description":"Ask the engine for an extra `Difference` layer between two of the scenarios, taken per posterior draw. A simulation sends `{\"scenario\": \"Scenario\", \"base\": \"BaseScenario\"}`; a prediction sends nothing. It binds into `input_hash`, so a browser run that omits it cannot be submitted as a simulation."},"curve_inputs":{"anyOf":[{"items":{"$ref":"#/components/schemas/ResponseCurveInput"},"type":"array","minItems":1},{"type":"null"}],"title":"Curve Inputs","description":"response_curve only: the sweeps, in the shape POST /response_curve takes. One op per entry, returned in that order."},"optimization":{"anyOf":[{"$ref":"#/components/schemas/OptimizationSpecFields"},{"type":"null"}],"description":"optimize only: the optimization to build an op for, in the shape POST /optimization takes minus the fields that do not reach the engine. The save has to send the same values or the rebuilt op will not match `input_hash`. Its `seed` is refused here - see the top-level `seed`."},"quantiles":{"anyOf":[{"items":{"type":"number"},"type":"array","minItems":1},{"type":"null"}],"title":"Quantiles"},"samples":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Samples"},"seed":{"type":"integer","title":"Seed","description":"Binds into every op's `input_hash`, so a browser run has to state the seed it will submit with rather than let the server generate one later. For kind optimize this is the only place a seed may be stated - `optimization.seed` is refused - and POST /optimization has to be sent this same value as its own `seed`."},"kind":{"type":"string","enum":["predict_multi","decompose","response_curve","optimize"],"title":"Kind","description":"Which op to build. `decompose` is the attribution op; its channels and responses come off the model's own schema, so only the reference points are selectable here. `response_curve` sweeps each of `curve_inputs` and answers with one op per entry. `optimize` builds the op for `optimization`, in the shape POST /optimization takes.","default":"predict_multi"},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline","description":"decompose only: per-variable reference points, in the shape POST /attributions takes. The submit has to send the same ones or the rebuilt op will not match `input_hash`."},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"decompose only: fallback for channels with no explicit baseline."}},"additionalProperties":false,"type":"object","required":["seed"],"title":"OpSpecRequest","description":"Body for POST /live_models/{id}/op_spec.\n\nCarries only what the user chose. The model to run on is the express model's\nown materialization (read off the row, not named here), the combination is\nread off that model, and the targets default to all of them - every one a\nvalue the server already knows, so naming them was only a way to disagree.\n\n`kind` picks the op; the fields only one kind takes are documented as such.\nA `response_curve` answers with a list rather than a single op, since it is\none op per curve input over the same rows."},"OpSpecResponse":{"properties":{"data":{"additionalProperties":{"items":{},"type":"array"},"type":"object","title":"Data"},"dates":{"items":{"type":"string"},"type":"array","title":"Dates"},"op":{"$ref":"#/components/schemas/OpSpecOp"},"input_hash":{"type":"string","title":"Input Hash"},"key_to_slug":{"additionalProperties":{"type":"string"},"type":"object","title":"Key To Slug"}},"type":"object","required":["data","dates","op","input_hash","key_to_slug"],"title":"OpSpecResponse","description":"Everything a browser needs to run exactly what the server would run."},"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":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for optimization"},"Params":{"anyOf":[{},{"type":"null"}],"title":"Params","description":"Full optimization configuration parameters"},"TargetResult":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Targetresult","description":"Final objective value achieved by optimization"},"BaselineTarget":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baselinetarget","description":"Target goal value (for goal-seek optimizations)"},"BaselineTargetResult":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baselinetargetresult","description":"Objective value at baseline (before optimization)"},"Improvement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Improvement","description":"Percent improvement: (Target - Baseline) / Baseline"}},"type":"object","required":["IId","DataSet","Status","Date","Model"],"title":"OptimizationJobs","description":"Response schema for optimization jobs listing and summary views.","examples":[{"BaselineTarget":100000.0,"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"Improvement":0.5,"JobId":456,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Budget Optimization","Note":"Optimizing marketing spend for Q4","Status":"completed","TargetResult":150000.0}]},"OptimizationJobsRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Status":{"$ref":"#/components/schemas/JobState"}},"type":"object","required":["IId","Status"],"title":"OptimizationJobsRef","description":"Reference schema for optimization job."},"OptimizationOp":{"type":"string","enum":["sum"],"title":"OptimizationOp","description":"Optimization Operators."},"OptimizationPost":{"properties":{"targets":{"$ref":"#/components/schemas/OptimizationTargets","description":"Optimization objective: what to maximize/minimize, target KPI variables, risk tolerance, and optional goal value. Use 'directions' to set per-node optimization direction."},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"Optional scenario variable modifications for baseline and scenario. Dict mapping scenario names to {variable, update} lists."},"reference_fill":{"anyOf":[{"$ref":"#/components/schemas/ReferenceFill"},{"type":"null"}],"description":"Fill each listed variable from a past reference window instead of sending its values. A variable that also appears in updated_values keeps its explicit values. The window must span the same number of periods as data_start_date..data_end_date."},"opt_nodes":{"items":{"type":"string"},"type":"array","title":"Opt Nodes","description":"Variable slugs that the optimizer can adjust. These are the 'levers' (e.g., media spend variables) that optimization will tune."},"boundary_constraint":{"anyOf":[{"items":{"$ref":"#/components/schemas/OptimizationBoundaryConstraint"},"type":"array"},{"type":"null"}],"title":"Boundary Constraint","description":"Per-variable min/max bounds constraining optimizer adjustments. Use threshold_min/threshold_max for soft constraints."},"equality_inequality_constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/EqualityInequalityConstraints"},"type":"array"},{"type":"null"}],"title":"Equality Inequality Constraints","description":"Cross-variable constraints (e.g., sum of budgets <= total). Supports <=, >=, == operators on variable aggregations."},"init_value":{"anyOf":[{"items":{"$ref":"#/components/schemas/InitValue"},"type":"array"},{"type":"null"}],"title":"Init Value","description":"Starting point strategy for each optimizable variable. Options include 'random', 'min', 'max', 'mean', 'median', or 'rangeN' percentiles."},"init_candidates":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/InitValues"},{"additionalProperties":{"$ref":"#/components/schemas/InitValues"},"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Init Candidates","description":"Opt-in start-point search. Each candidate is an init strategy for every lever, or a mapping from a lever slug, a variable group (e.g. 'Media', 'Distribution') or 'default' to a strategy. The engine projects each candidate onto the equality/inequality constraints, trains it briefly and starts from the best one. Levers in init_value keep their strategy. Unset: plain random start.","examples":[[{"Distribution":"max","Media":"min","default":"range50"},"range50","median","random"]]},"post_fix":{"type":"boolean","title":"Post Fix","description":"After optimizing, rescale each lever's spend above its min bound so equality/inequality constraints are met exactly.","default":false},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":10},"epochs":{"type":"integer","title":"Epochs","description":"Number of optimization iterations.","default":1000},"lr":{"type":"number","title":"Lr","description":"Learning rate for gradient descent.","default":0.1},"lr_decay":{"type":"number","title":"Lr Decay","description":"Learning rate decay factor applied at lr_decay_step.","default":0.25},"lr_decay_step":{"type":"integer","title":"Lr Decay Step","description":"Epochs between learning rate decay applications.","default":250},"grad_clip":{"type":"number","title":"Grad Clip","description":"Gradient clipping threshold for training stability.","default":1},"data_start_date":{"type":"string","format":"date-time","title":"Data Start Date","description":"Start of the data range for optimization. ISO 8601 format, no timezone - see `DateRange`."},"data_end_date":{"type":"string","format":"date-time","title":"Data End Date","description":"End of the data range for optimization. ISO 8601 format, no timezone."},"dates_subset":{"anyOf":[{"$ref":"#/components/schemas/DateSelector"},{"type":"null"}],"description":"Optional subset of dates within the data range to optimize over. Use for excluding holidays or focusing on specific periods."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"return_best_loss":{"type":"boolean","title":"Return Best Loss","description":"If True, returns the solution with best loss even if constraints are slightly violated (within allowed percentage).","default":true},"best_loss_allowed_pct_violation":{"type":"number","title":"Best Loss Allowed Pct Violation","description":"Maximum allowed constraint violation percentage (0-1) when return_best_loss=True. 0.5 = 50% violation tolerance.","default":0.5},"attribution":{"anyOf":[{"$ref":"#/components/schemas/AttributionAfterJob"},{"type":"null"}],"description":"Auto-runs attribution analysis after optimization completes. Quantifies variable contributions to the optimized result."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"model_id":{"type":"integer","title":"Model Id","description":"IId of the trained model to use. Model must have Status=COMPLETED. Get available models from GET /models endpoint."},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"additional_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Config","description":"UI-specific configuration passed through to frontend display."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserOptimizePayload"},{"type":"null"}],"description":"A complete `optimize` result the browser already computed. Sent, the server materializes it through the same completion hook a worker result goes through instead of dispatching a job."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree. Required whenever `browser_result` is sent - unlike the other browser legs, an optimize op binds the seed, so a result that names no op could be saved against a seed no browser run ever used."}},"type":"object","required":["targets","opt_nodes","data_start_date","data_end_date","model_id"],"title":"OptimizationPost","description":"Request body for creating a budget/resource optimization job.","examples":[{"attribution":{"name":"Optimization Attribution","priority":30,"quantiles":[1,25,50,75,99],"samples":20},"best_loss_allowed_pct_violation":0.5,"boundary_constraint":[{"max":[50000,50000,50000],"min":[5000,5000,5000],"variable":"tv_spend"},{"max":[30000,30000,30000],"min":[2000,2000,2000],"variable":"digital_spend"}],"data_end_date":"2024-12-31T00:00:00","data_start_date":"2024-01-01T00:00:00","dataset_id":"active","epochs":1000,"equality_inequality_constraints":[{"constraint":{"op":"sum","variables":[{"variable":"tv_spend"},{"variable":"digital_spend"}]},"op":"<=","value":100000.0}],"grad_clip":1,"init_value":[{"value":"mean","variable":"tv_spend"},{"value":"mean","variable":"digital_spend"}],"lr":0.1,"lr_decay":0.25,"lr_decay_step":250,"model_id":1,"name":"Q4 Budget Optimization","note":"Optimize media allocation for maximum sales","opt_nodes":["tv_spend","digital_spend","print_spend"],"priority":30,"return_best_loss":true,"samples":10,"targets":{"directions":[{"op":"Maximize","variable":"sales_units"}],"maximize":true,"op":"sum","relative":false,"risk":0.5,"transform":"identity","variables":[{"variable":"sales_units"}]}}]},"OptimizationSpecFields":{"properties":{"targets":{"$ref":"#/components/schemas/OptimizationTargets","description":"Optimization objective: what to maximize/minimize, target KPI variables, risk tolerance, and optional goal value. Use 'directions' to set per-node optimization direction."},"updated_values":{"anyOf":[{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"const":"scenario"},"type":"object"},{"type":"null"}],"title":"Updated Values","description":"Optional scenario variable modifications for baseline and scenario. Dict mapping scenario names to {variable, update} lists."},"reference_fill":{"anyOf":[{"$ref":"#/components/schemas/ReferenceFill"},{"type":"null"}],"description":"Fill each listed variable from a past reference window instead of sending its values. A variable that also appears in updated_values keeps its explicit values. The window must span the same number of periods as data_start_date..data_end_date."},"opt_nodes":{"items":{"type":"string"},"type":"array","title":"Opt Nodes","description":"Variable slugs that the optimizer can adjust. These are the 'levers' (e.g., media spend variables) that optimization will tune."},"boundary_constraint":{"anyOf":[{"items":{"$ref":"#/components/schemas/OptimizationBoundaryConstraint"},"type":"array"},{"type":"null"}],"title":"Boundary Constraint","description":"Per-variable min/max bounds constraining optimizer adjustments. Use threshold_min/threshold_max for soft constraints."},"equality_inequality_constraints":{"anyOf":[{"items":{"$ref":"#/components/schemas/EqualityInequalityConstraints"},"type":"array"},{"type":"null"}],"title":"Equality Inequality Constraints","description":"Cross-variable constraints (e.g., sum of budgets <= total). Supports <=, >=, == operators on variable aggregations."},"init_value":{"anyOf":[{"items":{"$ref":"#/components/schemas/InitValue"},"type":"array"},{"type":"null"}],"title":"Init Value","description":"Starting point strategy for each optimizable variable. Options include 'random', 'min', 'max', 'mean', 'median', or 'rangeN' percentiles."},"init_candidates":{"anyOf":[{"items":{"anyOf":[{"$ref":"#/components/schemas/InitValues"},{"additionalProperties":{"$ref":"#/components/schemas/InitValues"},"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Init Candidates","description":"Opt-in start-point search. Each candidate is an init strategy for every lever, or a mapping from a lever slug, a variable group (e.g. 'Media', 'Distribution') or 'default' to a strategy. The engine projects each candidate onto the equality/inequality constraints, trains it briefly and starts from the best one. Levers in init_value keep their strategy. Unset: plain random start.","examples":[[{"Distribution":"max","Media":"min","default":"range50"},"range50","median","random"]]},"post_fix":{"type":"boolean","title":"Post Fix","description":"After optimizing, rescale each lever's spend above its min bound so equality/inequality constraints are met exactly.","default":false},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":10},"epochs":{"type":"integer","title":"Epochs","description":"Number of optimization iterations.","default":1000},"lr":{"type":"number","title":"Lr","description":"Learning rate for gradient descent.","default":0.1},"lr_decay":{"type":"number","title":"Lr Decay","description":"Learning rate decay factor applied at lr_decay_step.","default":0.25},"lr_decay_step":{"type":"integer","title":"Lr Decay Step","description":"Epochs between learning rate decay applications.","default":250},"grad_clip":{"type":"number","title":"Grad Clip","description":"Gradient clipping threshold for training stability.","default":1},"data_start_date":{"type":"string","format":"date-time","title":"Data Start Date","description":"Start of the data range for optimization. ISO 8601 format, no timezone - see `DateRange`."},"data_end_date":{"type":"string","format":"date-time","title":"Data End Date","description":"End of the data range for optimization. ISO 8601 format, no timezone."},"dates_subset":{"anyOf":[{"$ref":"#/components/schemas/DateSelector"},{"type":"null"}],"description":"Optional subset of dates within the data range to optimize over. Use for excluding holidays or focusing on specific periods."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"return_best_loss":{"type":"boolean","title":"Return Best Loss","description":"If True, returns the solution with best loss even if constraints are slightly violated (within allowed percentage).","default":true},"best_loss_allowed_pct_violation":{"type":"number","title":"Best Loss Allowed Pct Violation","description":"Maximum allowed constraint violation percentage (0-1) when return_best_loss=True. 0.5 = 50% violation tolerance.","default":0.5},"attribution":{"anyOf":[{"$ref":"#/components/schemas/AttributionAfterJob"},{"type":"null"}],"description":"Auto-runs attribution analysis after optimization completes. Quantifies variable contributions to the optimized result."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."}},"type":"object","required":["targets","opt_nodes","data_start_date","data_end_date"],"title":"OptimizationSpecFields","description":"The fields of an optimization request the op is built from.\n\nSplit out of `OptimizationPost` so `POST /live_models/{id}/op_spec` can take\nwhat the engine needs without restating it. One definition, so the op the\nbrowser is handed and the op the save rebuilds cannot disagree by a field\nthat drifted between two mirrored models — the guarantee `!1404` established\nfor predictions and every browser leg since has kept.\n\nA superset rather than an exact cut, in both directions. `lr_decay`,\n`lr_decay_step` and `grad_clip` sit here because they belong to the same\nengine settings block, but `optimize_spec_from_request` does not read them,\nso they reach no live-model op. And of what stays on `OptimizationPost`,\n`model_id` does affect the op: it selects the modelling combination the rows\nare sliced by, and the express model whose artifact runs them. The name, the\nnote, the priority, `validate_limits` and the UI's `additional_config` are\nthe ones that do not."},"OptimizationTargets":{"properties":{"goal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Goal"},"relative":{"type":"boolean","title":"Relative","default":false},"risk":{"type":"number","exclusiveMaximum":0.99,"exclusiveMinimum":0.01,"title":"Risk","default":0.5},"directions":{"items":{"$ref":"#/components/schemas/Direction"},"type":"array","title":"Directions","description":"Node directions"},"maximize":{"type":"boolean","title":"Maximize","description":"Whether to maximize or minimize the targets ","default":true},"variables":{"anyOf":[{"items":{"$ref":"#/components/schemas/Variable-Input"},"type":"array","minItems":1},{"type":"null"}],"title":"Variables","description":"The KPIs to optimize, as variable slugs from the model's result_variables. Required for the 'identity' transform; the 'revenue' and 'profit' transforms derive their own."},"op":{"anyOf":[{"$ref":"#/components/schemas/OptimizationOp"},{"type":"null"}],"description":"How the target 'variables' are aggregated. Only 'sum' is supported, which is also the default.","default":"sum"},"transform":{"type":"string","enum":["identity","revenue","profit"],"title":"Transform","default":"identity"},"include_pre_period":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Pre Period","description":"Count the dates before 'dates_subset' in the target. Unset uses the engine default: excluded for goal targets, included otherwise."},"include_post_period":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Post Period","description":"Count the dates after 'dates_subset' in the target, where the carry-over of the optimized media lands. Unset includes them."}},"type":"object","title":"OptimizationTargets","description":"Define targets for optimiztion."},"Page_AttributionSetActiveHistory_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AttributionSetActiveHistory"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[AttributionSetActiveHistory]"},"Page_AttributionSet_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AttributionSet"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[AttributionSet]"},"Page_Attribution_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Attribution"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[Attribution]"},"Page_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_ListedModels_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ListedModels"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ListedModels]"},"Page_LiveModelResults_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LiveModelResults"},"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[LiveModelResults]"},"Page_LiveModels_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LiveModels"},"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[LiveModels]"},"Page_ModelActiveHistory_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModelActiveHistory"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ModelActiveHistory]"},"Page_OptimizationJobs_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OptimizationJobs"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[OptimizationJobs]"},"Page_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_ProjectListItem_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProjectListItem"},"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[ProjectListItem]"},"Page_ResponseCurve_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ResponseCurve"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[ResponseCurve]"},"Page_SimulationJobs_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SimulationJobs"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[SimulationJobs]"},"Page_Template_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Template"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[Template]"},"Page_Variable_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Variable-Output"},"type":"array","title":"Items"},"total":{"type":"integer","minimum":0.0,"title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"size":{"type":"integer","minimum":1.0,"title":"Size"},"pages":{"type":"integer","minimum":0.0,"title":"Pages"}},"type":"object","required":["items","total","page","size","pages"],"title":"Page[Variable]"},"PatchAttribution":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchAttribution","description":"Schema for updating decomposition job.","examples":[{"Name":"Updated Attribution Name","Note":"Updated attribution description"}]},"PatchAttributionSet":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchAttributionSet","description":"schema for updatind attribution jobs.","examples":[{"Name":"Updated Attribution Set Name","Note":"Updated attribution set description"}]},"PatchDataSet":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchDataSet","description":"Schema for updating dataset attribute.","examples":[{"Name":"Updated Dataset Name","Note":"Updated description for the dataset"}]},"PatchDatasetVariableLimit":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit"},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit"}},"type":"object","required":["VariableIId","Country","Region","Grouping"],"title":"PatchDatasetVariableLimit","description":"One row of a dataset-level variable-limits PATCH.\n\nTargets a single ``(VariableIId, Country, Region, Grouping)`` in\n``VariableStats``. ``MinLimit`` / ``MaxLimit`` are each independently\noptional: missing means \"do not change\"; an explicit ``null`` clears.","examples":[{"Country":"SWE","Grouping":"all","MaxLimit":100000,"MinLimit":0,"Region":"all","VariableIId":1}]},"PatchDatasetVariableLimits":{"properties":{"limits":{"items":{"$ref":"#/components/schemas/PatchDatasetVariableLimit"},"type":"array","minItems":1,"title":"Limits"}},"type":"object","required":["limits"],"title":"PatchDatasetVariableLimits","description":"Bulk PATCH body for ``/datasets/{id}/variable_limits``.\n\nAll rows are validated up-front; the update is rejected as a whole on the\nfirst error so partial writes never happen."},"PatchModels":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchModels","description":"Schema for updating models attribute.","examples":[{"Name":"USA National Marketing Mix Model v2","Note":"Updated model with seasonal adjustments and improved fit"}]},"PatchOptimizationJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchOptimizationJobs","description":"Schema for updating optimization jobs.","examples":[{"Name":"Updated Optimization Job","Note":"Updated notes for this optimization"}]},"PatchPredictionJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchPredictionJobs","description":"Schema for updating prediction jobs.","examples":[{"Name":"Updated Prediction Name","Note":"Prediction job description updated"}]},"PatchPriorPosteriorJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchPriorPosteriorJobs","description":"Schema for updating response curve job.","examples":[{"Name":"Updated Prior Posterior Job","Note":"Updated notes for this prior posterior job"}]},"PatchResponseCurveJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchResponseCurveJobs","description":"Schema for updating response curve job.","examples":[{"Name":"Updated Response Curve","Note":"Updated notes for this response curve job"}]},"PatchSimulationJobs":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"}},"type":"object","title":"PatchSimulationJobs","description":"Schema for updating simulation jobs.","examples":[{"Name":"Updated Simulation Name","Note":"Simulation job description updated"}]},"PatchTemplate":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Description for the model/dataset"},"Graph":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Graph"}},"type":"object","title":"PatchTemplate","description":"Schema for updating temptale.","examples":[{"graph":{"edges":[],"nodes":[]},"name":"Updated Template Name","note":"Updated template description"}]},"PatchVariable":{"properties":{"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit","description":"Lower bound for this variable; `null` means unbounded. Must be finite. The DB enforces MinLimit < MaxLimit when both are set."},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit","description":"Upper bound for this variable; `null` means unbounded. Must be finite. The DB enforces MinLimit < MaxLimit when both are set."}},"type":"object","title":"PatchVariable","description":"Schema for updating variable.\n\nAny combination of fields may be supplied; only fields present in the request\nbody are applied. To clear a limit, send the field explicitly as `null`.","examples":[{"MaxLimit":100000,"MinLimit":0,"Name":"TV Advertising Spend"}]},"PatchVariableInterpolation":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"Steps":{"items":{"$ref":"#/components/schemas/InterpStep"},"type":"array","title":"Steps","description":"Ordered interpolation steps applied in order; the first one that can fill a gap wins. Empty means the variable is not interpolated."}},"type":"object","required":["VariableIId","Country","Region","Grouping","Steps"],"title":"PatchVariableInterpolation","description":"One row of an interpolation PATCH — a variable in one combination."},"PatchVariableInterpolations":{"properties":{"configs":{"items":{"$ref":"#/components/schemas/PatchVariableInterpolation"},"type":"array","minItems":1,"title":"Configs"}},"type":"object","required":["configs"],"title":"PatchVariableInterpolations","description":"Bulk PATCH body for the ``variable_interpolation`` endpoints.\n\nShared by data uploads and datasets. All rows are validated up-front; the\nupdate is rejected as a whole on the first error so partial writes never\nhappen."},"PatchVariableUtilOverride":{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"type":"object"},"type":"object","title":"PatchVariableUtilOverride","description":"Relabels for one variable Type: ``{Attribute: {OriginalValue: OverrideValue}}``.\n\nA null ``OverrideValue`` deletes that relabel. Example:\n``{\"Brand\": {\"b1\": \"b2\"}, \"Metric\": {\"m1\": \"Volume\"}}``."},"PerformanceEntry":{"properties":{"variable":{"type":"string","title":"Variable"},"stage":{"type":"string","enum":["train","eval"],"title":"Stage"},"metric":{"type":"string","title":"Metric"},"value":{"type":"number","title":"Value"}},"type":"object","required":["variable","stage","metric","value"],"title":"PerformanceEntry","description":"One ModelPerformance row."},"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."},"PlanCurves":{"properties":{"ModelId":{"type":"integer","title":"Modelid","description":"IId of the run's model"},"Layers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Layers","description":"The plan's layers, each a Name and Kind"},"Variables":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Variables","description":"The plan's row variables"},"Curves":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Curves","description":"The model's response curve rows for the row variables"},"Spend":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Spend","description":"Each layer's per-period spend, long format"},"Bounds":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Bounds","description":"Per variable, Min and Max summed over BoundDates; optimizations only"},"BoundDates":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bounddates","description":"The dates the bounds cover, null for the whole window; optimizations only"},"Computing":{"items":{"type":"string"},"type":"array","title":"Computing","description":"Row variables whose curves are computing"},"Missing":{"items":{"type":"string"},"type":"array","title":"Missing","description":"Row variables without a curve and nothing started; POST starts them"},"Unavailable":{"additionalProperties":true,"type":"object","title":"Unavailable","description":"Why curves cannot be had, per variable"}},"type":"object","required":["ModelId","Layers","Variables","Curves","Spend","Computing","Missing","Unavailable"],"title":"PlanCurves","description":"A run's plan with the model curves to value it on."},"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. 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","maxLength":255,"title":"Originalvalue","description":"Base (ingested) value to relabel."},"OverrideValue":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Overridevalue","description":"Display value; null deletes the relabel. Must not be blank, and is stored stripped of surrounding whitespace."}},"type":"object","required":["Type","Attribute","OriginalValue"],"title":"PostVariableUtilOverride","description":"One per-type util_attr relabel (a bulk-upsert item).\n\nWithin ``Type``, attribute ``Attribute``'s base value ``OriginalValue`` is\ndisplayed as ``OverrideValue``. A null ``OverrideValue`` deletes that relabel."},"PredictionAttribution":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","description":"Set predicted targets as data.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed. If omitted, the chained attribution inherits the parent job's seed."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"prediction_quantile":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Prediction Quantile","description":"Prediction quantile to run attribution.","default":50},"prediction_scenario":{"type":"string","title":"Prediction Scenario","description":"Prediction scenario to run attribution.","default":"Scenario"}},"type":"object","title":"PredictionAttribution","description":"Run attribution after prediction job."},"PredictionAttributionAssociation":{"properties":{"Attribution":{"$ref":"#/components/schemas/AttributionRef"},"Scenario":{"type":"string","title":"Scenario"},"Quantile":{"type":"number","title":"Quantile"}},"type":"object","required":["Attribution","Scenario","Quantile"],"title":"PredictionAttributionAssociation","description":"Reference schema for prediction attribution association."},"PredictionAttributionInput":{"properties":{"id":{"type":"integer","title":"Id"},"quantile":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Quantile"},"scenario":{"type":"string","title":"Scenario"},"job_type":{"type":"string","const":"prediction","title":"Job Type","default":"prediction"}},"type":"object","required":["id","quantile","scenario"],"title":"PredictionAttributionInput","description":"Attribution job from prediction result."},"PredictionColumns":{"type":"string","enum":["Country","Region","Grouping","Variable","Date","Effect","Quantile","Scenario"],"title":"PredictionColumns"},"PredictionDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Start of the forecast period. Use ISO 8601 format (e.g., '2024-01-01T00:00:00'). Required unless full_prediction=True. Must align with project periodicity."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"End of the forecast period. Use ISO 8601 format. Required unless full_prediction=True. Must be after start_date and align with periodicity."},"model_id":{"type":"integer","title":"Model Id","description":"IId of the trained model to use. Model must have Status=COMPLETED. Get available models from GET /models endpoint."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Dataset IId to use. Omit or pass 'active' for the project's active dataset. Dataset must be compatible with the model's variables."},"full_prediction":{"type":"boolean","title":"Full Prediction","description":"If True, creates a prediction covering the model's full training date range. Only one full prediction allowed per model. Ignores start_date and end_date when True.","default":false},"additional_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Config","description":"UI-specific configuration passed through to frontend display."}},"type":"object","required":["model_id"],"title":"PredictionDetail","description":"Configuration for a prediction job to forecast KPIs over a date range.","examples":[{"dataset_id":"active","end_date":"2024-12-31T00:00:00","full_prediction":false,"model_id":1,"name":"Q4 Sales Prediction","note":"Forecast sales based on planned media spend","start_date":"2024-01-01T00:00:00"}]},"PredictionJobs":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"StartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Startdate","description":"Forecast period start date"},"EndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enddate","description":"Forecast period end date"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for this prediction"},"Fit":{"type":"boolean","title":"Fit","description":"Whether this is a fit prediction (ModelFitId is set)","readOnly":true},"Source":{"type":"string","enum":["manual","fit","optimization","simulation","prediction"],"title":"Source","description":"What produced this prediction: manual or fit","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Date","Model","Fit","Source"],"title":"PredictionJobs","description":"Response schema for prediction jobs listing and summary views.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","EndDate":"2024-12-31T00:00:00","Fit":false,"IId":1,"JobId":789,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Sales Prediction","Note":"Prediction for Q4 sales","StartDate":"2024-01-01T00:00:00","Status":"completed"}]},"PredictionJobsRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Date":{"type":"string","format":"date-time","title":"Date"},"Status":{"$ref":"#/components/schemas/JobState"}},"type":"object","required":["IId","Date","Status"],"title":"PredictionJobsRef","description":"Reference schema for prediction job."},"PredictionParams":{"properties":{"samples":{"type":"integer","title":"The samples","description":"Number of posterior samples to draw for uncertainty estimation. Higher values (e.g., 50-100) give smoother uncertainty bands but take longer. Default (20) is suitable for most use cases.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"Job queue priority from 1-100. Higher values are processed first. Use higher priority for time-sensitive predictions. Default (60) is standard priority.","default":60}},"type":"object","title":"PredictionParams","description":"Sampling and job parameters for prediction execution.","examples":[{"priority":60,"samples":20}]},"PredictionRequest":{"properties":{"model_param":{"anyOf":[{"$ref":"#/components/schemas/PredictionParams"},{"type":"null"}],"description":"Sampling parameters controlling uncertainty estimation. 'samples' determines posterior draws (more = better uncertainty, slower). 'priority' sets job queue priority (higher = processed sooner).","default":{"samples":20,"priority":60}},"prediction_detail":{"$ref":"#/components/schemas/PredictionDetail","description":"Core prediction configuration: model to use, forecast date range, and dataset reference. Required fields: model_id, start_date, end_date (unless full_prediction=True)."},"updated_values":{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"type":"object","title":"Updated Values","description":"Scenario variable modifications. Dict with scenario names as keys (e.g., 'Scenario'), each containing list of {variable, update}. Defaults to a single empty 'Scenario' (identical to baseline)."},"reference_fill":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ReferenceFill"},"type":"object"},{"type":"null"}],"title":"Reference Fill","description":"Fill listed variables from a past window instead of sending values, keyed like updated_values."},"quantiles":{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array","title":"Quantiles","description":"Uncertainty percentiles to compute (1-100). Output includes forecast values at each quantile. Common: [20, 40, 50, 60, 80] for median + ranges.","default":[20,40,50,60,80]},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserPredictMultiPayload"},{"type":"null"}],"description":"A `predict_multi` result computed in the browser against this express model's portable engine. When set on an express model, the prediction is materialized from this payload instead of dispatched as a job. Ignored for non-express models."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree, which is what makes 'the browser ran what the server asked for' a checked fact rather than a convention."},"target_nodes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Nodes","description":"Specific KPI variable slugs to forecast. If None, predicts all target nodes in the model graph. Use to reduce output size when only specific KPIs are needed."},"freeze_nodes":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Freeze Nodes","description":"Variables a scenario's changes must not move. A frozen variable keeps the value of the scenario-less base forecast, so the scenario's changes stop propagating at it. Dict mapping scenario names to lists of variable slugs. Advanced feature."},"attributions":{"items":{"$ref":"#/components/schemas/PredictionAttribution"},"type":"array","title":"Attributions","description":"Optional attribution jobs to auto-create after prediction completes. Use to analyze which input variables drove the forecast outcomes."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false}},"type":"object","required":["prediction_detail"],"title":"PredictionRequest","description":"Request body for creating a prediction job to forecast KPIs.","examples":[{"attributions":[{"name":"Prediction Attribution","prediction_quantile":50,"prediction_scenario":"Scenario","priority":30,"quantiles":[1,25,50,75,99],"samples":20}],"model_param":{"priority":60,"samples":20},"prediction_detail":{"dataset_id":"active","end_date":"2024-12-31T00:00:00","full_prediction":false,"model_id":1,"name":"Q4 Sales Prediction","note":"Forecast for Q4 with planned media spend","start_date":"2024-01-01T00:00:00"},"quantiles":[20,40,50,60,80],"updated_values":{"Scenario":[{"update":[["2024-01-01",15000],["2024-06-01",15000],["2024-12-01",15000]],"variable":"tv_spend"},{"update":[["2024-01-01",7500],["2024-06-01",7500],["2024-12-01",7500]],"variable":"digital_spend"}]}}]},"PreviewVariableInterpolation":{"properties":{"VariableIId":{"type":"integer","title":"Variableiid"},"Country":{"type":"string","title":"Country"},"Region":{"type":"string","title":"Region"},"Grouping":{"type":"string","title":"Grouping"},"Steps":{"items":{"$ref":"#/components/schemas/InterpStep"},"type":"array","minItems":1,"title":"Steps","description":"Ordered interpolation steps applied in order; the first one that can fill a gap wins. Empty means the variable is not interpolated."}},"type":"object","required":["VariableIId","Country","Region","Grouping","Steps"],"title":"PreviewVariableInterpolation","description":"One override row of an interpolation preview.\n\nNarrows :class:`PatchVariableInterpolation`: an override must name a chain,\nso the empty list that means \"do not interpolate\" when stored is rejected\nhere — an empty override would otherwise read as either \"turn it off\" or\n\"no override\", and only one of those can be true. Everything else (the id,\nthe combination triple, no-repeats, ``set_zero`` last) is inherited."},"Price":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the price effect","default":"negative"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the price effect"},"match_product":{"type":"boolean","title":"Match Product","description":"Match the product of the variable to the product in the kpi, if no match for the product the variable will be excluded. `Product=all` is a value like any other: under match_product it only pairs with a KPI whose product is `all`.","default":false},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Price","description":"Control the price."},"PriorPosterior-Input":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"samples":{"type":"integer","title":"Samples","default":100},"epochs":{"type":"integer","title":"Epochs","default":200},"sub_samples":{"type":"integer","title":"Sub Samples","default":3},"lr":{"type":"number","title":"Lr","default":0.01},"grad_clip":{"type":"number","title":"The grad clip","description":"The value the gradient will be clipped during training to prevent exploding gradients.","default":3},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Zero"},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30}},"type":"object","title":"PriorPosterior","description":"Prior posterior request."},"PriorPosterior-Output":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for analysis"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"ReferencePointFallback":{"$ref":"#/components/schemas/ReferencePointFallback","description":"How to handle missing reference points: 'zero' or 'mean'"},"FitModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}],"description":"Reference model for fit comparison (if analyzing model fit)"}},"type":"object","required":["IId","DataSet","Status","Model","Date","ReferencePointFallback"],"title":"PriorPosterior","description":"Response schema for prior vs posterior distribution analysis jobs.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":101,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Prior Posterior Analysis","Note":"Comparing prior and posterior distributions","ReferencePointFallback":"Zero","Status":"completed"}]},"PriorPosteriorJobs":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["IId","JobId"],"title":"PriorPosteriorJobs","description":"Reference schema to prior posterior job."},"PriorPosteriorPost":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"samples":{"type":"integer","title":"Samples","default":100},"epochs":{"type":"integer","title":"Epochs","default":200},"sub_samples":{"type":"integer","title":"Sub Samples","default":3},"lr":{"type":"number","title":"Lr","default":0.01},"grad_clip":{"type":"number","title":"The grad clip","description":"The value the gradient will be clipped during training to prevent exploding gradients.","default":3},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Zero"},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"model_id":{"type":"integer","title":"Model Id","description":"The id of the model that should be used to do the response job with."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,99]},"fit_priorposterior":{"type":"boolean","title":"Fit Priorposterior","description":"Whether to set prior posterior job as fit or not.","default":false}},"type":"object","required":["model_id"],"title":"PriorPosteriorPost","description":"Prior posterior submit.","examples":[{"baseline":[{"baseline":1000.0,"variable":"base_sales"}],"dataset_id":"active","epochs":200,"fit_priorposterior":true,"grad_clip":3,"lr":0.01,"model_id":1,"name":"Prior Posterior Analysis","note":"Bayesian uncertainty analysis for model parameters","priority":30,"quantiles":[1,5,10,25,50,75,90,95,99],"referece_point_fallback":"Zero","samples":100,"sub_samples":3}]},"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.DataLocation","DataImports.S3BucketConfigId","DataImports.StorageObjectId","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.DataLocation","DataSet.Issues","DataSet.S3BucketConfigId","DataSet.StorageObjectId","DataSet.Note","DataSet.Name","DataSet.Status","DataSet.Error","DataSet.ToBeDeleted","DataSet.IId","DataSet.ProjectId","DataSet.CreatorId","Graphs.GraphStored","Graphs.Id","Graphs.Graph","Graphs.Name","Graphs.Note","Graphs.CreatedAt","Graphs.InstancesJobId","Graphs.Image","Graphs.ProjectId","Graphs.CreatorId","Variables.Id","Variables.Slug","Variables.Name","Variables.Type","Variables.Group","Variables.MinLimit","Variables.MaxLimit","Variables.Product","Variables.Media","Variables.Campaign","Variables.Metric","Variables.Channel","Variables.Format","Variables.Device","Variables.TargetGroup","Variables.Creative","Variables.Category","Variables.Brand","Variables.Competitor","Variables.Indicator","Variables.Variable","Variables.Event","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.LiveModelId","Models.ResponseCurveSetId","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.Error","SimulationJobs.S3BucketConfigId","SimulationJobs.StorageObjectId","SimulationJobs.ResultRowCount","SimulationJobs.ResultMinDate","SimulationJobs.ResultMaxDate","SimulationJobs.ResultColumnsCovered","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.Error","PredictionJobs.S3BucketConfigId","PredictionJobs.StorageObjectId","PredictionJobs.ResultRowCount","PredictionJobs.ResultMinDate","PredictionJobs.ResultMaxDate","PredictionJobs.ResultColumnsCovered","PredictionJobs.CandidateId","PredictionJobs.Origin","PredictionJobs.DataSetId","PredictionJobs.Note","PredictionJobs.Name","PredictionJobs.Image","PredictionJobs.ToBeDeleted","PredictionJobs.IId","PredictionJobs.ProjectId","PredictionJobs.CreatorId","PredictionJobs.modelling_combination","Attribution.Source","Attribution.JobId","Attribution.StartDate","Attribution.EndDate","Attribution.PredictedTargetsAsData","Attribution.Status","Attribution.FitModelId","Attribution.Date","Attribution.Error","Attribution.DataSetId","Attribution.ModelId","Attribution.ReferencePointFallback","Attribution.ReferencePointSource","Attribution.Quantiles","Attribution.Seed","Attribution.RetrospectiveEffectLocation","Attribution.S3BucketConfigId","Attribution.StorageObjectId","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.StorageObjectId","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.StartDate","OptimizationJobs.EndDate","OptimizationJobs.Targets","OptimizationJobs.OptNodes","OptimizationJobs.TargetResult","OptimizationJobs.Loss","OptimizationJobs.ConstraintLoss","OptimizationJobs.ConstraintViolation","OptimizationJobs.BaselineTarget","OptimizationJobs.BaselineTargetResult","OptimizationJobs.Improvement","OptimizationJobs.Seed","OptimizationJobs.OptimizationResultLocation","OptimizationJobs.S3BucketConfigId","OptimizationJobs.StorageObjectId","OptimizationJobs.ResultRowCount","OptimizationJobs.ResultMinDate","OptimizationJobs.ResultMaxDate","OptimizationJobs.ResultColumnsCovered","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.StorageObjectId","ResponseCurveJobs.ResultRowCount","ResponseCurveJobs.ResultMinDate","ResponseCurveJobs.ResultMaxDate","ResponseCurveJobs.CompletedVariables","ResponseCurveJobs.Origin","ResponseCurveJobs.TrimTemporal","ResponseCurveJobs.Name","ResponseCurveJobs.Note","ResponseCurveJobs.Error","ResponseCurveJobs.ToBeDeleted","ResponseCurveJobs.IId","ResponseCurveJobs.ProjectId","ResponseCurveJobs.CreatorId","ResponseCurveJobs.SkippedVariables"],"title":"ProjectColumns"},"ProjectDetail":{"properties":{"Id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"periodicity":{"$ref":"#/components/schemas/Periodicity"},"currency_code":{"type":"string","title":"Currency Code"},"created_date":{"type":"string","format":"date-time","title":"Created Date"},"last_used_date":{"type":"string","format":"date-time","title":"Last Used Date"},"variables_data_version":{"type":"integer","title":"Variables Data Version","default":0},"activity_dashboard_mode":{"$ref":"#/components/schemas/ActivityDasboardMode"},"reference_point_source":{"$ref":"#/components/schemas/ReferencePointSource","description":"Project default for attribution reference points the caller does not supply: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin).","default":"DataMin"},"strict_limits":{"type":"boolean","title":"Strict Limits","description":"Whether limit violations refuse jobs instead of warning.","default":false},"response_curve_source":{"$ref":"#/components/schemas/ResponseCurveSource","description":"Curves an attribution set's periods are valued on: source_model or active.","default":"source_model"},"response_curve_groups":{"items":{"type":"string"},"type":"array","title":"Response Curve Groups","description":"Variable groups whose input variables get default curves."},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["Id","name","slug","periodicity","currency_code","created_date","last_used_date","activity_dashboard_mode"],"title":"ProjectDetail","description":"Schema for a single project's own row -- no cross-table aggregates.\n\nDeliberately excludes every field on `Projects` below that's derived from\nother tables (ModellingCombinations, Variables, Models, MetricsCache):\nthose change through dozens of write paths across the app, so caching\nthem safely would mean invalidating from all of those places. This\nschema only has columns that change via `update_project`/`delete_project`,\nwhich makes it cheap to cache correctly (see `get_project`). Use\n`/projects/{team_id}/{project_id}/resources` for active dataset/model/\nattribution-set info, or `list_projects` for the cross-table metrics."},"ProjectListItem":{"properties":{"Id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"periodicity":{"$ref":"#/components/schemas/Periodicity"},"currency_code":{"type":"string","title":"Currency Code"},"created_date":{"type":"string","format":"date-time","title":"Created Date"},"last_used_date":{"type":"string","format":"date-time","title":"Last Used Date"},"variables_data_version":{"type":"integer","title":"Variables Data Version","default":0},"activity_dashboard_mode":{"$ref":"#/components/schemas/ActivityDasboardMode"},"reference_point_source":{"$ref":"#/components/schemas/ReferencePointSource","description":"Project default for attribution reference points the caller does not supply: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin).","default":"DataMin"},"strict_limits":{"type":"boolean","title":"Strict Limits","description":"Whether limit violations refuse jobs instead of warning.","default":false},"response_curve_source":{"$ref":"#/components/schemas/ResponseCurveSource","description":"Curves an attribution set's periods are valued on: source_model or active.","default":"source_model"},"response_curve_groups":{"items":{"type":"string"},"type":"array","title":"Response Curve Groups","description":"Variable groups whose input variables get default curves."},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"countries":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Countries","description":"Only with `with_scope=true`; null when not requested."},"regions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Regions","description":"Only with `with_scope=true`; null when not requested."},"groupings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Groupings","description":"Only with `with_scope=true`; null when not requested."},"products":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Products","description":"Only with `with_scope=true`; null when not requested."}},"type":"object","required":["Id","name","slug","periodicity","currency_code","created_date","last_used_date","activity_dashboard_mode"],"title":"ProjectListItem","description":"One project in the list: its own row plus its scope (see `list_projects`).\n\nThe scope lists are null unless the caller asked for them (`with_scope`),\nso \"not requested\" never reads as \"none\"."},"ProjectResources":{"properties":{"DataImports":{"type":"integer","title":"Dataimports"},"DataSet":{"type":"integer","title":"Dataset"},"Models":{"type":"integer","title":"Models"},"SimulationJobs":{"type":"integer","title":"Simulationjobs"},"PredictionJobs":{"type":"integer","title":"Predictionjobs"},"Attribution":{"type":"integer","title":"Attribution"},"AttributionSet":{"type":"integer","title":"Attributionset"},"CompletedAttribution":{"anyOf":[{"$ref":"#/components/schemas/AttributionRef"},{"type":"null"}]},"ActiveDataSet":{"anyOf":[{"$ref":"#/components/schemas/DataSetRef"},{"type":"null"}]},"ActiveModel":{"anyOf":[{"$ref":"#/components/schemas/ModelsRef"},{"type":"null"}]},"ActiveAttributionSet":{"anyOf":[{"$ref":"#/components/schemas/AttributionSetRef"},{"type":"null"}]},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"regions":{"items":{"type":"string"},"type":"array","title":"Regions"},"groupings":{"items":{"type":"string"},"type":"array","title":"Groupings"},"products":{"items":{"type":"string"},"type":"array","title":"Products"},"num_countries":{"type":"integer","title":"Num Countries","default":0},"num_regions":{"type":"integer","title":"Num Regions","default":0},"num_data_sources_uploaded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Data Sources Uploaded"},"num_model_combinations_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Model Combinations Built"},"num_model_combinations":{"type":"integer","title":"Num Model Combinations","default":0},"active_models":{"items":{"$ref":"#/components/schemas/ActiveModelMetrics"},"type":"array","title":"Active Models"},"latest_data_point_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Data Point Date"},"latest_upload_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Upload Date"},"latest_prediction_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Prediction Date"},"total_media_spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Media Spend"},"total_sales":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Sales"},"avg_brand_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Brand Value"},"latest_effect_roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Effect Roi"}},"type":"object","required":["DataImports","DataSet","Models","SimulationJobs","PredictionJobs","Attribution","AttributionSet"],"title":"ProjectResources","description":"Schema for project resources.\n\nAlso carries the cross-table aggregates that used to live on `get_project`\n(see `response.ProjectDetail`) -- they're cheap here since this endpoint\nalready pays for the eager-loaded `Projects` row and isn't cached."},"Projects":{"properties":{"Id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"periodicity":{"$ref":"#/components/schemas/Periodicity"},"currency_code":{"type":"string","title":"Currency Code"},"created_date":{"type":"string","format":"date-time","title":"Created Date"},"last_used_date":{"type":"string","format":"date-time","title":"Last Used Date"},"variables_data_version":{"type":"integer","title":"Variables Data Version","default":0},"activity_dashboard_mode":{"$ref":"#/components/schemas/ActivityDasboardMode"},"reference_point_source":{"$ref":"#/components/schemas/ReferencePointSource","description":"Project default for attribution reference points the caller does not supply: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin).","default":"DataMin"},"strict_limits":{"type":"boolean","title":"Strict Limits","description":"Whether limit violations refuse jobs instead of warning.","default":false},"response_curve_source":{"$ref":"#/components/schemas/ResponseCurveSource","description":"Curves an attribution set's periods are valued on: source_model or active.","default":"source_model"},"response_curve_groups":{"items":{"type":"string"},"type":"array","title":"Response Curve Groups","description":"Variable groups whose input variables get default curves."},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"regions":{"items":{"type":"string"},"type":"array","title":"Regions"},"groupings":{"items":{"type":"string"},"type":"array","title":"Groupings"},"products":{"items":{"type":"string"},"type":"array","title":"Products"},"num_countries":{"type":"integer","title":"Num Countries","default":0},"num_regions":{"type":"integer","title":"Num Regions","default":0},"num_data_sources_uploaded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Data Sources Uploaded"},"num_model_combinations_built":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Model Combinations Built"},"num_model_combinations":{"type":"integer","title":"Num Model Combinations","default":0},"active_models":{"items":{"$ref":"#/components/schemas/ActiveModelMetrics"},"type":"array","title":"Active Models"},"active_dataset":{"anyOf":[{"$ref":"#/components/schemas/DataSetRef"},{"type":"null"}]},"latest_data_point_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Data Point Date"},"latest_upload_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Upload Date"},"latest_prediction_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Prediction Date"},"total_media_spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Media Spend"},"total_sales":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Sales"},"avg_brand_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Brand Value"},"latest_effect_roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latest Effect Roi"}},"type":"object","required":["Id","name","slug","periodicity","currency_code","created_date","last_used_date","activity_dashboard_mode"],"title":"Projects","description":"Schema for project response.","examples":[{"Id":1,"active_models":[{"country":"US","grouping":"all","quality_score":0.92,"region":"West","targets":3}],"activity_dashboard_mode":"ACTIVE","countries":["US","UK"],"created_date":"2024-01-15T10:30:00","currency_code":"USD","last_used_date":"2024-12-01T14:22:00","latest_effect_roi":1.45,"name":"Q4 Marketing Analysis","num_countries":2,"num_data_sources_uploaded":3,"periodicity":"WEEK","products":["ProductA","ProductB"],"regions":["West","East"],"slug":"q4-marketing-2024"}]},"ProjectsRequest":{"properties":{"name":{"type":"string","maxLength":30,"minLength":2,"title":"Name","description":"name attribute for project"},"periodicity":{"$ref":"#/components/schemas/Periodicity","description":"Periodicity for project, must be capital letter."},"currency_code":{"type":"string","maxLength":3,"minLength":3,"title":"Currency Code","description":"Currency code for project, must be capital letter and follow ISO 4217, check `/info/currencies`.","one_of":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VES","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWL"]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"slug for project"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional free-text note about the project."}},"type":"object","required":["name","periodicity","currency_code"],"title":"ProjectsRequest","description":"Schema for project request body.","examples":[{"currency_code":"USD","name":"Q4 Marketing Analysis","periodicity":"WEEK","slug":"q4-marketing-2024"}]},"ProjectsUpdate":{"properties":{"periodicity":{"anyOf":[{"$ref":"#/components/schemas/Periodicity"},{"type":"null"}],"description":"Periodicity for project, must be capital letter."},"currency_code":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency Code","description":"Currency code for project, must be capital letter and follow ISO 4217, check `/info/currencies`.","one_of":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VES","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWL"]},"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"name attribute for project"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"slug for project"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional free-text note about the project."},"activity_dashboard_mode":{"anyOf":[{"$ref":"#/components/schemas/ActivityDasboardMode"},{"type":"null"}],"description":"Default activity dashborad model"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings","description":"Custom UI settings"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Default source of attribution reference points the caller does not supply: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin)."},"strict_limits":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict Limits","description":"Refuse jobs whose dataset or inputs fall outside the variable limits. Off: such jobs run and return LimitWarnings."},"response_curve_source":{"anyOf":[{"$ref":"#/components/schemas/ResponseCurveSource"},{"type":"null"}],"description":"Curves an attribution set's periods are valued on: source_model (the model that produced each period) or active (each combination's active model)."},"response_curve_groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Curve Groups","description":"Variable groups whose input variables get default response curves: any Effect Dashboard tab group except Events. Empty means none. Adding a group tops up the active models' missing curves; removing one removes nothing."}},"type":"object","title":"ProjectsUpdate","description":"Schema for partial project updates.","examples":[{"activity_dashboard_mode":"ACTIVE","currency_code":"EUR","name":"Q4 Marketing Analysis Updated","periodicity":"MONTH","settings":{"theme":"dark","timezone":"UTC"},"slug":"q4-marketing-updated"}]},"QualityRuleSchema":{"properties":{"id":{"type":"string","minLength":1,"title":"Id"},"metric":{"oneOf":[{"$ref":"#/components/schemas/FitMetric"},{"$ref":"#/components/schemas/SanityMetric"}],"title":"Metric","discriminator":{"propertyName":"scope","mapping":{"fit":"#/components/schemas/FitMetric","sanity":"#/components/schemas/SanityMetric"}}},"op":{"$ref":"#/components/schemas/RuleOp"},"threshold":{"type":"number","title":"Threshold"},"enabled":{"type":"boolean","title":"Enabled","default":true},"onMissing":{"$ref":"#/components/schemas/RuleOnMissing","default":"ignore"},"target":{"oneOf":[{"$ref":"#/components/schemas/TargetGlobal"},{"$ref":"#/components/schemas/TargetKpiType"},{"$ref":"#/components/schemas/TargetResponse"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"global":"#/components/schemas/TargetGlobal","kpiType":"#/components/schemas/TargetKpiType","response":"#/components/schemas/TargetResponse"}}}},"type":"object","required":["id","metric","op","threshold","target"],"title":"QualityRuleSchema","description":"A single model quality check rule."},"QualityRulesRequest":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/QualityRuleSchema"},"type":"array","title":"Rules"}},"type":"object","required":["rules"],"title":"QualityRulesRequest","description":"Request body for PUT /projects/{...}/model-quality-rules."},"QualityRulesResponse":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/QualityRuleSchema"},"type":"array","title":"Rules"}},"type":"object","required":["rules"],"title":"QualityRulesResponse","description":"Response body for GET/PUT /projects/{...}/model-quality-rules."},"ReferenceFill":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date","description":"Start of the reference window. ISO 8601 format, no timezone."},"end_date":{"type":"string","format":"date-time","title":"End Date","description":"End of the reference window. Must cover the same number of periods as the job's own data range."},"variables":{"items":{"type":"string"},"type":"array","title":"Variables","description":"Variable slugs to fill from the reference window."}},"type":"object","required":["start_date","end_date","variables"],"title":"ReferenceFill","description":"A past window to fill `variables` from instead of sending their values.\n\nThe window must span the same number of periods as the job's own window,\non the project's periodicity grid. A slug that also carries explicit\nvalues keeps them — the fill skips what it finds."},"ReferencePointBaseline":{"properties":{"variable":{"type":"string","title":"Variable","description":"Variable slug."},"baseline":{"type":"number","title":"Baseline","description":"Set baseline."}},"type":"object","required":["variable","baseline"],"title":"ReferencePointBaseline","description":"Attribution job baseline."},"ReferencePointFallback":{"type":"string","enum":["Min","Max","Zero"],"title":"ReferencePointFallback","description":"Attribution's reference point fallback."},"ReferencePointSource":{"type":"string","enum":["DataMin","MinLimit"],"title":"ReferencePointSource","description":"Where an attribution takes a reference point the caller did not supply."},"ReferenceWindow":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date","description":"Start of the reference window. ISO 8601 format, no timezone."},"end_date":{"type":"string","format":"date-time","title":"End Date","description":"End of the reference window. ISO 8601 format, no timezone."}},"type":"object","required":["start_date","end_date"],"title":"ReferenceWindow","description":"A past window an override's values were taken or shaped from."},"ResponseCurve":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for analysis"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Origin":{"anyOf":[{"$ref":"#/components/schemas/JobOrigin"},{"type":"null"}],"description":"manual, plan, fit or model"},"TrimTemporal":{"type":"boolean","title":"Trimtemporal","description":"Whether the stored temporal tail was trimmed","default":false},"SkippedVariables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Skippedvariables","description":"Default-grid variables skipped because they are zero throughout or have no range within their limits"}},"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"}]},"ResponseCurveCombination":{"properties":{"IId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Iid","description":"The combination's IId"},"Country":{"type":"string","title":"Country","description":"Country code of the combination"},"Region":{"type":"string","title":"Region","description":"Region code of the combination"},"Grouping":{"type":"string","title":"Grouping","description":"Grouping of the combination"}},"type":"object","required":["Country","Region","Grouping"],"title":"ResponseCurveCombination","description":"A modelling combination of an attribution set."},"ResponseCurveDetailed":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for analysis"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Origin":{"anyOf":[{"$ref":"#/components/schemas/JobOrigin"},{"type":"null"}],"description":"manual, plan, fit or model"},"TrimTemporal":{"type":"boolean","title":"Trimtemporal","description":"Whether the stored temporal tail was trimmed","default":false},"SkippedVariables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Skippedvariables","description":"Default-grid variables skipped because they are zero throughout or have no range within their limits"},"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"},"CompletedVariables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Completedvariables","description":"Variables whose curves are stored so far; set only by engines that report per-variable progress (express models)"}},"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":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start Val"},"end_val":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End Val"},"steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Steps","default":10}},"type":"object","required":["variable"],"title":"ResponseCurveInput","description":"Settings for values the response curve shoule be calcualted for.\n\nA variable given without `start_val` and `end_val` sweeps the platform\ndefault grid: 21 points over the whole dataset's range widened by 20% on\neach side, tail points a quarter, a half and a whole of that width beyond\nboth ends, all clamped to natural limits, plus the variable's mean as the\nflagged operating point."},"ResponseCurveOpSpecResponse":{"properties":{"data":{"additionalProperties":{"items":{},"type":"array"},"type":"object","title":"Data"},"dates":{"items":{"type":"string"},"type":"array","title":"Dates"},"ops":{"items":{"$ref":"#/components/schemas/OpSpecCurveOp"},"type":"array","title":"Ops"},"key_to_slug":{"additionalProperties":{"type":"string"},"type":"object","title":"Key To Slug","description":"Sanitized variable key -> the canonical slug the api writes into the result rows. A result keys its responses by the engine's sanitized key; a browser preview needs this to name them the way the saved result does."}},"type":"object","required":["data","dates","ops","key_to_slug"],"title":"ResponseCurveOpSpecResponse","description":"A response curve's ops: the rows they share, and one op per curve input."},"ResponseCurvePost":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Id of dataset to use. Used 'active' or leave empty to use active dataset within project."},"curve_inputs":{"items":{"$ref":"#/components/schemas/ResponseCurveInput"},"type":"array","title":"Curve Inputs"},"model_id":{"type":"integer","title":"Model Id","description":"The id of the model that should be used to do the response job with."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":10},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[20,40,50,60,80]},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false},"trim_temporal":{"type":"boolean","title":"Trim Temporal","description":"Store each temporal series only up to its last date with an effect above 0.1% of its peak.","default":false},"browser_results":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/BrowserResponseCurvePayload"},"type":"object"},{"type":"null"}],"title":"Browser Results","description":"`response_curve` results computed in the browser against this express model's portable engine: one per entry in `curve_inputs`, keyed by that entry's `variable`. When set on an express model, the job is materialized from these payloads instead of dispatched as ops. Every curve is checked before any is written, and a submission missing one is refused whole - the job could otherwise never complete. Ignored for non-express models."},"browser_input_hashes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Browser Input Hashes","description":"The `input_hash` of each op `POST /live_models/{id}/op_spec` handed the browser (`ops[].input_hash`), keyed like `browser_results`. The server rebuilds every op this request describes and refuses the save (409) if any hash disagrees."}},"type":"object","required":["model_id"],"title":"ResponseCurvePost","description":"Response curve submit.","examples":[{"curve_inputs":[{"end_val":100000.0,"start_val":0.0,"steps":20,"variable":"tv_spend"},{"end_val":50000.0,"start_val":0.0,"steps":15,"variable":"digital_spend"}],"dataset_id":"active","end_date":"2024-12-31T00:00:00Z","model_id":1,"name":"TV Spend Response Curve","note":"Analyze diminishing returns on TV advertising","priority":30,"quantiles":[20,40,50,60,80],"samples":10,"start_date":"2024-01-01T00:00:00Z"}]},"ResponseCurveSegment":{"properties":{"DateFrom":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Datefrom","description":"First date of the run; null on the first segment"},"DateTo":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dateto","description":"Last date of the run; null for the active model"},"ModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Modelid","description":"IId of the model whose curves value the run"},"ModelName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modelname","description":"That model's name"},"SourceModelId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sourcemodelid","description":"IId of the model that produced the run; differs from ModelId on a no_curves fallback, null when it was deleted or is unknown"},"SourceModelName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcemodelname","description":"The source model's name"},"FallbackReason":{"anyOf":[{"type":"string","enum":["model_deleted","no_curves","unmapped"]},{"type":"null"}],"title":"Fallbackreason","description":"Why the active model stands in for the source model: it was deleted, has no curves, or the set's period sources are not recorded; null when it does not"},"Data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Data","description":"The model's curve rows: Variable, Quantile, Response, Effect, Level, Type, Marginal, OperatingPoint, DataMin, DataMax, ROI, RROI, EROI, CPX, mROI, mRROI, mCPX; null when the model has no curves"}},"type":"object","title":"ResponseCurveSegment","description":"A run of a combination's dates valued on one model's current curves."},"ResponseCurveSource":{"type":"string","enum":["source_model","active"],"title":"ResponseCurveSource","description":"Which model's response curves value an attribution set's periods."},"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."},"SalesEconomics":{"properties":{"Products":{"items":{"$ref":"#/components/schemas/SalesProductEconomics"},"type":"array","title":"Products"},"Missing":{"additionalProperties":{"items":{"$ref":"#/components/schemas/MissingUnitMetric"},"type":"array"},"propertyNames":{"enum":["revenue","profit"]},"type":"object","title":"Missing","description":"Per derived optimization target, the per-unit variables it lacks. An empty list means the target can be derived; the optimization submit applies the same pairing."}},"type":"object","required":["Products","Missing"],"title":"SalesEconomics","description":"How a dataset's Sales variables pair up for revenue and profit."},"SalesMetrics":{"type":"string","enum":["PricePerUnit","UnitsSold","ProfitPerUnit","CostPerUnit"],"title":"SalesMetrics","description":"Sales metrics."},"SalesProductEconomics":{"properties":{"UnitsSold":{"type":"string","title":"Unitssold","description":"The product's UnitsSold variable slug."},"Product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product","description":"The raw Product facet."},"PricePerUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priceperunit","description":"Slug of the product's PricePerUnit, if any."},"CostPerUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Costperunit","description":"Slug of the product's CostPerUnit, if any."},"ProfitPerUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profitperunit","description":"Slug of the product's ProfitPerUnit, if any."}},"type":"object","required":["UnitsSold"],"title":"SalesProductEconomics","description":"A product's units sold and the per-unit variables that price it."},"SanityMetric":{"properties":{"scope":{"type":"string","const":"sanity","title":"Scope"},"kind":{"$ref":"#/components/schemas/SanityMetricKind"},"subject":{"oneOf":[{"$ref":"#/components/schemas/SanityVarGroupSubject"},{"$ref":"#/components/schemas/SanityVariableSubject"}],"title":"Subject","discriminator":{"propertyName":"kind","mapping":{"varGroup":"#/components/schemas/SanityVarGroupSubject","variable":"#/components/schemas/SanityVariableSubject"}}}},"type":"object","required":["scope","kind","subject"],"title":"SanityMetric","description":"Sanity-scope rule metric."},"SanityMetricKind":{"type":"string","enum":["share_of_effect","sum_effect","roi_effect","roi_revenue","roi_profit","cpx"],"title":"SanityMetricKind","description":"Sanity-check metric kinds (effect / ROI shape)."},"SanityVarGroupSubject":{"properties":{"kind":{"type":"string","const":"varGroup","title":"Kind"},"varGroup":{"$ref":"#/components/schemas/VariableGroups"},"filters":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Filters"}},"type":"object","required":["kind","varGroup"],"title":"SanityVarGroupSubject","description":"Sanity subject targeting a variable group."},"SanityVariableSubject":{"properties":{"kind":{"type":"string","const":"variable","title":"Kind"},"varSlug":{"type":"string","title":"Varslug"}},"type":"object","required":["kind","varSlug"],"title":"SanityVariableSubject","description":"Sanity subject targeting a single variable by slug."},"Season":{"properties":{"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the seasonal effect"},"shared":{"type":"boolean","title":"Shared","description":"Should the effect be shared between the targets or should the effect be individual per targets.","default":false},"multiplicative":{"type":"boolean","title":"Multiplicative","description":"Use a multiplicative season.","default":false}},"type":"object","title":"Season","description":"Control the season."},"SeedProjectRequest":{"properties":{"resource_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Resource Types","description":"Which optional result types to seed, from {simulation, prediction, optimization, response_curve, attribution, attribution_set}. Omit to seed all of them. The upload/dataset/model are always seeded regardless."}},"type":"object","title":"SeedProjectRequest","description":"Schema for POST /projects/{team_id}/{project_id}/seed request body."},"SimulationAttribution":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"samples":{"type":"integer","title":"The samples","description":"Hom many subsamples to draw from the posterior distribution. The higher number of samples the better the uncertainty estimation becomes but it also takes longer to run.","default":20},"baseline":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReferencePointBaseline"},"type":"array"},{"type":"null"}],"title":"Baseline"},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"The priority value for the job.","default":30},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","default":[1,25,50,75,99]},"referece_point_fallback":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointFallback"},{"type":"null"}],"description":"Reference point fallback.","default":"Min"},"reference_point_source":{"anyOf":[{"$ref":"#/components/schemas/ReferencePointSource"},{"type":"null"}],"description":"Source of reference points not given in `baseline`: DataMin (dataset minimum) or MinLimit (resolved variable MinLimit, falling back to DataMin). Omit to use the project's default."},"predicted_targets_as_data":{"type":"boolean","title":"Predicted Targets As Data","description":"Set predicted targets as data.","default":true},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed. If omitted, the chained attribution inherits the parent job's seed."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"The first date in the date range used to select data from the dataset"},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"The last date in the date range used to select data from the dataset."},"simulation_scenario":{"type":"string","enum":["BaseScenario","Scenario"],"title":"Simulation Scenario","description":"Simulation scenario to run attribution.","default":"Scenario"},"simulation_quantile":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Simulation Quantile","description":"Simulation quantile to run attribution.","default":50}},"type":"object","title":"SimulationAttribution","description":"Run attribution after simulation job."},"SimulationAttributionAssociation":{"properties":{"Attribution":{"$ref":"#/components/schemas/AttributionRef"},"Scenario":{"type":"string","title":"Scenario"},"Quantile":{"type":"number","title":"Quantile"}},"type":"object","required":["Attribution","Scenario","Quantile"],"title":"SimulationAttributionAssociation","description":"Reference schema for simulation attribution association."},"SimulationAttributionInput":{"properties":{"id":{"type":"integer","title":"Id"},"quantile":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Quantile"},"scenario":{"type":"string","enum":["BaseScenario","Scenario"],"title":"Scenario"},"job_type":{"type":"string","const":"simulation","title":"Job Type","default":"simulation"}},"type":"object","required":["id","quantile","scenario"],"title":"SimulationAttributionInput","description":"Attribution job from simulation result."},"SimulationColumns":{"type":"string","enum":["Country","Region","Grouping","Variable","Date","Effect","Type","Quantile"],"title":"SimulationColumns"},"SimulationDetail":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Custom name. Autogenerated if empty."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Optional description or documentation for this resource."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Use instead of `name` to let the API pick a free name by appending a counter (`<prefix> 1`, `<prefix> 2`, ...)."},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date","description":"Start of the scenario comparison period. Use ISO 8601 format (e.g., '2024-01-01T00:00:00'). Must align with project periodicity."},"end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date","description":"End of the scenario comparison period. Use ISO 8601 format. Must be after start_date and align with project periodicity."},"early_stopping":{"anyOf":[{"$ref":"#/components/schemas/EarlyStopping"},{"type":"null"}],"description":"Early stopping configuration to halt simulation if convergence criteria are met. Reduces computation time for stable simulations."},"model_id":{"type":"integer","title":"Model Id","description":"IId of the trained model to use. Model must have Status=COMPLETED. Get available models from GET /models endpoint."},"dataset_id":{"anyOf":[{"type":"integer"},{"$ref":"#/components/schemas/DatasetType"},{"type":"null"}],"title":"Dataset Id","description":"Dataset IId to use. Omit or pass 'active' for the project's active dataset. Dataset must be compatible with the model's variables."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","description":"Uncertainty percentiles to compute (1-100). Higher values capture more uncertainty. Common: [20, 40, 50, 60, 80] for median + ranges. Legacy placement kept for compatibility: prefer the top-level 'quantiles' on the request, matching predictions and attributions.","default":[20,40,50,60,80]},"additional_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Additional Config","description":"UI-specific configuration passed through to frontend display."}},"type":"object","required":["model_id"],"title":"SimulationDetail","description":"Configuration for a simulation job comparing baseline vs scenario forecasts.","examples":[{"dataset_id":"active","end_date":"2024-12-31T00:00:00","model_id":1,"name":"Q4 Sales Simulation","note":"Simulating media spend scenarios for Q4","quantiles":[20,40,50,60,80],"start_date":"2024-01-01T00:00:00"}]},"SimulationJobs":{"properties":{"LimitWarnings":{"items":{"type":"string"},"type":"array","title":"Limitwarnings","description":"Limit violations found at submit that did not refuse the job because the project is not strict. Empty outside the submit response."},"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"IId":{"type":"integer","title":"Iid","description":"Internal identifier used in API paths (e.g., /predictions/{IId})"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Background worker job ID for status tracking"},"DataSet":{"$ref":"#/components/schemas/DataSetRef","description":"Reference to the dataset used for this job"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User-defined display name for the job"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"User-defined description or documentation"},"Status":{"$ref":"#/components/schemas/JobState","description":"Current job state: PENDING, RUNNING, COMPLETED, or FAILED"},"Date":{"type":"string","format":"date-time","title":"Date","description":"Job creation timestamp"},"Model":{"$ref":"#/components/schemas/ModelsRef","description":"Reference to the trained model used for this simulation"},"ScenarioStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scenariostartdate","description":"Start date for scenario comparison period"},"ScenarioEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scenarioenddate","description":"End date for scenario comparison period"},"Source":{"type":"string","enum":["manual","fit","optimization","simulation","prediction"],"title":"Source","description":"What produced this simulation: manual or optimization","readOnly":true}},"type":"object","required":["IId","DataSet","Status","Date","Model","Source"],"title":"SimulationJobs","description":"Response schema for simulation jobs listing and summary views.","examples":[{"CreatorId":"user-123","DataSet":{"CreatedDate":"2024-01-15T10:30:00Z","IId":1,"Name":"Marketing Dataset","Selected":true,"Status":"complete"},"Date":"2024-01-15T10:30:00","IId":1,"JobId":456,"Model":{"Country":"USA","CreatedDate":"2024-01-15T10:30:00","Grouping":"all","IId":1,"Name":"USA Model","Region":"all"},"Name":"Q4 Sales Simulation","Note":"Simulation for Q4 marketing scenarios","ScenarioEndDate":"2024-12-31T00:00:00","ScenarioStartDate":"2024-01-01T00:00:00","Status":"completed"}]},"SimulationJobsRef":{"properties":{"IId":{"type":"integer","title":"Iid"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Date":{"type":"string","format":"date-time","title":"Date"},"Status":{"$ref":"#/components/schemas/JobState"},"IsFromOptimization":{"type":"boolean","title":"Isfromoptimization","description":"Whether this simulation was submitted by an optimization job.","readOnly":true}},"type":"object","required":["IId","Date","Status","IsFromOptimization"],"title":"SimulationJobsRef","description":"Reference schema for simulation Job."},"SimulationParams":{"properties":{"samples":{"type":"integer","title":"The samples","description":"Number of posterior samples to draw for uncertainty estimation. Higher values (e.g., 50-100) give smoother uncertainty bands but take longer. Default (20) is suitable for most use cases.","default":20},"priority":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"The priority","description":"Job queue priority from 1-100. Higher values are processed first. Use higher priority for time-sensitive simulations. Default (60) is standard priority.","default":60}},"type":"object","title":"SimulationParams","description":"Sampling and job parameters for simulation execution.","examples":[{"priority":60,"samples":20}]},"SimulationRequest":{"properties":{"model_param":{"anyOf":[{"$ref":"#/components/schemas/SimulationParams"},{"type":"null"}],"description":"Sampling parameters controlling uncertainty estimation. 'samples' determines posterior draws (more = better uncertainty, slower). 'priority' sets job queue priority (higher = processed sooner).","default":{"samples":20,"priority":60}},"simulation_detail":{"$ref":"#/components/schemas/SimulationDetail","description":"Core simulation configuration: model to use, date range for comparison, and dataset reference. Required fields: model_id. For custom date ranges, provide start_date and end_date."},"updated_values":{"additionalProperties":{"items":{"$ref":"#/components/schemas/UpdatedVariable"},"type":"array"},"propertyNames":{"enum":["BaseScenario","Scenario"]},"type":"object","title":"Updated Values","description":"Variable modifications for scenario comparison. Dict with keys 'BaseScenario' and 'Scenario', each containing list of {variable, update} objects. 'update' is a list of values matching the date range length."},"reference_fill":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ReferenceFill"},"propertyNames":{"enum":["BaseScenario","Scenario"]},"type":"object"},{"type":"null"}],"title":"Reference Fill","description":"Fill listed variables from a past window instead of sending values, keyed like updated_values."},"quantiles":{"anyOf":[{"items":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},"type":"array"},{"type":"null"}],"title":"Quantiles","description":"Uncertainty percentiles to compute (1-100). Common: [20, 40, 50, 60, 80] for median + ranges. Also accepted at 'simulation_detail.quantiles' (legacy placement); this field wins if both are set.","default":[20,40,50,60,80]},"browser_result":{"anyOf":[{"$ref":"#/components/schemas/BrowserPredictMultiPayload"},{"type":"null"}],"description":"A `predict_multi` result computed in the browser against this express model's portable engine, over the same two scenarios. When set on an express model, the simulation is materialized from this payload instead of dispatched as a job. Ignored for non-express models."},"browser_input_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Browser Input Hash","description":"The `input_hash` returned by `POST /live_models/{id}/op_spec` for the op that produced `browser_result`. The server rebuilds the op this request describes and refuses the save if the two disagree. The op orders the scenarios `BaseScenario` then `Scenario`, so a spec asked for in the other order binds a different hash."},"attributions":{"items":{"$ref":"#/components/schemas/SimulationAttribution"},"type":"array","title":"Attributions","description":"Optional attribution jobs to auto-create after simulation completes. Use to analyze which variables drove the scenario differences."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Optional integer seed for reproducible runs. If omitted, the server generates a random seed."},"validate_limits":{"type":"boolean","title":"Validate Limits","description":"Enforce variable limits for this request even when the project is not strict. A strict project enforces them regardless; otherwise violations are returned in LimitWarnings.","default":false}},"type":"object","required":["simulation_detail","updated_values"],"title":"SimulationRequest","description":"Request body for creating a simulation job to compare scenarios.","examples":[{"attributions":[{"name":"Scenario Attribution","priority":30,"quantiles":[1,25,50,75,99],"samples":20,"simulation_quantile":50,"simulation_scenario":"Scenario"}],"model_param":{"priority":60,"samples":20},"quantiles":[20,40,50,60,80],"simulation_detail":{"dataset_id":"active","end_date":"2024-12-31T00:00:00","model_id":1,"name":"Q4 Media Spend Simulation","note":"Comparing baseline vs increased media spend","start_date":"2024-01-01T00:00:00"},"updated_values":{"BaseScenario":[{"update":[["2024-01-01T00:00:00",10000],["2024-02-01T00:00:00",10000],["2024-03-01T00:00:00",10000]],"variable":"tv_spend"},{"update":[["2024-01-01T00:00:00",5000],["2024-02-01T00:00:00",5000],["2024-03-01T00:00:00",5000]],"variable":"digital_spend"}],"Scenario":[{"update":[["2024-01-01T00:00:00",15000],["2024-02-01T00:00:00",15000],["2024-03-01T00:00:00",15000]],"variable":"tv_spend"},{"update":[["2024-01-01T00:00:00",7500],["2024-02-01T00:00:00",7500],["2024-03-01T00:00:00",7500]],"variable":"digital_spend"}]}}]},"SimulationUpdateVariable":{"properties":{"Variable":{"$ref":"#/components/schemas/VariableRef"},"Date":{"type":"string","format":"date-time","title":"Date"},"Value":{"type":"number","title":"Value"},"Source":{"$ref":"#/components/schemas/UpdateSource","description":"Where this value came from: 'manual' when the caller sent it, 'reference_fill' when the server filled it from a reference window, 'reference_pattern' when the caller sent it shaped from one.","default":"manual"},"ReferenceStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Referencestartdate","description":"Start of the reference window, when there is one."},"ReferenceEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Referenceenddate","description":"End of the reference window, when there is one."},"IsScenario":{"type":"boolean","title":"Isscenario"}},"type":"object","required":["Variable","Date","Value","IsScenario"],"title":"SimulationUpdateVariable","description":"Updated variables for simulation jobs."},"Stage":{"type":"string","enum":["train","eval"],"title":"Stage","description":"Stage at which a fit metric is evaluated."},"StartedResponseCurves":{"properties":{"Started":{"items":{"type":"integer"},"type":"array","title":"Started","description":"IIds of models whose curves were queued"},"Skipped":{"items":{"type":"integer"},"type":"array","title":"Skipped","description":"IIds of models lacking curves already computing or not trained"}},"type":"object","required":["Started","Skipped"],"title":"StartedResponseCurves","description":"The models whose default response curves a request started."},"TableFormat":{"type":"string","enum":["wide","long"],"title":"TableFormat","description":"Table format enum."},"Target":{"properties":{"targets":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Targets","description":"The targets to model."},"revenue_nodes":{"type":"boolean","title":"Revenue Nodes","description":"For sales KPI's add individual revenue nodes as well as a total revenue node, these nodes will be possible to see in the dashboards etc.","default":false},"profit_nodes":{"type":"boolean","title":"Profit Nodes","description":"For sales KPI's add individual profit nodes as well as a total profit node, these nodes will be possible to see in the dashboards etc.","default":false}},"type":"object","title":"Target","description":"Config for controlling the targets."},"TargetGlobal":{"properties":{"kind":{"type":"string","const":"global","title":"Kind"}},"type":"object","required":["kind"],"title":"TargetGlobal","description":"Rule applies globally across all responses."},"TargetKpiType":{"properties":{"kind":{"type":"string","const":"kpiType","title":"Kind"},"varGroup":{"$ref":"#/components/schemas/VariableGroups"}},"type":"object","required":["kind","varGroup"],"title":"TargetKpiType","description":"Rule applies to responses with a given KPI variable group."},"TargetResponse":{"properties":{"kind":{"type":"string","const":"response","title":"Kind"},"responseSlug":{"type":"string","title":"Responseslug"}},"type":"object","required":["kind","responseSlug"],"title":"TargetResponse","description":"Rule applies to a single response variable."},"Task":{"properties":{"Error":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"string"},{"type":"null"}],"title":"Error"},"Id":{"type":"integer","title":"Id"},"Config":{"additionalProperties":true,"type":"object","title":"Config"},"Topic":{"$ref":"#/components/schemas/TaskTopics"},"Status":{"$ref":"#/components/schemas/TaskState"}},"type":"object","required":["Id","Config","Topic","Status"],"title":"Task","description":"Reference task."},"TaskState":{"type":"string","enum":["submitted","preparing_sources","running","failed","complete"],"title":"TaskState","description":"Comnav internal task states."},"TaskStatus":{"properties":{"IId":{"type":"integer","title":"Iid"},"Status":{"$ref":"#/components/schemas/TaskState"},"JobId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Jobid","description":"Its drun job; null before submission and for kinds run in-process"}},"type":"object","required":["IId","Status","JobId"],"title":"TaskStatus","description":"One undeleted data upload's or attribution set's state."},"TaskTopics":{"type":"string","enum":["ATTRIBUTIONSET","RESPONSECURVESET","ATTRIBUTIONJOB","SIMULATIONJOB","PREDICTIONJOB","TRAINJOB","DATASET","DATAUPLOAD","GRAPHCONSTRUCT","GENERAL","OPTIMIZATIONJOB","RESPOSNSECURVEJOB","PRIORPOSTERIORJOB","EXCELJOB","GRAPHBASIC","FEATUREIMPORTANCE","GRAPHSYNERGY","LIVEMODELOP","LIVEMODELFIT","DATASETCHECK"],"title":"TaskTopics","description":"Task topics."},"Template":{"properties":{"CreatorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creatorid"},"Id":{"type":"integer","title":"Id"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"CreatedDate":{"type":"string","format":"date-time","title":"Createddate"},"Graph":{"additionalProperties":true,"type":"object","title":"Graph"}},"type":"object","required":["Id","CreatedDate","Graph"],"title":"Template","description":"Template response.","examples":[{"CreatedDate":"2024-01-15T10:30:00","CreatorId":"user-123","Graph":{"edges":[{"arguments":["positive"],"source":"media","target":"sales"}],"nodes":[{"id":"sales","key":"File:Sales","type":"Node.Data"},{"id":"media","key":"File:Media","type":"Node.Data"}]},"Id":1,"Name":"Marketing Mix Model Template","Note":"Template for standard marketing mix analysis"}]},"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","description":"Direction of the trend effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the trend effect"}},"type":"object","title":"Trend","description":"Control the trend."},"UpdateSource":{"type":"string","enum":["manual","reference_fill","reference_pattern"],"title":"UpdateSource","description":"Where an override's values came from."},"UpdateValue":{"prefixItems":[{"type":"string","format":"date-time","title":"Date"},{"type":"number","title":"Value"}],"type":"array","maxItems":2,"minItems":2},"UpdateVariable":{"properties":{"Variable":{"$ref":"#/components/schemas/VariableRef"},"Date":{"type":"string","format":"date-time","title":"Date"},"Value":{"type":"number","title":"Value"},"Source":{"$ref":"#/components/schemas/UpdateSource","description":"Where this value came from: 'manual' when the caller sent it, 'reference_fill' when the server filled it from a reference window, 'reference_pattern' when the caller sent it shaped from one.","default":"manual"},"ReferenceStartDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Referencestartdate","description":"Start of the reference window, when there is one."},"ReferenceEndDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Referenceenddate","description":"End of the reference window, when there is one."}},"type":"object","required":["Variable","Date","Value"],"title":"UpdateVariable","description":"Updated variables."},"UpdatedVariable":{"properties":{"variable":{"type":"string","title":"Variable"},"update":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpdateValue"},"type":"array"},{"type":"null"}],"title":"Update"},"reference":{"anyOf":[{"$ref":"#/components/schemas/ReferenceWindow"},{"type":"null"}],"description":"The past window these values were shaped from, when they were. Recorded on the job as source 'reference_pattern'; the values are used exactly as sent. Values the server fills through 'reference_fill' are recorded as 'reference_fill' on their own."}},"type":"object","required":["variable","update"],"title":"UpdatedVariable","description":"Schema for schenario updated variabls values."},"UploadVariable":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Variable identifier"},"Slug":{"type":"string","title":"Slug","description":"Unique variable key in format 'source-type-attributes'"},"Name":{"type":"string","title":"Name","description":"Human-readable display name"},"Type":{"$ref":"#/components/schemas/VariableTypes","description":"Variable category: Sales, Media, Macro, Price, etc."},"Group":{"$ref":"#/components/schemas/VariableGroups","description":"Functional grouping: KPI, Input, Volume, etc."},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit","description":"Project-level lower bound for this variable. Used as the attribution reference point and as a hard lower bound on user-supplied values in simulation/prediction/optimization/response-curve/attribution-baseline inputs. NULL means no enforced lower bound."},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit","description":"Project-level upper bound for this variable. Hard upper bound on user-supplied values in simulation/prediction/optimization/response-curve/attribution-baseline inputs. NULL means no enforced upper bound."},"util_attr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}],"description":"Raw ingested variable attributes (Product, Media, Campaign, etc.), untouched by any VariableUtilOverrides relabel."},"util_attr_relabeled":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}],"description":"``util_attr`` with per-Type display relabels applied. Identical to ``util_attr`` when this variable has no active VariableUtilOverrides customization."},"Combinations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ModellingCombinationForDataImport"},"type":"array"},{"type":"null"}],"title":"Combinations","description":"With ``with_combinations``: the (Country, Region, Grouping) combinations this variable has data for in the upload, as recorded at ingest (``DataImportVariableInterpolation``). These are the pairs a new dataset's ``variable_limits`` may name for the upload."}},"type":"object","required":["IId","Slug","Name","Type","Group"],"title":"UploadVariable","description":"An upload's variable, optionally with the combinations it holds there.","examples":[{"Group":"Sales","IId":1,"Name":"Health Units Sold","Slug":"file-sales-product-health-metric-units_sold","Type":"Sales","util_attr":{"Metric":"UnitsSold","Product":"Health"},"util_attr_relabeled":{"Metric":"UnitsSold","Product":"Health"}}]},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Variable-Input":{"properties":{"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"$ref":"#/components/schemas/DateRange-Input"},{"type":"null"}],"title":"Dates","description":"Select all dates by set to None, select specific dates, or select range"},"variable":{"type":"string","title":"Variable","description":"Variable slug, as listed by the model's variable endpoints. Includes the KPIs a model introduces itself, which have no dataset variable behind them."}},"type":"object","required":["variable"],"title":"Variable","description":"Select Variable."},"Variable-Output":{"properties":{"IId":{"type":"integer","title":"Iid","description":"Variable identifier"},"Slug":{"type":"string","title":"Slug","description":"Unique variable key in format 'source-type-attributes'"},"Name":{"type":"string","title":"Name","description":"Human-readable display name"},"Type":{"$ref":"#/components/schemas/VariableTypes","description":"Variable category: Sales, Media, Macro, Price, etc."},"Group":{"$ref":"#/components/schemas/VariableGroups","description":"Functional grouping: KPI, Input, Volume, etc."},"MinLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Minlimit","description":"Project-level lower bound for this variable. Used as the attribution reference point and as a hard lower bound on user-supplied values in simulation/prediction/optimization/response-curve/attribution-baseline inputs. NULL means no enforced lower bound."},"MaxLimit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Maxlimit","description":"Project-level upper bound for this variable. Hard upper bound on user-supplied values in simulation/prediction/optimization/response-curve/attribution-baseline inputs. NULL means no enforced upper bound."},"util_attr":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}],"description":"Raw ingested variable attributes (Product, Media, Campaign, etc.), untouched by any VariableUtilOverrides relabel."},"util_attr_relabeled":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}],"description":"``util_attr`` with per-Type display relabels applied. Identical to ``util_attr`` when this variable has no active VariableUtilOverrides customization."}},"type":"object","required":["IId","Slug","Name","Type","Group"],"title":"Variable","description":"Response schema for variable metadata.","examples":[{"Group":"Sales","IId":1,"Name":"Health Units Sold","Slug":"file-sales-product-health-metric-units_sold","Type":"Sales","util_attr":{"Metric":"UnitsSold","Product":"Health"},"util_attr_relabeled":{"Metric":"UnitsSold","Product":"Health"}}]},"VariableDataBody":{"properties":{"data_filters":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Data Filters"},"dataset_names":{"anyOf":[{"items":{"$ref":"#/components/schemas/Dataset"},"type":"array"},{"type":"null"}],"title":"Dataset Names"}},"type":"object","title":"VariableDataBody","description":"Request body for variable data _query endpoints."},"VariableGroups":{"type":"string","enum":["Brand","CompetitorBrand","Distribution","CompetitorDistribution","Events","Macro","Media","CustomerExperience","CompetitorMedia","Sales","CompetitorPrice","Visits","Weather","Extra","Model","Price","Profit","Cost","Data","KPI","Season","Trend","Connect","Experimental","Advanced","Math","Customer_experience","Competitor_price","Competitor_media","Competitor_brand","Competitor_distribution","Event","Holiday","Base","Revenue","Dates"],"title":"VariableGroups","description":"Vraible groups."},"VariableHidePlanInput":{"properties":{"VarIId":{"type":"integer","title":"Variid"},"Slug":{"type":"string","title":"Slug"}},"type":"object","required":["VarIId","Slug"],"title":"VariableHidePlanInput","description":"Schema for a variable hidden from plan (predict/simulate/optimize) input."},"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."},"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."},"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":"Variable types."},"VariableUtilOverride":{"properties":{"Type":{"$ref":"#/components/schemas/VariableTypes"},"Attribute":{"type":"string","title":"Attribute"},"OriginalValue":{"type":"string","title":"Originalvalue"},"OverrideValue":{"type":"string","title":"Overridevalue"}},"type":"object","required":["Type","Attribute","OriginalValue","OverrideValue"],"title":"VariableUtilOverride","description":"A per-type util_attr relabel.\n\nWithin variable ``Type``, attribute ``Attribute``'s base value\n``OriginalValue`` is displayed as ``OverrideValue`` for every variable of\nthat Type sharing the base value."},"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":"Raw ingested variable attributes (Product, Media, Campaign, etc.), untouched by any VariableUtilOverrides relabel."},"util_attr_relabeled":{"anyOf":[{"$ref":"#/components/schemas/_UtilAttr"},{"type":"null"}],"description":"``util_attr`` with per-Type display relabels applied. Identical to ``util_attr`` when this variable has no active VariableUtilOverrides customization."},"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"},"util_attr_relabeled":{"Metric":"UnitsSold","Product":"Health"}}]},"Visits":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the visits effect","default":"positive"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the visits effect"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Visits","description":"Control the visits variables."},"Weather":{"properties":{"influence":{"$ref":"#/components/schemas/PosNegNeu","description":"Direction of the weather effect","default":"neutral"},"effect":{"anyOf":[{"$ref":"#/components/schemas/ImpactSize"},{"type":"null"}],"description":"Magnitude and variability of the weather effect; null (the default) adds no effect-size prior, so the data alone sets it"},"variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Variables","description":"The subset of variables to include, if not set all variables will be used."}},"type":"object","title":"Weather","description":"Control the weather variables."},"_DetailedPredictionScenarios":{"properties":{"Name":{"type":"string","title":"Name"},"UpdateVariable":{"items":{"$ref":"#/components/schemas/UpdateVariable"},"type":"array","title":"Updatevariable"}},"type":"object","required":["Name","UpdateVariable"],"title":"_DetailedPredictionScenarios"},"_Indicator":{"properties":{"Indicator":{"type":"string","title":"Indicator"},"StartDate":{"type":"string","format":"date-time","title":"Startdate"},"EndDate":{"type":"string","format":"date-time","title":"Enddate"}},"type":"object","required":["Indicator","StartDate","EndDate"],"title":"_Indicator"},"_InputPoint":{"properties":{"Variable":{"$ref":"#/components/schemas/_Variable"},"StartVal":{"type":"number","title":"Startval"},"EndVal":{"type":"number","title":"Endval"},"Steps":{"type":"integer","title":"Steps"}},"type":"object","required":["Variable","StartVal","EndVal","Steps"],"title":"_InputPoint"},"_UtilAttr":{"properties":{"Product":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product"},"Media":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media"},"Campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign"},"Metric":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metric"},"Competitor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competitor"},"Event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"},"Channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"Brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"Indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Indicator"},"Variable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable"},"Format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"Device":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device"},"TargetGroup":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targetgroup"},"Creative":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creative"},"Category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","title":"_UtilAttr"},"_Variable":{"properties":{"Slug":{"type":"string","title":"Slug"}},"type":"object","required":["Slug"],"title":"_Variable"},"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":["Variable","Quantile","Target","Type","Effect"],"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.Country","Brand.Region","Brand.Grouping","Brand.Date","Brand.Brand","Brand.Metric","Brand.Value","Brand.InsertDate","Brand.Id","Brand.ProjectId","Brand.VarId","CompetitorBrand.Country","CompetitorBrand.Region","CompetitorBrand.Grouping","CompetitorBrand.Date","CompetitorBrand.Brand","CompetitorBrand.Competitor","CompetitorBrand.Metric","CompetitorBrand.Value","CompetitorBrand.InsertDate","CompetitorBrand.Id","CompetitorBrand.ProjectId","CompetitorBrand.VarId","Distribution.Country","Distribution.Region","Distribution.Grouping","Distribution.Date","Distribution.Product","Distribution.Channel","Distribution.Value","Distribution.InsertDate","Distribution.Id","Distribution.ProjectId","Distribution.VarId","CompetitorDistribution.Country","CompetitorDistribution.Region","CompetitorDistribution.Grouping","CompetitorDistribution.Date","CompetitorDistribution.Product","CompetitorDistribution.Channel","CompetitorDistribution.Competitor","CompetitorDistribution.Value","CompetitorDistribution.InsertDate","CompetitorDistribution.Id","CompetitorDistribution.ProjectId","CompetitorDistribution.VarId","Events.Country","Events.Region","Events.Grouping","Events.StartDate","Events.EndDate","Events.Event","Events.InsertDate","Events.Id","Events.ProjectId","Events.VarId","Macro.Country","Macro.Region","Macro.Grouping","Macro.Date","Macro.Indicator","Macro.Value","Macro.InsertDate","Macro.Id","Macro.ProjectId","Macro.VarId","Media.Country","Media.Region","Media.Grouping","Media.Date","Media.Product","Media.Media","Media.Campaign","Media.Metric","Media.Channel","Media.Format","Media.Device","Media.TargetGroup","Media.Creative","Media.Category","Media.Value","Media.InsertDate","Media.Id","Media.ProjectId","Media.VarId","CustomerExperience.Country","CustomerExperience.Region","CustomerExperience.Grouping","CustomerExperience.Date","CustomerExperience.Product","CustomerExperience.Channel","CustomerExperience.Investment","CustomerExperience.InsertDate","CustomerExperience.Id","CustomerExperience.ProjectId","CustomerExperience.VarId","CompetitorMedia.Country","CompetitorMedia.Region","CompetitorMedia.Grouping","CompetitorMedia.Date","CompetitorMedia.Product","CompetitorMedia.Competitor","CompetitorMedia.Media","CompetitorMedia.Campaign","CompetitorMedia.Channel","CompetitorMedia.Investment","CompetitorMedia.InsertDate","CompetitorMedia.Id","CompetitorMedia.ProjectId","CompetitorMedia.VarId","Sales.Country","Sales.Region","Sales.Grouping","Sales.Date","Sales.Product","Sales.Metric","Sales.Value","Sales.InsertDate","Sales.Id","Sales.ProjectId","Sales.VarId","CompetitorPrice.Country","CompetitorPrice.Region","CompetitorPrice.Grouping","CompetitorPrice.Date","CompetitorPrice.Product","CompetitorPrice.Competitor","CompetitorPrice.PricePerUnit","CompetitorPrice.InsertDate","CompetitorPrice.Id","CompetitorPrice.ProjectId","CompetitorPrice.VarId","Visits.Country","Visits.Region","Visits.Grouping","Visits.Date","Visits.Channel","Visits.Visits","Visits.InsertDate","Visits.Id","Visits.ProjectId","Visits.VarId","Weather.Date","Weather.Country","Weather.Region","Weather.Grouping","Weather.Indicator","Weather.Value","Weather.InsertDate","Weather.Id","Weather.ProjectId","Weather.VarId","Extra.Country","Extra.Region","Extra.Grouping","Extra.Date","Extra.Variable","Extra.Category","Extra.Value","Extra.InsertDate","Extra.Id","Extra.ProjectId","Extra.VarId"],"title":"DataColumns"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"security":[{"HTTPBearer":[]}]}