@model-match/api 3.110.0 → 3.112.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi.json CHANGED
@@ -26533,6 +26533,66 @@
26533
26533
  ],
26534
26534
  "type": "object"
26535
26535
  },
26536
+ "DatabaseStatement": {
26537
+ "additionalProperties": false,
26538
+ "properties": {
26539
+ "params": {
26540
+ "anyOf": [
26541
+ {
26542
+ "items": {
26543
+ "anyOf": [
26544
+ {
26545
+ "type": "string"
26546
+ },
26547
+ {
26548
+ "type": "number"
26549
+ },
26550
+ {
26551
+ "type": "boolean"
26552
+ },
26553
+ {
26554
+ "nullable": true
26555
+ }
26556
+ ]
26557
+ },
26558
+ "maxItems": 999,
26559
+ "type": "array"
26560
+ },
26561
+ {
26562
+ "additionalProperties": {
26563
+ "anyOf": [
26564
+ {
26565
+ "type": "string"
26566
+ },
26567
+ {
26568
+ "type": "number"
26569
+ },
26570
+ {
26571
+ "type": "boolean"
26572
+ },
26573
+ {
26574
+ "nullable": true
26575
+ }
26576
+ ]
26577
+ },
26578
+ "type": "object"
26579
+ }
26580
+ ],
26581
+ "description": "Values for the statement's parameters: an array for `?`, or an object for named ones (`:name`, `@name`, `$name`; the key includes the prefix). Text, numbers, true/false or null."
26582
+ },
26583
+ "sql": {
26584
+ "description": "ONE statement: CREATE TABLE / INDEX / VIEW / TRIGGER, ALTER TABLE, DROP TABLE / INDEX / VIEW / TRIGGER, INSERT, REPLACE, UPDATE, DELETE, WITH … or SELECT.",
26585
+ "example": "INSERT INTO deals (client, amount) VALUES (?, ?)",
26586
+ "maxLength": 100000,
26587
+ "minLength": 1,
26588
+ "type": "string"
26589
+ }
26590
+ },
26591
+ "required": [
26592
+ "sql"
26593
+ ],
26594
+ "type": "object"
26595
+ },
26536
26596
  "DatabaseStatementResult": {
26537
26597
  "properties": {
26538
26598
  "changes": {
@@ -28236,6 +28296,102 @@
28236
28296
  ],
28237
28297
  "type": "object"
28238
28298
  },
28299
+ "FileDatabaseConflict": {
28300
+ "properties": {
28301
+ "code": {
28302
+ "type": "string"
28303
+ },
28304
+ "error": {
28305
+ "type": "string"
28306
+ },
28307
+ "latestRevision": {
28308
+ "description": "For `revision_conflict`: the database's latest revision.",
28309
+ "type": "integer"
28310
+ }
28311
+ },
28312
+ "required": [
28313
+ "error",
28314
+ "code"
28315
+ ],
28316
+ "type": "object"
28317
+ },
28318
+ "FileDatabaseCreate": {
28319
+ "additionalProperties": false,
28320
+ "properties": {
28321
+ "links": {
28322
+ "items": {
28323
+ "maxLength": 220,
28324
+ "minLength": 3,
28325
+ "type": "string"
28326
+ },
28327
+ "maxItems": 20,
28328
+ "type": "array"
28329
+ },
28330
+ "metadata": {
28331
+ "additionalProperties": {
28332
+ "nullable": true
28333
+ },
28334
+ "type": "object"
28335
+ },
28336
+ "name": {
28337
+ "description": "The file name.",
28338
+ "example": "pipeline.sqlite",
28339
+ "maxLength": 255,
28340
+ "minLength": 1,
28341
+ "type": "string"
28342
+ },
28343
+ "origin": {
28344
+ "description": "Defaults to `app`.",
28345
+ "pattern": "^[a-z][a-z0-9_]{0,31}$",
28346
+ "type": "string"
28347
+ },
28348
+ "provenance": {
28349
+ "additionalProperties": {
28350
+ "maxLength": 200,
28351
+ "type": "string"
28352
+ },
28353
+ "type": "object"
28354
+ },
28355
+ "statements": {
28356
+ "description": "The schema (and any rows) to start from, run in order in one transaction. Leave out for an empty database.",
28357
+ "items": {
28358
+ "$ref": "#/components/schemas/DatabaseStatement"
28359
+ },
28360
+ "maxItems": 200,
28361
+ "type": "array"
28362
+ }
28363
+ },
28364
+ "required": [
28365
+ "name"
28366
+ ],
28367
+ "type": "object"
28368
+ },
28369
+ "FileDatabaseCreated": {
28370
+ "properties": {
28371
+ "data": {
28372
+ "properties": {
28373
+ "file": {
28374
+ "$ref": "#/components/schemas/File"
28375
+ },
28376
+ "results": {
28377
+ "items": {
28378
+ "$ref": "#/components/schemas/DatabaseStatementResult"
28379
+ },
28380
+ "type": "array"
28381
+ }
28382
+ },
28383
+ "required": [
28384
+ "file",
28385
+ "results"
28386
+ ],
28387
+ "type": "object"
28388
+ }
28389
+ },
28390
+ "required": [
28391
+ "data"
28392
+ ],
28393
+ "type": "object"
28394
+ },
28239
28395
  "FileDatabaseQuery": {
28240
28396
  "additionalProperties": false,
28241
28397
  "properties": {
@@ -28355,6 +28511,72 @@
28355
28511
  ],
28356
28512
  "type": "object"
28357
28513
  },
28514
+ "FileDatabaseWrite": {
28515
+ "additionalProperties": false,
28516
+ "properties": {
28517
+ "expectRevision": {
28518
+ "description": "The revision you read. When the database has moved on, nothing is written and the answer is `409 revision_conflict` with `latestRevision`.",
28519
+ "minimum": 1,
28520
+ "type": "integer"
28521
+ },
28522
+ "statements": {
28523
+ "description": "Run in order, in ONE transaction: if any fails, none of them is kept.",
28524
+ "items": {
28525
+ "$ref": "#/components/schemas/DatabaseStatement"
28526
+ },
28527
+ "maxItems": 200,
28528
+ "minItems": 1,
28529
+ "type": "array"
28530
+ }
28531
+ },
28532
+ "required": [
28533
+ "statements"
28534
+ ],
28535
+ "type": "object"
28536
+ },
28537
+ "FileDatabaseWriteResult": {
28538
+ "properties": {
28539
+ "data": {
28540
+ "properties": {
28541
+ "database": {
28542
+ "allOf": [
28543
+ {
28544
+ "$ref": "#/components/schemas/FileDatabase"
28545
+ },
28546
+ {
28547
+ "description": "A SQLite database's tables, columns and row counts, views, indexes and triggers — for its current revision."
28548
+ }
28549
+ ]
28550
+ },
28551
+ "results": {
28552
+ "description": "One per statement, in order: `changes` for a write (including rows the database's own triggers changed, on some versions), rows for a SELECT or RETURNING.",
28553
+ "items": {
28554
+ "$ref": "#/components/schemas/DatabaseStatementResult"
28555
+ },
28556
+ "type": "array"
28557
+ },
28558
+ "revision": {
28559
+ "description": "The new revision the change was saved as.",
28560
+ "type": "integer"
28561
+ },
28562
+ "sizeBytes": {
28563
+ "type": "integer"
28564
+ }
28565
+ },
28566
+ "required": [
28567
+ "revision",
28568
+ "sizeBytes",
28569
+ "results",
28570
+ "database"
28571
+ ],
28572
+ "type": "object"
28573
+ }
28574
+ },
28575
+ "required": [
28576
+ "data"
28577
+ ],
28578
+ "type": "object"
28579
+ },
28358
28580
  "FileError": {
28359
28581
  "properties": {
28360
28582
  "code": {
@@ -54157,6 +54379,14 @@
54157
54379
  "maxLength": 40,
54158
54380
  "minLength": 1,
54159
54381
  "type": "string"
54382
+ },
54383
+ "widen": {
54384
+ "description": "ZIP codes or counties with too few past cases: `suggest` (default) refuses first, free, with a wider area to train on (`422 scope_too_small`); `off` trains as asked.",
54385
+ "enum": [
54386
+ "suggest",
54387
+ "off"
54388
+ ],
54389
+ "type": "string"
54160
54390
  }
54161
54391
  },
54162
54392
  "required": [
@@ -54280,12 +54510,12 @@
54280
54510
  "StudioModelError": {
54281
54511
  "properties": {
54282
54512
  "code": {
54283
- "description": "Stable code. The request: `invalid_request`, `invalid_model`, `invalid_model_name`, `unknown_outcome`, `unknown_data_point`, `blocked_data_point` (a data point that describes today, not the as-of date), `unknown_table`, `unknown_column`, `unsupported_key`, `direction_not_allowed` (a direction on a data point that is not a number), `invalid_boost`. The model: `model_not_found`, `published_model_not_found` (`basedOnPublished` names no published model), `model_exists`, `model_limit_reached`, `model_training_in_progress`, `model_not_ready`. Your own data: `no_date_column`, `data_point_is_outcome`, `data_point_is_key`, `data_point_after_outcome`, `data_point_needs_outcomes_table`, `data_points_missing_for_population`, `too_few_examples`, `too_few_positives`, `outcomes_all_one_class`, `outcome_dates_in_future`, `match_rate_too_low`. Never allowed: `protected_characteristic` (400: a data point, own column, direction rule or boost about race, color, ethnicity, national origin, religion, sex or gender, familial status, disability, age, marital status or receipt of public assistance; `details.fields`, `details.characteristics`; also when refreshing a model that has one). Shared: `busy`, `rate_limited`, `no_organization`, `models_disabled` (501: training is turned off here; do not retry), `studio_unavailable`.",
54513
+ "description": "Stable code. The request: `invalid_request`, `invalid_model`, `invalid_model_name`, `unknown_outcome`, `unknown_data_point`, `blocked_data_point` (a data point that describes today, not the as-of date), `unknown_table`, `unknown_column`, `unsupported_key`, `direction_not_allowed` (a direction on a data point that is not a number), `invalid_boost`. The model: `model_not_found`, `published_model_not_found` (`basedOnPublished` names no published model), `model_exists`, `model_limit_reached`, `model_training_in_progress`, `model_not_ready`. Your own data: `no_date_column`, `data_point_is_outcome`, `data_point_is_key`, `data_point_after_outcome`, `data_point_needs_outcomes_table`, `data_points_missing_for_population`, `too_few_examples`, `too_few_positives`, `outcomes_all_one_class`, `outcome_dates_in_future`, `match_rate_too_low`. The area: `scope_too_small` (422: too few past cases in the ZIP codes or counties; `details.suggestedScope` is the wider area to train on, `details.scopeSizes` each area's count). Never allowed: `protected_characteristic` (400: a data point, own column, direction rule or boost about race, color, ethnicity, national origin, religion, sex or gender, familial status, disability, age, marital status or receipt of public assistance; `details.fields`, `details.characteristics`; also when refreshing a model that has one). Shared: `busy`, `rate_limited`, `no_organization`, `models_disabled` (501: training is turned off here; do not retry), `studio_unavailable`.",
54284
54514
  "example": "match_rate_too_low",
54285
54515
  "type": "string"
54286
54516
  },
54287
54517
  "details": {
54288
- "description": "What the error is about, when known: the `table`, `column` or `dataPoint`, `suggestions`, and the numbers behind a refusal (`examples`, `positives`, `minimum`, `rows`, `matched`, `matchRate`, `limit`, `retryAfterSeconds`); for `protected_characteristic`, every offending field (`fields`) and what they are about (`characteristics`).",
54518
+ "description": "What the error is about, when known: the `table`, `column` or `dataPoint`, `suggestions`, and the numbers behind a refusal (`examples`, `positives`, `minimum`, `rows`, `matched`, `matchRate`, `limit`, `retryAfterSeconds`); for `protected_characteristic`, every offending field (`fields`) and what they are about (`characteristics`); for `scope_too_small`, `suggestedScope` and `scopeSizes`.",
54289
54519
  "properties": {
54290
54520
  "availableTables": {
54291
54521
  "items": {
@@ -54344,6 +54574,35 @@
54344
54574
  "running": {
54345
54575
  "type": "number"
54346
54576
  },
54577
+ "scopeSizes": {
54578
+ "items": {
54579
+ "properties": {
54580
+ "cases": {
54581
+ "type": "number"
54582
+ },
54583
+ "enough": {
54584
+ "type": "boolean"
54585
+ },
54586
+ "label": {
54587
+ "type": "string"
54588
+ },
54589
+ "scope": {
54590
+ "$ref": "#/components/schemas/StudioModelScopeRef"
54591
+ }
54592
+ },
54593
+ "required": [
54594
+ "scope",
54595
+ "label",
54596
+ "cases",
54597
+ "enough"
54598
+ ],
54599
+ "type": "object"
54600
+ },
54601
+ "type": "array"
54602
+ },
54603
+ "suggestedScope": {
54604
+ "$ref": "#/components/schemas/StudioModelScopeRef"
54605
+ },
54347
54606
  "suggestions": {
54348
54607
  "items": {
54349
54608
  "type": "string"
@@ -55624,6 +55883,35 @@
55624
55883
  ],
55625
55884
  "type": "object"
55626
55885
  },
55886
+ "StudioModelScopeRef": {
55887
+ "properties": {
55888
+ "counties": {
55889
+ "items": {
55890
+ "type": "string"
55891
+ },
55892
+ "type": "array"
55893
+ },
55894
+ "national": {
55895
+ "type": "boolean"
55896
+ },
55897
+ "state": {
55898
+ "type": "string"
55899
+ },
55900
+ "states": {
55901
+ "items": {
55902
+ "type": "string"
55903
+ },
55904
+ "type": "array"
55905
+ },
55906
+ "zipCodes": {
55907
+ "items": {
55908
+ "type": "string"
55909
+ },
55910
+ "type": "array"
55911
+ }
55912
+ },
55913
+ "type": "object"
55914
+ },
55627
55915
  "StudioPaymentRequired": {
55628
55916
  "properties": {
55629
55917
  "balance": {
@@ -55822,6 +56110,35 @@
55822
56110
  "running": {
55823
56111
  "type": "number"
55824
56112
  },
56113
+ "scopeSizes": {
56114
+ "items": {
56115
+ "properties": {
56116
+ "cases": {
56117
+ "type": "number"
56118
+ },
56119
+ "enough": {
56120
+ "type": "boolean"
56121
+ },
56122
+ "label": {
56123
+ "type": "string"
56124
+ },
56125
+ "scope": {
56126
+ "$ref": "#/components/schemas/StudioModelScopeRef"
56127
+ }
56128
+ },
56129
+ "required": [
56130
+ "scope",
56131
+ "label",
56132
+ "cases",
56133
+ "enough"
56134
+ ],
56135
+ "type": "object"
56136
+ },
56137
+ "type": "array"
56138
+ },
56139
+ "suggestedScope": {
56140
+ "$ref": "#/components/schemas/StudioModelScopeRef"
56141
+ },
55825
56142
  "suggestions": {
55826
56143
  "items": {
55827
56144
  "type": "string"
@@ -58764,7 +59081,7 @@
58764
59081
  "info": {
58765
59082
  "description": "ModelMatch API — mortgage and real-estate market data.\n\n## Bulk delivery limits\n\nThe `POST /{entity}/bulk-delivery` endpoints export a full result set to\nS3 as NDJSON, JSON, CSV, or Parquet.\n\n- **Up to 5,000 rows per delivery: no entitlement required.** Available to\n every authenticated caller.\n- **Above 5,000 rows: requires the entity's `bulk-delivery.{entity}`\n entitlement** (e.g. `bulk-delivery.loans`). The grant's scope sets your\n row ceiling and may also restrict which rows and fields you receive.\n\nA delivery that would exceed the limit available to you is rejected with\n`403 entitlement_missing`, reporting the matched row count and the ceiling\nthat applied. To stay under the limit, pass `limit` — the job then delivers\n(and bills for) only the first `limit` rows of a broader query.\n\n**Need a higher limit?** Email support@modelmatch.com to request the\nentitlement. Limits are raised per organization and per entity.\n\nBulk delivery is billed at 1 credit per delivered row whether or not\nan entitlement is held.\n\nInstead of a download, a delivery can be sent to a push target configured\non your workspace: pass `destination: { type: \"push-target\", targetId }`.\nThe same limits and billing apply.",
58766
59083
  "title": "ModelMatch API",
58767
- "version": "3.214.0"
59084
+ "version": "3.216.0"
58768
59085
  },
58769
59086
  "openapi": "3.1.0",
58770
59087
  "paths": {
@@ -86472,6 +86789,118 @@
86472
86789
  ]
86473
86790
  }
86474
86791
  },
86792
+ "/v1/files/databases": {
86793
+ "post": {
86794
+ "description": "Create a new SQLite database in your files library, empty or from a schema (`statements`, run in order in one transaction, with the same rules as a write). It is yours, `kind: \"sqlite\"`, revision 1, and ready at once: query it, write to it, share it and load it into Studio like any database file. Free.",
86795
+ "operationId": "createFileDatabase",
86796
+ "requestBody": {
86797
+ "content": {
86798
+ "application/json": {
86799
+ "schema": {
86800
+ "$ref": "#/components/schemas/FileDatabaseCreate"
86801
+ }
86802
+ }
86803
+ },
86804
+ "required": true
86805
+ },
86806
+ "responses": {
86807
+ "201": {
86808
+ "content": {
86809
+ "application/json": {
86810
+ "schema": {
86811
+ "$ref": "#/components/schemas/FileDatabaseCreated"
86812
+ }
86813
+ }
86814
+ },
86815
+ "description": "The new database"
86816
+ },
86817
+ "400": {
86818
+ "content": {
86819
+ "application/json": {
86820
+ "schema": {
86821
+ "$ref": "#/components/schemas/FileError"
86822
+ }
86823
+ }
86824
+ },
86825
+ "description": "Invalid request"
86826
+ },
86827
+ "401": {
86828
+ "content": {
86829
+ "application/json": {
86830
+ "schema": {
86831
+ "$ref": "#/components/schemas/FileError"
86832
+ }
86833
+ }
86834
+ },
86835
+ "description": "Not signed in"
86836
+ },
86837
+ "403": {
86838
+ "content": {
86839
+ "application/json": {
86840
+ "schema": {
86841
+ "$ref": "#/components/schemas/FileError"
86842
+ }
86843
+ }
86844
+ },
86845
+ "description": "Not allowed"
86846
+ },
86847
+ "404": {
86848
+ "content": {
86849
+ "application/json": {
86850
+ "schema": {
86851
+ "$ref": "#/components/schemas/FileError"
86852
+ }
86853
+ }
86854
+ },
86855
+ "description": "No such file"
86856
+ },
86857
+ "409": {
86858
+ "content": {
86859
+ "application/json": {
86860
+ "schema": {
86861
+ "$ref": "#/components/schemas/FileError"
86862
+ }
86863
+ }
86864
+ },
86865
+ "description": "Conflicts with the file's state"
86866
+ },
86867
+ "422": {
86868
+ "content": {
86869
+ "application/json": {
86870
+ "schema": {
86871
+ "$ref": "#/components/schemas/FileError"
86872
+ }
86873
+ }
86874
+ },
86875
+ "description": "The upload did not match"
86876
+ },
86877
+ "502": {
86878
+ "content": {
86879
+ "application/json": {
86880
+ "schema": {
86881
+ "$ref": "#/components/schemas/FileError"
86882
+ }
86883
+ }
86884
+ },
86885
+ "description": "Could not check membership"
86886
+ },
86887
+ "503": {
86888
+ "content": {
86889
+ "application/json": {
86890
+ "schema": {
86891
+ "$ref": "#/components/schemas/FileError"
86892
+ }
86893
+ }
86894
+ },
86895
+ "description": "Storage or the access log unavailable"
86896
+ }
86897
+ },
86898
+ "summary": "Create a database file",
86899
+ "tags": [
86900
+ "Files"
86901
+ ]
86902
+ }
86903
+ },
86475
86904
  "/v1/files/references": {
86476
86905
  "post": {
86477
86906
  "description": "Adds a library entry for something that stays live in another app (a dashboard, chart or table): its title, kind and where to open it (`ref`), not a copy of it. It is ready at once, has no contents, and is listed, searched, pinned, renamed, shared, linked and deleted like any file. Calling it again for the same `ref.app` and `ref.id` updates your entry (name, kind, URL, and metadata when sent; links sent are added) and answers `200` with the same id. To show a thumbnail, put an image on it with `POST /v1/files/{id}/revisions`; its contents are then that image. Free.",
@@ -88042,6 +88471,132 @@
88042
88471
  ]
88043
88472
  }
88044
88473
  },
88474
+ "/v1/files/{id}/database/write": {
88475
+ "post": {
88476
+ "description": "Run a batch of statements on a SQLite database in your files library, in ONE transaction, and save the result as the file's next revision. You need to own the file or be able to edit it. Allowed: CREATE / ALTER / DROP of tables, indexes, views and triggers, and INSERT, REPLACE, UPDATE, DELETE (and SELECT, WITH, RETURNING). Refused, anywhere in a statement or a trigger: ATTACH, DETACH, PRAGMA, VACUUM, transaction statements, virtual and temporary tables, extension loading and file functions (`400 sql_not_allowed`). The database's own triggers run. If any statement fails (`400 sql_error`, or `422 timeout` past 8 seconds, or `422 database_too_large` past 100 MB), nothing is kept. Pass `expectRevision` to write only if nobody saved a newer revision since you read it; whenever someone did, the answer is `409 revision_conflict` with `latestRevision`. Every write is a revision on the file and on its access log. Tables loaded into Studio from the database are read again. Free.",
88477
+ "operationId": "writeFileDatabase",
88478
+ "parameters": [
88479
+ {
88480
+ "description": "The file's id.",
88481
+ "in": "path",
88482
+ "name": "id",
88483
+ "required": true,
88484
+ "schema": {
88485
+ "description": "The file's id.",
88486
+ "example": "file_3f2a…",
88487
+ "pattern": "^file_[0-9a-f]{32}$",
88488
+ "type": "string"
88489
+ }
88490
+ }
88491
+ ],
88492
+ "requestBody": {
88493
+ "content": {
88494
+ "application/json": {
88495
+ "schema": {
88496
+ "$ref": "#/components/schemas/FileDatabaseWrite"
88497
+ }
88498
+ }
88499
+ },
88500
+ "required": true
88501
+ },
88502
+ "responses": {
88503
+ "200": {
88504
+ "content": {
88505
+ "application/json": {
88506
+ "schema": {
88507
+ "$ref": "#/components/schemas/FileDatabaseWriteResult"
88508
+ }
88509
+ }
88510
+ },
88511
+ "description": "Saved as the next revision"
88512
+ },
88513
+ "400": {
88514
+ "content": {
88515
+ "application/json": {
88516
+ "schema": {
88517
+ "$ref": "#/components/schemas/FileError"
88518
+ }
88519
+ }
88520
+ },
88521
+ "description": "Invalid request"
88522
+ },
88523
+ "401": {
88524
+ "content": {
88525
+ "application/json": {
88526
+ "schema": {
88527
+ "$ref": "#/components/schemas/FileError"
88528
+ }
88529
+ }
88530
+ },
88531
+ "description": "Not signed in"
88532
+ },
88533
+ "403": {
88534
+ "content": {
88535
+ "application/json": {
88536
+ "schema": {
88537
+ "$ref": "#/components/schemas/FileError"
88538
+ }
88539
+ }
88540
+ },
88541
+ "description": "Not allowed"
88542
+ },
88543
+ "404": {
88544
+ "content": {
88545
+ "application/json": {
88546
+ "schema": {
88547
+ "$ref": "#/components/schemas/FileError"
88548
+ }
88549
+ }
88550
+ },
88551
+ "description": "No such file"
88552
+ },
88553
+ "409": {
88554
+ "content": {
88555
+ "application/json": {
88556
+ "schema": {
88557
+ "$ref": "#/components/schemas/FileDatabaseConflict"
88558
+ }
88559
+ }
88560
+ },
88561
+ "description": "`revision_conflict` (`latestRevision`), `revision_pending`, `not_a_database` or `not_ready`"
88562
+ },
88563
+ "422": {
88564
+ "content": {
88565
+ "application/json": {
88566
+ "schema": {
88567
+ "$ref": "#/components/schemas/FileError"
88568
+ }
88569
+ }
88570
+ },
88571
+ "description": "The upload did not match"
88572
+ },
88573
+ "502": {
88574
+ "content": {
88575
+ "application/json": {
88576
+ "schema": {
88577
+ "$ref": "#/components/schemas/FileError"
88578
+ }
88579
+ }
88580
+ },
88581
+ "description": "Could not check membership"
88582
+ },
88583
+ "503": {
88584
+ "content": {
88585
+ "application/json": {
88586
+ "schema": {
88587
+ "$ref": "#/components/schemas/FileError"
88588
+ }
88589
+ }
88590
+ },
88591
+ "description": "Storage or the access log unavailable"
88592
+ }
88593
+ },
88594
+ "summary": "Change a database file",
88595
+ "tags": [
88596
+ "Files"
88597
+ ]
88598
+ }
88599
+ },
88045
88600
  "/v1/files/{id}/links": {
88046
88601
  "delete": {
88047
88602
  "description": "The owner or an editor removes a link. Removing a CRM record link also needs you to be able to see the record. Free.",
@@ -103953,7 +104508,7 @@
103953
104508
  }
103954
104509
  }
103955
104510
  },
103956
- "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."
104511
+ "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help. `scope_too_small` — the ZIP codes or counties have too few past cases of the outcome to learn from and test fairly: nothing was started or charged; `details.suggestedScope` is the smallest wider area with enough (its county, the county and its neighbors, or the state) and `details.scopeSizes` lists each area's past cases. Send it as `scope`, or `widen: \"off\"` to train on the area as asked."
103957
104512
  },
103958
104513
  "429": {
103959
104514
  "content": {
@@ -103982,7 +104537,7 @@
103982
104537
  ]
103983
104538
  },
103984
104539
  "post": {
103985
- "description": "Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. A model may never use a protected characteristic — race, color, ethnicity, national origin, religion, sex or gender, familial status, disability, age, marital status or receipt of public assistance — as a data point, an own column, a direction rule or a boost: a column named for one is refused with `400 protected_characteristic`, naming them in `details.fields`; nothing unlocks it. Neighborhood data points (`needsFairLendingReview`), ZIP code and city boosts and directions on a place are allowed for everyone; the report card adds a fair-lending caveat. `basedOnPublished` starts from a model ModelMatch publishes (its `mm_model_*` table): its outcome, data points and weighting are copied into your organization as your own model — anything this request gives overrides them — and trained on your scope; its report card compares with the published original. Weighting is optional: `recencyWeighting` counts recent past cases more while learning (testing stays unweighted), a `direction` on a number data point holds the model to it, and `boosts` add `priorityScore` and `priorityRank` to the scores table after the model; the report card is about `score`, never the boosted order. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). An organization can have a few models running at once (3 by default; past that, `409 model_training_in_progress` says how many are running and the limit), and a model runs once at a time; up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.",
104540
+ "description": "Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. A model may never use a protected characteristic — race, color, ethnicity, national origin, religion, sex or gender, familial status, disability, age, marital status or receipt of public assistance — as a data point, an own column, a direction rule or a boost: a column named for one is refused with `400 protected_characteristic`, naming them in `details.fields`; nothing unlocks it. Neighborhood data points (`needsFairLendingReview`), ZIP code and city boosts and directions on a place are allowed for everyone; the report card adds a fair-lending caveat. `basedOnPublished` starts from a model ModelMatch publishes (its `mm_model_*` table): its outcome, data points and weighting are copied into your organization as your own model — anything this request gives overrides them — and trained on your scope; its report card compares with the published original. Weighting is optional: `recencyWeighting` counts recent past cases more while learning (testing stays unweighted), a `direction` on a number data point holds the model to it, and `boosts` add `priorityScore` and `priorityRank` to the scores table after the model; the report card is about `score`, never the boosted order. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). A model of a few ZIP codes or counties is checked for enough past cases of the outcome first, in seconds and free: with too few it is refused (`422 scope_too_small`) with the smallest wider area that has enough — the county, the county and its neighbors, or the state, never another state — in `details.suggestedScope`, and each area's count in `details.scopeSizes`; send that as `scope`, or `widen: \"off\"` to train on the area as asked. An organization can have a few models running at once (3 by default; past that, `409 model_training_in_progress` says how many are running and the limit), and a model runs once at a time; up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.",
103986
104541
  "operationId": "createStudioModel",
103987
104542
  "requestBody": {
103988
104543
  "content": {
@@ -104063,7 +104618,7 @@
104063
104618
  }
104064
104619
  }
104065
104620
  },
104066
- "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."
104621
+ "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help. `scope_too_small` — the ZIP codes or counties have too few past cases of the outcome to learn from and test fairly: nothing was started or charged; `details.suggestedScope` is the smallest wider area with enough (its county, the county and its neighbors, or the state) and `details.scopeSizes` lists each area's past cases. Send it as `scope`, or `widen: \"off\"` to train on the area as asked."
104067
104622
  },
104068
104623
  "429": {
104069
104624
  "content": {
@@ -104175,7 +104730,7 @@
104175
104730
  }
104176
104731
  }
104177
104732
  },
104178
- "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."
104733
+ "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help. `scope_too_small` — the ZIP codes or counties have too few past cases of the outcome to learn from and test fairly: nothing was started or charged; `details.suggestedScope` is the smallest wider area with enough (its county, the county and its neighbors, or the state) and `details.scopeSizes` lists each area's past cases. Send it as `scope`, or `widen: \"off\"` to train on the area as asked."
104179
104734
  },
104180
104735
  "429": {
104181
104736
  "content": {
@@ -104387,7 +104942,7 @@
104387
104942
  }
104388
104943
  }
104389
104944
  },
104390
- "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."
104945
+ "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help. `scope_too_small` — the ZIP codes or counties have too few past cases of the outcome to learn from and test fairly: nothing was started or charged; `details.suggestedScope` is the smallest wider area with enough (its county, the county and its neighbors, or the state) and `details.scopeSizes` lists each area's past cases. Send it as `scope`, or `widen: \"off\"` to train on the area as asked."
104391
104946
  },
104392
104947
  "429": {
104393
104948
  "content": {
@@ -104525,7 +105080,7 @@
104525
105080
  }
104526
105081
  }
104527
105082
  },
104528
- "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."
105083
+ "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help. `scope_too_small` — the ZIP codes or counties have too few past cases of the outcome to learn from and test fairly: nothing was started or charged; `details.suggestedScope` is the smallest wider area with enough (its county, the county and its neighbors, or the state) and `details.scopeSizes` lists each area's past cases. Send it as `scope`, or `widen: \"off\"` to train on the area as asked."
104529
105084
  },
104530
105085
  "429": {
104531
105086
  "content": {
@@ -104661,7 +105216,7 @@
104661
105216
  }
104662
105217
  }
104663
105218
  },
104664
- "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help."
105219
+ "description": "Your own data cannot support this model as asked: no date column, too few rows or too few of one outcome, every row the same outcome, dates in the future, too few rows matched to homes, or a data point that is the outcome or was recorded after it. `error` states the numbers and what would help. `scope_too_small` — the ZIP codes or counties have too few past cases of the outcome to learn from and test fairly: nothing was started or charged; `details.suggestedScope` is the smallest wider area with enough (its county, the county and its neighbors, or the state) and `details.scopeSizes` lists each area's past cases. Send it as `scope`, or `widen: \"off\"` to train on the area as asked."
104665
105220
  },
104666
105221
  "429": {
104667
105222
  "content": {