@netlify/open-api 2.52.0 → 2.54.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/dist/swagger.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "swagger": "2.0",
3
3
  "info": {
4
- "version": "2.52.0",
4
+ "version": "2.54.0",
5
5
  "title": "Netlify's API documentation",
6
6
  "description": "Netlify is a hosting service for the programmable web. It understands your documents and provides an API to handle atomic deploys of websites, manage form submissions, inject JavaScript snippets, and much more. This is a REST-style API that uses JSON for serialization and OAuth 2 for authentication.\n\nThis document is an OpenAPI reference for the Netlify API that you can explore. For more detailed instructions for common uses, please visit the [online documentation](https://www.netlify.com/docs/api/). Visit our Community forum to join the conversation about [understanding and using Netlify's API](https://community.netlify.com/t/common-issue-understanding-and-using-netlifys-api/160).\n\nAdditionally, we have two API clients for your convenience:\n- [Go Client](https://github.com/netlify/open-api#go-client)\n- [JS Client](https://github.com/netlify/build/tree/main/packages/js-client)",
7
7
  "termsOfService": "https://www.netlify.com/legal/terms-of-use/",
@@ -291,6 +291,25 @@
291
291
  }
292
292
  }
293
293
  }
294
+ },
295
+ "functions_region": {
296
+ "type": "string",
297
+ "description": "The functions region for this deploy as an airport code.\n"
298
+ },
299
+ "functions_region_overrides": {
300
+ "type": "array",
301
+ "items": {
302
+ "type": "object",
303
+ "properties": {
304
+ "name": {
305
+ "type": "string"
306
+ },
307
+ "region": {
308
+ "type": "string"
309
+ }
310
+ }
311
+ },
312
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
294
313
  }
295
314
  }
296
315
  },
@@ -640,6 +659,25 @@
640
659
  }
641
660
  }
642
661
  }
662
+ },
663
+ "functions_region": {
664
+ "type": "string",
665
+ "description": "The functions region for this deploy as an airport code.\n"
666
+ },
667
+ "functions_region_overrides": {
668
+ "type": "array",
669
+ "items": {
670
+ "type": "object",
671
+ "properties": {
672
+ "name": {
673
+ "type": "string"
674
+ },
675
+ "region": {
676
+ "type": "string"
677
+ }
678
+ }
679
+ },
680
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
643
681
  }
644
682
  }
645
683
  },
@@ -1027,6 +1065,25 @@
1027
1065
  }
1028
1066
  }
1029
1067
  }
1068
+ },
1069
+ "functions_region": {
1070
+ "type": "string",
1071
+ "description": "The functions region for this deploy as an airport code.\n"
1072
+ },
1073
+ "functions_region_overrides": {
1074
+ "type": "array",
1075
+ "items": {
1076
+ "type": "object",
1077
+ "properties": {
1078
+ "name": {
1079
+ "type": "string"
1080
+ },
1081
+ "region": {
1082
+ "type": "string"
1083
+ }
1084
+ }
1085
+ },
1086
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
1030
1087
  }
1031
1088
  }
1032
1089
  },
@@ -1387,6 +1444,25 @@
1387
1444
  }
1388
1445
  }
1389
1446
  }
1447
+ },
1448
+ "functions_region": {
1449
+ "type": "string",
1450
+ "description": "The functions region for this deploy as an airport code.\n"
1451
+ },
1452
+ "functions_region_overrides": {
1453
+ "type": "array",
1454
+ "items": {
1455
+ "type": "object",
1456
+ "properties": {
1457
+ "name": {
1458
+ "type": "string"
1459
+ },
1460
+ "region": {
1461
+ "type": "string"
1462
+ }
1463
+ }
1464
+ },
1465
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
1390
1466
  }
1391
1467
  }
1392
1468
  },
@@ -1735,6 +1811,25 @@
1735
1811
  }
1736
1812
  }
1737
1813
  }
1814
+ },
1815
+ "functions_region": {
1816
+ "type": "string",
1817
+ "description": "The functions region for this deploy as an airport code.\n"
1818
+ },
1819
+ "functions_region_overrides": {
1820
+ "type": "array",
1821
+ "items": {
1822
+ "type": "object",
1823
+ "properties": {
1824
+ "name": {
1825
+ "type": "string"
1826
+ },
1827
+ "region": {
1828
+ "type": "string"
1829
+ }
1830
+ }
1831
+ },
1832
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
1738
1833
  }
1739
1834
  }
1740
1835
  },
@@ -2117,6 +2212,25 @@
2117
2212
  }
2118
2213
  }
2119
2214
  }
2215
+ },
2216
+ "functions_region": {
2217
+ "type": "string",
2218
+ "description": "The functions region for this deploy as an airport code.\n"
2219
+ },
2220
+ "functions_region_overrides": {
2221
+ "type": "array",
2222
+ "items": {
2223
+ "type": "object",
2224
+ "properties": {
2225
+ "name": {
2226
+ "type": "string"
2227
+ },
2228
+ "region": {
2229
+ "type": "string"
2230
+ }
2231
+ }
2232
+ },
2233
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
2120
2234
  }
2121
2235
  }
2122
2236
  },
@@ -5578,6 +5692,25 @@
5578
5692
  }
5579
5693
  }
5580
5694
  }
5695
+ },
5696
+ "functions_region": {
5697
+ "type": "string",
5698
+ "description": "The functions region for this deploy as an airport code.\n"
5699
+ },
5700
+ "functions_region_overrides": {
5701
+ "type": "array",
5702
+ "items": {
5703
+ "type": "object",
5704
+ "properties": {
5705
+ "name": {
5706
+ "type": "string"
5707
+ },
5708
+ "region": {
5709
+ "type": "string"
5710
+ }
5711
+ }
5712
+ },
5713
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
5581
5714
  }
5582
5715
  }
5583
5716
  }
@@ -5722,6 +5855,9 @@
5722
5855
  "priority": {
5723
5856
  "type": "integer"
5724
5857
  },
5858
+ "region": {
5859
+ "type": "string"
5860
+ },
5725
5861
  "traffic_rules": {
5726
5862
  "type": "object",
5727
5863
  "properties": {
@@ -5957,6 +6093,25 @@
5957
6093
  }
5958
6094
  }
5959
6095
  }
6096
+ },
6097
+ "functions_region": {
6098
+ "type": "string",
6099
+ "description": "The functions region for this deploy as an airport code.\n"
6100
+ },
6101
+ "functions_region_overrides": {
6102
+ "type": "array",
6103
+ "items": {
6104
+ "type": "object",
6105
+ "properties": {
6106
+ "name": {
6107
+ "type": "string"
6108
+ },
6109
+ "region": {
6110
+ "type": "string"
6111
+ }
6112
+ }
6113
+ },
6114
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
5960
6115
  }
5961
6116
  }
5962
6117
  }
@@ -6121,6 +6276,25 @@
6121
6276
  }
6122
6277
  }
6123
6278
  }
6279
+ },
6280
+ "functions_region": {
6281
+ "type": "string",
6282
+ "description": "The functions region for this deploy as an airport code.\n"
6283
+ },
6284
+ "functions_region_overrides": {
6285
+ "type": "array",
6286
+ "items": {
6287
+ "type": "object",
6288
+ "properties": {
6289
+ "name": {
6290
+ "type": "string"
6291
+ },
6292
+ "region": {
6293
+ "type": "string"
6294
+ }
6295
+ }
6296
+ },
6297
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
6124
6298
  }
6125
6299
  }
6126
6300
  }
@@ -6276,6 +6450,9 @@
6276
6450
  "priority": {
6277
6451
  "type": "integer"
6278
6452
  },
6453
+ "region": {
6454
+ "type": "string"
6455
+ },
6279
6456
  "traffic_rules": {
6280
6457
  "type": "object",
6281
6458
  "properties": {
@@ -6511,6 +6688,25 @@
6511
6688
  }
6512
6689
  }
6513
6690
  }
6691
+ },
6692
+ "functions_region": {
6693
+ "type": "string",
6694
+ "description": "The functions region for this deploy as an airport code.\n"
6695
+ },
6696
+ "functions_region_overrides": {
6697
+ "type": "array",
6698
+ "items": {
6699
+ "type": "object",
6700
+ "properties": {
6701
+ "name": {
6702
+ "type": "string"
6703
+ },
6704
+ "region": {
6705
+ "type": "string"
6706
+ }
6707
+ }
6708
+ },
6709
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
6514
6710
  }
6515
6711
  }
6516
6712
  }
@@ -6713,6 +6909,25 @@
6713
6909
  }
6714
6910
  }
6715
6911
  }
6912
+ },
6913
+ "functions_region": {
6914
+ "type": "string",
6915
+ "description": "The functions region for this deploy as an airport code.\n"
6916
+ },
6917
+ "functions_region_overrides": {
6918
+ "type": "array",
6919
+ "items": {
6920
+ "type": "object",
6921
+ "properties": {
6922
+ "name": {
6923
+ "type": "string"
6924
+ },
6925
+ "region": {
6926
+ "type": "string"
6927
+ }
6928
+ }
6929
+ },
6930
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
6716
6931
  }
6717
6932
  }
6718
6933
  }
@@ -6877,6 +7092,25 @@
6877
7092
  }
6878
7093
  }
6879
7094
  }
7095
+ },
7096
+ "functions_region": {
7097
+ "type": "string",
7098
+ "description": "The functions region for this deploy as an airport code.\n"
7099
+ },
7100
+ "functions_region_overrides": {
7101
+ "type": "array",
7102
+ "items": {
7103
+ "type": "object",
7104
+ "properties": {
7105
+ "name": {
7106
+ "type": "string"
7107
+ },
7108
+ "region": {
7109
+ "type": "string"
7110
+ }
7111
+ }
7112
+ },
7113
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
6880
7114
  }
6881
7115
  }
6882
7116
  }
@@ -7370,6 +7604,25 @@
7370
7604
  }
7371
7605
  }
7372
7606
  }
7607
+ },
7608
+ "functions_region": {
7609
+ "type": "string",
7610
+ "description": "The functions region for this deploy as an airport code.\n"
7611
+ },
7612
+ "functions_region_overrides": {
7613
+ "type": "array",
7614
+ "items": {
7615
+ "type": "object",
7616
+ "properties": {
7617
+ "name": {
7618
+ "type": "string"
7619
+ },
7620
+ "region": {
7621
+ "type": "string"
7622
+ }
7623
+ }
7624
+ },
7625
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
7373
7626
  }
7374
7627
  }
7375
7628
  },
@@ -8345,6 +8598,25 @@
8345
8598
  }
8346
8599
  }
8347
8600
  }
8601
+ },
8602
+ "functions_region": {
8603
+ "type": "string",
8604
+ "description": "The functions region for this deploy as an airport code.\n"
8605
+ },
8606
+ "functions_region_overrides": {
8607
+ "type": "array",
8608
+ "items": {
8609
+ "type": "object",
8610
+ "properties": {
8611
+ "name": {
8612
+ "type": "string"
8613
+ },
8614
+ "region": {
8615
+ "type": "string"
8616
+ }
8617
+ }
8618
+ },
8619
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
8348
8620
  }
8349
8621
  }
8350
8622
  }
@@ -8609,6 +8881,25 @@
8609
8881
  }
8610
8882
  }
8611
8883
  }
8884
+ },
8885
+ "functions_region": {
8886
+ "type": "string",
8887
+ "description": "The functions region for this deploy as an airport code.\n"
8888
+ },
8889
+ "functions_region_overrides": {
8890
+ "type": "array",
8891
+ "items": {
8892
+ "type": "object",
8893
+ "properties": {
8894
+ "name": {
8895
+ "type": "string"
8896
+ },
8897
+ "region": {
8898
+ "type": "string"
8899
+ }
8900
+ }
8901
+ },
8902
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
8612
8903
  }
8613
8904
  }
8614
8905
  }
@@ -8767,6 +9058,25 @@
8767
9058
  }
8768
9059
  }
8769
9060
  }
9061
+ },
9062
+ "functions_region": {
9063
+ "type": "string",
9064
+ "description": "The functions region for this deploy as an airport code.\n"
9065
+ },
9066
+ "functions_region_overrides": {
9067
+ "type": "array",
9068
+ "items": {
9069
+ "type": "object",
9070
+ "properties": {
9071
+ "name": {
9072
+ "type": "string"
9073
+ },
9074
+ "region": {
9075
+ "type": "string"
9076
+ }
9077
+ }
9078
+ },
9079
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
8770
9080
  }
8771
9081
  }
8772
9082
  }
@@ -8948,6 +9258,9 @@
8948
9258
  },
8949
9259
  "sha": {
8950
9260
  "type": "string"
9261
+ },
9262
+ "region": {
9263
+ "type": "string"
8951
9264
  }
8952
9265
  }
8953
9266
  }
@@ -10455,18 +10768,37 @@
10455
10768
  }
10456
10769
  }
10457
10770
  }
10458
- }
10459
- }
10460
- },
10461
- "account_id": {
10462
- "type": "string"
10463
- },
10464
- "account_name": {
10465
- "type": "string"
10466
- },
10467
- "account_slug": {
10468
- "type": "string"
10469
- },
10771
+ },
10772
+ "functions_region": {
10773
+ "type": "string",
10774
+ "description": "The functions region for this deploy as an airport code.\n"
10775
+ },
10776
+ "functions_region_overrides": {
10777
+ "type": "array",
10778
+ "items": {
10779
+ "type": "object",
10780
+ "properties": {
10781
+ "name": {
10782
+ "type": "string"
10783
+ },
10784
+ "region": {
10785
+ "type": "string"
10786
+ }
10787
+ }
10788
+ },
10789
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
10790
+ }
10791
+ }
10792
+ },
10793
+ "account_id": {
10794
+ "type": "string"
10795
+ },
10796
+ "account_name": {
10797
+ "type": "string"
10798
+ },
10799
+ "account_slug": {
10800
+ "type": "string"
10801
+ },
10470
10802
  "git_provider": {
10471
10803
  "type": "string"
10472
10804
  },
@@ -10847,6 +11179,25 @@
10847
11179
  }
10848
11180
  }
10849
11181
  }
11182
+ },
11183
+ "functions_region": {
11184
+ "type": "string",
11185
+ "description": "The functions region for this deploy as an airport code.\n"
11186
+ },
11187
+ "functions_region_overrides": {
11188
+ "type": "array",
11189
+ "items": {
11190
+ "type": "object",
11191
+ "properties": {
11192
+ "name": {
11193
+ "type": "string"
11194
+ },
11195
+ "region": {
11196
+ "type": "string"
11197
+ }
11198
+ }
11199
+ },
11200
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
10850
11201
  }
10851
11202
  }
10852
11203
  },
@@ -11218,6 +11569,25 @@
11218
11569
  }
11219
11570
  }
11220
11571
  }
11572
+ },
11573
+ "functions_region": {
11574
+ "type": "string",
11575
+ "description": "The functions region for this deploy as an airport code.\n"
11576
+ },
11577
+ "functions_region_overrides": {
11578
+ "type": "array",
11579
+ "items": {
11580
+ "type": "object",
11581
+ "properties": {
11582
+ "name": {
11583
+ "type": "string"
11584
+ },
11585
+ "region": {
11586
+ "type": "string"
11587
+ }
11588
+ }
11589
+ },
11590
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
11221
11591
  }
11222
11592
  }
11223
11593
  },
@@ -17310,7 +17680,6 @@
17310
17680
  }
17311
17681
  ],
17312
17682
  "post": {
17313
- "x-internal": true,
17314
17683
  "operationId": "createSiteDatabase",
17315
17684
  "tags": [
17316
17685
  "database"
@@ -17384,12 +17753,23 @@
17384
17753
  }
17385
17754
  },
17386
17755
  "get": {
17387
- "x-internal": true,
17388
17756
  "operationId": "getSiteDatabase",
17389
17757
  "tags": [
17390
17758
  "database"
17391
17759
  ],
17392
17760
  "description": "Returns the database connection string for the specified site.",
17761
+ "parameters": [
17762
+ {
17763
+ "name": "role",
17764
+ "type": "string",
17765
+ "in": "query",
17766
+ "description": "The database role to use for the connection string. Defaults to netlifydb_owner if not specified.",
17767
+ "enum": [
17768
+ "netlifydb_owner",
17769
+ "netlifydb_readonly"
17770
+ ]
17771
+ }
17772
+ ],
17393
17773
  "responses": {
17394
17774
  "200": {
17395
17775
  "description": "OK",
@@ -17426,7 +17806,6 @@
17426
17806
  }
17427
17807
  },
17428
17808
  "delete": {
17429
- "x-internal": true,
17430
17809
  "operationId": "deleteSiteDatabase",
17431
17810
  "tags": [
17432
17811
  "database"
@@ -17468,12 +17847,11 @@
17468
17847
  }
17469
17848
  ],
17470
17849
  "post": {
17471
- "x-internal": true,
17472
17850
  "operationId": "createSiteDatabaseBranch",
17473
17851
  "tags": [
17474
17852
  "database"
17475
17853
  ],
17476
- "description": "Creates a new database branch for a deploy. If a branch already exists for the specified deploy ID, returns the existing connection string.",
17854
+ "description": "Creates a new database branch. If a branch already exists for the specified branch ID, returns the existing connection string.",
17477
17855
  "consumes": [
17478
17856
  "application/json"
17479
17857
  ],
@@ -17485,16 +17863,21 @@
17485
17863
  "type": "object",
17486
17864
  "description": "Request body for creating a database branch",
17487
17865
  "required": [
17488
- "deploy_id"
17866
+ "branch_id"
17489
17867
  ],
17490
17868
  "properties": {
17491
17869
  "parent_branch_id": {
17492
17870
  "type": "string",
17493
17871
  "description": "The ID of the parent branch to create the new branch from. Defaults to the production branch if not specified."
17494
17872
  },
17495
- "deploy_id": {
17873
+ "branch_id": {
17496
17874
  "type": "string",
17497
- "description": "The deploy ID to associate with this branch"
17875
+ "description": "The branch identifier"
17876
+ },
17877
+ "metadata": {
17878
+ "type": "object",
17879
+ "description": "Arbitrary metadata to associate with the branch",
17880
+ "additionalProperties": true
17498
17881
  }
17499
17882
  }
17500
17883
  },
@@ -17503,7 +17886,7 @@
17503
17886
  ],
17504
17887
  "responses": {
17505
17888
  "200": {
17506
- "description": "Branch already exists for this deploy",
17889
+ "description": "Branch already exists",
17507
17890
  "schema": {
17508
17891
  "type": "object",
17509
17892
  "description": "Response containing the database branch connection string",
@@ -17511,6 +17894,11 @@
17511
17894
  "connection_string": {
17512
17895
  "type": "string",
17513
17896
  "description": "The connection string for the database branch"
17897
+ },
17898
+ "metadata": {
17899
+ "type": "object",
17900
+ "description": "Metadata associated with the branch",
17901
+ "additionalProperties": true
17514
17902
  }
17515
17903
  }
17516
17904
  }
@@ -17524,6 +17912,150 @@
17524
17912
  "connection_string": {
17525
17913
  "type": "string",
17526
17914
  "description": "The connection string for the database branch"
17915
+ },
17916
+ "metadata": {
17917
+ "type": "object",
17918
+ "description": "Metadata associated with the branch",
17919
+ "additionalProperties": true
17920
+ }
17921
+ }
17922
+ }
17923
+ },
17924
+ "default": {
17925
+ "description": "error",
17926
+ "schema": {
17927
+ "type": "object",
17928
+ "required": [
17929
+ "message"
17930
+ ],
17931
+ "properties": {
17932
+ "code": {
17933
+ "type": "integer",
17934
+ "format": "int64"
17935
+ },
17936
+ "message": {
17937
+ "type": "string",
17938
+ "x-nullable": false
17939
+ }
17940
+ }
17941
+ }
17942
+ }
17943
+ }
17944
+ }
17945
+ },
17946
+ "/sites/{site_id}/database/branches": {
17947
+ "parameters": [
17948
+ {
17949
+ "name": "site_id",
17950
+ "type": "string",
17951
+ "in": "path",
17952
+ "required": true
17953
+ }
17954
+ ],
17955
+ "get": {
17956
+ "operationId": "listSiteDatabaseBranches",
17957
+ "tags": [
17958
+ "database"
17959
+ ],
17960
+ "description": "Returns all branches for the site's database with compute status and metadata.",
17961
+ "responses": {
17962
+ "200": {
17963
+ "description": "OK",
17964
+ "schema": {
17965
+ "type": "object",
17966
+ "description": "Response containing a list of database branches",
17967
+ "properties": {
17968
+ "branches": {
17969
+ "type": "array",
17970
+ "items": {
17971
+ "type": "object",
17972
+ "description": "Detailed information about a database branch",
17973
+ "properties": {
17974
+ "branch_id": {
17975
+ "type": "string",
17976
+ "description": "The branch identifier"
17977
+ },
17978
+ "name": {
17979
+ "type": "string",
17980
+ "description": "The branch name"
17981
+ },
17982
+ "connection_string": {
17983
+ "type": "string",
17984
+ "description": "The connection string for the branch"
17985
+ },
17986
+ "state": {
17987
+ "type": "string",
17988
+ "description": "The current state of the branch",
17989
+ "enum": [
17990
+ "init",
17991
+ "creating",
17992
+ "resetting",
17993
+ "ready",
17994
+ "archived"
17995
+ ]
17996
+ },
17997
+ "logical_size_bytes": {
17998
+ "type": "integer",
17999
+ "format": "int64",
18000
+ "description": "The logical size of the branch in bytes"
18001
+ },
18002
+ "created_at": {
18003
+ "type": "string",
18004
+ "format": "dateTime",
18005
+ "description": "When the branch was created"
18006
+ },
18007
+ "updated_at": {
18008
+ "type": "string",
18009
+ "format": "dateTime",
18010
+ "description": "When the branch was last updated"
18011
+ },
18012
+ "last_active_at": {
18013
+ "type": "string",
18014
+ "format": "dateTime",
18015
+ "description": "When the branch was last active"
18016
+ },
18017
+ "compute": {
18018
+ "type": "object",
18019
+ "description": "Compute endpoint status for a branch",
18020
+ "properties": {
18021
+ "current_state": {
18022
+ "type": "string",
18023
+ "description": "The current state of the compute endpoint",
18024
+ "enum": [
18025
+ "active",
18026
+ "idle"
18027
+ ]
18028
+ },
18029
+ "autoscaling_limit_min_cu": {
18030
+ "type": "number",
18031
+ "format": "double",
18032
+ "description": "Minimum compute units for autoscaling"
18033
+ },
18034
+ "autoscaling_limit_max_cu": {
18035
+ "type": "number",
18036
+ "format": "double",
18037
+ "description": "Maximum compute units for autoscaling"
18038
+ },
18039
+ "suspend_timeout_seconds": {
18040
+ "type": "integer",
18041
+ "format": "int64",
18042
+ "description": "Seconds of inactivity before the compute endpoint is suspended"
18043
+ },
18044
+ "last_active": {
18045
+ "type": "string",
18046
+ "format": "dateTime",
18047
+ "description": "When the compute endpoint was last active"
18048
+ }
18049
+ }
18050
+ },
18051
+ "metadata": {
18052
+ "type": "object",
18053
+ "description": "Metadata associated with the branch",
18054
+ "additionalProperties": true
18055
+ }
18056
+ }
18057
+ },
18058
+ "description": "List of database branches"
17527
18059
  }
17528
18060
  }
17529
18061
  }
@@ -17550,7 +18082,7 @@
17550
18082
  }
17551
18083
  }
17552
18084
  },
17553
- "/sites/{site_id}/database/branch/{deploy_id}": {
18085
+ "/sites/{site_id}/database/branch/{branch_id}": {
17554
18086
  "parameters": [
17555
18087
  {
17556
18088
  "name": "site_id",
@@ -17559,20 +18091,31 @@
17559
18091
  "required": true
17560
18092
  },
17561
18093
  {
17562
- "name": "deploy_id",
18094
+ "name": "branch_id",
17563
18095
  "type": "string",
17564
18096
  "in": "path",
17565
18097
  "required": true,
17566
- "description": "The deploy ID associated with the database branch"
18098
+ "description": "The branch ID"
17567
18099
  }
17568
18100
  ],
17569
18101
  "get": {
17570
- "x-internal": true,
17571
18102
  "operationId": "getSiteDatabaseBranch",
17572
18103
  "tags": [
17573
18104
  "database"
17574
18105
  ],
17575
- "description": "Returns the database branch connection string for a specific deploy.",
18106
+ "description": "Returns the database branch connection string for a specific branch.",
18107
+ "parameters": [
18108
+ {
18109
+ "name": "role",
18110
+ "type": "string",
18111
+ "in": "query",
18112
+ "description": "The database role to use for the connection string. Defaults to netlifydb_owner if not specified.",
18113
+ "enum": [
18114
+ "netlifydb_owner",
18115
+ "netlifydb_readonly"
18116
+ ]
18117
+ }
18118
+ ],
17576
18119
  "responses": {
17577
18120
  "200": {
17578
18121
  "description": "OK",
@@ -17583,12 +18126,17 @@
17583
18126
  "connection_string": {
17584
18127
  "type": "string",
17585
18128
  "description": "The connection string for the database branch"
18129
+ },
18130
+ "metadata": {
18131
+ "type": "object",
18132
+ "description": "Metadata associated with the branch",
18133
+ "additionalProperties": true
17586
18134
  }
17587
18135
  }
17588
18136
  }
17589
18137
  },
17590
18138
  "404": {
17591
- "description": "Branch not found for this deploy"
18139
+ "description": "Branch not found"
17592
18140
  },
17593
18141
  "default": {
17594
18142
  "description": "error",
@@ -17612,12 +18160,11 @@
17612
18160
  }
17613
18161
  },
17614
18162
  "delete": {
17615
- "x-internal": true,
17616
18163
  "operationId": "deleteSiteDatabaseBranch",
17617
18164
  "tags": [
17618
18165
  "database"
17619
18166
  ],
17620
- "description": "Deletes a database branch associated with a deploy.",
18167
+ "description": "Deletes a database branch.",
17621
18168
  "responses": {
17622
18169
  "204": {
17623
18170
  "description": "Deleted"
@@ -17644,68 +18191,92 @@
17644
18191
  }
17645
18192
  }
17646
18193
  },
17647
- "/sites/{site_id}/database/snapshot": {
18194
+ "/sites/{site_id}/database/branch/{branch_id}/reset": {
17648
18195
  "parameters": [
17649
18196
  {
17650
18197
  "name": "site_id",
17651
18198
  "type": "string",
17652
18199
  "in": "path",
17653
18200
  "required": true
18201
+ },
18202
+ {
18203
+ "name": "branch_id",
18204
+ "type": "string",
18205
+ "in": "path",
18206
+ "required": true,
18207
+ "description": "The branch ID to reset"
17654
18208
  }
17655
18209
  ],
17656
18210
  "post": {
17657
- "x-internal": true,
17658
- "operationId": "createSiteDatabaseSnapshot",
18211
+ "operationId": "resetSiteDatabaseBranch",
17659
18212
  "tags": [
17660
18213
  "database"
17661
18214
  ],
17662
- "description": "Creates a point-in-time snapshot of a database branch. Defaults to the production branch if no branch name is specified.",
18215
+ "description": "Resets a non-production database branch by re-forking it from a source branch (defaults to the production branch). If the target branch is already in sync with the source, returns the existing connection string without performing a reset, unless `force=true` is passed. The production branch cannot be reset.",
17663
18216
  "consumes": [
17664
18217
  "application/json"
17665
18218
  ],
17666
18219
  "parameters": [
17667
18220
  {
17668
- "name": "snapshot",
18221
+ "name": "force",
18222
+ "type": "boolean",
18223
+ "in": "query",
18224
+ "description": "If true, resets the branch even when it is already in sync with the source."
18225
+ },
18226
+ {
18227
+ "name": "role",
18228
+ "type": "string",
18229
+ "in": "query",
18230
+ "description": "The database role to use for the returned connection string. Defaults to netlifydb_owner if not specified.",
18231
+ "enum": [
18232
+ "netlifydb_owner",
18233
+ "netlifydb_readonly"
18234
+ ]
18235
+ },
18236
+ {
18237
+ "name": "reset",
17669
18238
  "in": "body",
17670
18239
  "schema": {
17671
18240
  "type": "object",
17672
- "description": "Request body for creating a database snapshot",
18241
+ "description": "Request body for resetting a database branch",
17673
18242
  "properties": {
17674
- "branch_name": {
17675
- "type": "string",
17676
- "description": "The name of the branch to snapshot. Defaults to \"production\" if not specified."
17677
- },
17678
- "name": {
18243
+ "source_branch_id": {
17679
18244
  "type": "string",
17680
- "description": "An optional name for the snapshot"
18245
+ "description": "The ID of the branch to re-fork the target branch from. Defaults to \"production\" if not specified."
17681
18246
  }
17682
18247
  }
17683
18248
  }
17684
18249
  }
17685
18250
  ],
17686
18251
  "responses": {
17687
- "201": {
17688
- "description": "Created",
18252
+ "200": {
18253
+ "description": "OK",
17689
18254
  "schema": {
17690
18255
  "type": "object",
17691
- "description": "A point-in-time snapshot of a database branch",
18256
+ "description": "Response for a database branch reset",
17692
18257
  "properties": {
17693
- "id": {
17694
- "type": "string",
17695
- "description": "The unique identifier of the snapshot"
18258
+ "reset": {
18259
+ "type": "boolean",
18260
+ "description": "Whether the branch was actually re-forked. False when the target was already in sync with the source and `force=true` was not set."
17696
18261
  },
17697
- "timestamp": {
18262
+ "connection_string": {
17698
18263
  "type": "string",
17699
- "format": "dateTime",
17700
- "description": "The timestamp when the snapshot was created"
18264
+ "description": "The connection string for the reset (or unchanged) branch"
17701
18265
  },
17702
- "source_branch_id": {
17703
- "type": "string",
17704
- "description": "The ID of the branch that was snapshotted"
18266
+ "metadata": {
18267
+ "type": "object",
18268
+ "description": "Metadata associated with the branch",
18269
+ "additionalProperties": true
17705
18270
  }
17706
18271
  }
17707
18272
  }
17708
18273
  },
18274
+ "400": {
18275
+ "description": "Invalid request — for example, the target is the production branch or the source branch is the same as the target."
18276
+ },
18277
+ "404": {
18278
+ "description": "Database or branch not found"
18279
+ },
17709
18280
  "default": {
17710
18281
  "description": "error",
17711
18282
  "schema": {
@@ -17728,31 +18299,707 @@
17728
18299
  }
17729
18300
  }
17730
18301
  },
17731
- "/sites/{site_id}/database/snapshots": {
18302
+ "/sites/{site_id}/database/branch/{branch_id}/compute/settings": {
17732
18303
  "parameters": [
17733
18304
  {
17734
18305
  "name": "site_id",
17735
18306
  "type": "string",
17736
18307
  "in": "path",
17737
18308
  "required": true
18309
+ },
18310
+ {
18311
+ "name": "branch_id",
18312
+ "type": "string",
18313
+ "in": "path",
18314
+ "required": true,
18315
+ "description": "The branch ID"
17738
18316
  }
17739
18317
  ],
17740
- "get": {
17741
- "x-internal": true,
17742
- "operationId": "listSiteDatabaseSnapshots",
18318
+ "put": {
18319
+ "operationId": "setSiteDatabaseBranchComputeSettings",
17743
18320
  "tags": [
17744
18321
  "database"
17745
18322
  ],
17746
- "description": "Returns all snapshots for the site's database.",
18323
+ "description": "Sets compute settings for a specific database branch, overriding project-level settings. Requires a Pro or higher plan.",
18324
+ "consumes": [
18325
+ "application/json"
18326
+ ],
18327
+ "parameters": [
18328
+ {
18329
+ "name": "computeSettings",
18330
+ "in": "body",
18331
+ "schema": {
18332
+ "type": "object",
18333
+ "description": "Request body for setting compute settings. All fields are optional; only provided fields are updated.",
18334
+ "properties": {
18335
+ "min_cu": {
18336
+ "type": "number",
18337
+ "format": "double",
18338
+ "minimum": 0.25,
18339
+ "maximum": 16,
18340
+ "x-nullable": true,
18341
+ "description": "Minimum compute units (0.25 to 16.0). Must be less than or equal to max_cu."
18342
+ },
18343
+ "max_cu": {
18344
+ "type": "number",
18345
+ "format": "double",
18346
+ "minimum": 0.25,
18347
+ "maximum": 16,
18348
+ "x-nullable": true,
18349
+ "description": "Maximum compute units (0.25 to 16.0). Must be greater than or equal to min_cu. max_cu - min_cu must not exceed 8.0."
18350
+ },
18351
+ "sleep_timeout_seconds": {
18352
+ "type": "integer",
18353
+ "format": "int64",
18354
+ "minimum": -1,
18355
+ "x-nullable": true,
18356
+ "description": "Seconds of inactivity before the compute endpoint is suspended. Use -1 for always on, or a non-negative value."
18357
+ }
18358
+ }
18359
+ },
18360
+ "required": true
18361
+ }
18362
+ ],
17747
18363
  "responses": {
17748
18364
  "200": {
17749
18365
  "description": "OK",
17750
18366
  "schema": {
17751
18367
  "type": "object",
17752
- "description": "Response containing a list of database snapshots",
18368
+ "description": "Compute settings for a database or branch",
17753
18369
  "properties": {
17754
- "snapshots": {
17755
- "type": "array",
18370
+ "min_cu": {
18371
+ "type": "number",
18372
+ "format": "double",
18373
+ "description": "Minimum compute units"
18374
+ },
18375
+ "max_cu": {
18376
+ "type": "number",
18377
+ "format": "double",
18378
+ "description": "Maximum compute units"
18379
+ },
18380
+ "sleep_timeout_seconds": {
18381
+ "type": "integer",
18382
+ "format": "int64",
18383
+ "description": "Seconds of inactivity before suspension"
18384
+ }
18385
+ }
18386
+ }
18387
+ },
18388
+ "403": {
18389
+ "description": "Compute customization requires a Pro or higher plan"
18390
+ },
18391
+ "default": {
18392
+ "description": "error",
18393
+ "schema": {
18394
+ "type": "object",
18395
+ "required": [
18396
+ "message"
18397
+ ],
18398
+ "properties": {
18399
+ "code": {
18400
+ "type": "integer",
18401
+ "format": "int64"
18402
+ },
18403
+ "message": {
18404
+ "type": "string",
18405
+ "x-nullable": false
18406
+ }
18407
+ }
18408
+ }
18409
+ }
18410
+ }
18411
+ }
18412
+ },
18413
+ "/sites/{site_id}/database/compute/settings": {
18414
+ "parameters": [
18415
+ {
18416
+ "name": "site_id",
18417
+ "type": "string",
18418
+ "in": "path",
18419
+ "required": true
18420
+ }
18421
+ ],
18422
+ "put": {
18423
+ "operationId": "setSiteDatabaseComputeSettings",
18424
+ "tags": [
18425
+ "database"
18426
+ ],
18427
+ "description": "Sets project-level compute settings for the database. Applied to new branches. Can be overridden per-branch. Requires a Pro or higher plan.",
18428
+ "consumes": [
18429
+ "application/json"
18430
+ ],
18431
+ "parameters": [
18432
+ {
18433
+ "name": "computeSettings",
18434
+ "in": "body",
18435
+ "schema": {
18436
+ "type": "object",
18437
+ "description": "Request body for setting compute settings. All fields are optional; only provided fields are updated.",
18438
+ "properties": {
18439
+ "min_cu": {
18440
+ "type": "number",
18441
+ "format": "double",
18442
+ "minimum": 0.25,
18443
+ "maximum": 16,
18444
+ "x-nullable": true,
18445
+ "description": "Minimum compute units (0.25 to 16.0). Must be less than or equal to max_cu."
18446
+ },
18447
+ "max_cu": {
18448
+ "type": "number",
18449
+ "format": "double",
18450
+ "minimum": 0.25,
18451
+ "maximum": 16,
18452
+ "x-nullable": true,
18453
+ "description": "Maximum compute units (0.25 to 16.0). Must be greater than or equal to min_cu. max_cu - min_cu must not exceed 8.0."
18454
+ },
18455
+ "sleep_timeout_seconds": {
18456
+ "type": "integer",
18457
+ "format": "int64",
18458
+ "minimum": -1,
18459
+ "x-nullable": true,
18460
+ "description": "Seconds of inactivity before the compute endpoint is suspended. Use -1 for always on, or a non-negative value."
18461
+ }
18462
+ }
18463
+ },
18464
+ "required": true
18465
+ }
18466
+ ],
18467
+ "responses": {
18468
+ "200": {
18469
+ "description": "OK",
18470
+ "schema": {
18471
+ "type": "object",
18472
+ "description": "Compute settings for a database or branch",
18473
+ "properties": {
18474
+ "min_cu": {
18475
+ "type": "number",
18476
+ "format": "double",
18477
+ "description": "Minimum compute units"
18478
+ },
18479
+ "max_cu": {
18480
+ "type": "number",
18481
+ "format": "double",
18482
+ "description": "Maximum compute units"
18483
+ },
18484
+ "sleep_timeout_seconds": {
18485
+ "type": "integer",
18486
+ "format": "int64",
18487
+ "description": "Seconds of inactivity before suspension"
18488
+ }
18489
+ }
18490
+ }
18491
+ },
18492
+ "403": {
18493
+ "description": "Compute customization requires a Pro or higher plan"
18494
+ },
18495
+ "default": {
18496
+ "description": "error",
18497
+ "schema": {
18498
+ "type": "object",
18499
+ "required": [
18500
+ "message"
18501
+ ],
18502
+ "properties": {
18503
+ "code": {
18504
+ "type": "integer",
18505
+ "format": "int64"
18506
+ },
18507
+ "message": {
18508
+ "type": "string",
18509
+ "x-nullable": false
18510
+ }
18511
+ }
18512
+ }
18513
+ }
18514
+ }
18515
+ },
18516
+ "get": {
18517
+ "operationId": "getSiteDatabaseComputeSettings",
18518
+ "tags": [
18519
+ "database"
18520
+ ],
18521
+ "description": "Returns the project-level compute settings for the database. Returns effective settings (custom or tier defaults). Requires a Pro or higher plan.",
18522
+ "responses": {
18523
+ "200": {
18524
+ "description": "OK",
18525
+ "schema": {
18526
+ "type": "object",
18527
+ "description": "Compute settings for a database or branch",
18528
+ "properties": {
18529
+ "min_cu": {
18530
+ "type": "number",
18531
+ "format": "double",
18532
+ "description": "Minimum compute units"
18533
+ },
18534
+ "max_cu": {
18535
+ "type": "number",
18536
+ "format": "double",
18537
+ "description": "Maximum compute units"
18538
+ },
18539
+ "sleep_timeout_seconds": {
18540
+ "type": "integer",
18541
+ "format": "int64",
18542
+ "description": "Seconds of inactivity before suspension"
18543
+ }
18544
+ }
18545
+ }
18546
+ },
18547
+ "403": {
18548
+ "description": "Compute customization requires a Pro or higher plan"
18549
+ },
18550
+ "default": {
18551
+ "description": "error",
18552
+ "schema": {
18553
+ "type": "object",
18554
+ "required": [
18555
+ "message"
18556
+ ],
18557
+ "properties": {
18558
+ "code": {
18559
+ "type": "integer",
18560
+ "format": "int64"
18561
+ },
18562
+ "message": {
18563
+ "type": "string",
18564
+ "x-nullable": false
18565
+ }
18566
+ }
18567
+ }
18568
+ }
18569
+ }
18570
+ },
18571
+ "delete": {
18572
+ "operationId": "clearSiteDatabaseComputeSettings",
18573
+ "tags": [
18574
+ "database"
18575
+ ],
18576
+ "description": "Resets project-level compute settings to tier defaults. Requires a Pro or higher plan.",
18577
+ "responses": {
18578
+ "204": {
18579
+ "description": "Cleared"
18580
+ },
18581
+ "403": {
18582
+ "description": "Compute customization requires a Pro or higher plan"
18583
+ },
18584
+ "default": {
18585
+ "description": "error",
18586
+ "schema": {
18587
+ "type": "object",
18588
+ "required": [
18589
+ "message"
18590
+ ],
18591
+ "properties": {
18592
+ "code": {
18593
+ "type": "integer",
18594
+ "format": "int64"
18595
+ },
18596
+ "message": {
18597
+ "type": "string",
18598
+ "x-nullable": false
18599
+ }
18600
+ }
18601
+ }
18602
+ }
18603
+ }
18604
+ }
18605
+ },
18606
+ "/sites/{site_id}/database/migrations": {
18607
+ "parameters": [
18608
+ {
18609
+ "name": "site_id",
18610
+ "type": "string",
18611
+ "in": "path",
18612
+ "required": true
18613
+ }
18614
+ ],
18615
+ "get": {
18616
+ "operationId": "listSiteDatabaseMigrations",
18617
+ "tags": [
18618
+ "database"
18619
+ ],
18620
+ "description": "Returns the list of migrations available for the specified branch, indicating which ones have been applied to the database.",
18621
+ "parameters": [
18622
+ {
18623
+ "name": "branch",
18624
+ "type": "string",
18625
+ "in": "query",
18626
+ "description": "The branch ID to list migrations for. Defaults to \"production\" if not specified."
18627
+ }
18628
+ ],
18629
+ "responses": {
18630
+ "200": {
18631
+ "description": "OK",
18632
+ "schema": {
18633
+ "type": "object",
18634
+ "description": "Response containing the list of migrations for a branch",
18635
+ "properties": {
18636
+ "migrations": {
18637
+ "type": "array",
18638
+ "items": {
18639
+ "type": "object",
18640
+ "description": "A migration available to a database branch",
18641
+ "properties": {
18642
+ "version": {
18643
+ "type": "integer",
18644
+ "format": "int64",
18645
+ "description": "The migration version number"
18646
+ },
18647
+ "name": {
18648
+ "type": "string",
18649
+ "description": "The migration name"
18650
+ },
18651
+ "path": {
18652
+ "type": "string",
18653
+ "description": "The path to the migration file in the deploy bundle"
18654
+ },
18655
+ "applied": {
18656
+ "type": "boolean",
18657
+ "description": "Whether this migration has been applied to the branch"
18658
+ }
18659
+ }
18660
+ },
18661
+ "description": "List of migrations"
18662
+ }
18663
+ }
18664
+ }
18665
+ },
18666
+ "404": {
18667
+ "description": "Database or branch not found"
18668
+ },
18669
+ "423": {
18670
+ "description": "Database is disabled"
18671
+ },
18672
+ "default": {
18673
+ "description": "error",
18674
+ "schema": {
18675
+ "type": "object",
18676
+ "required": [
18677
+ "message"
18678
+ ],
18679
+ "properties": {
18680
+ "code": {
18681
+ "type": "integer",
18682
+ "format": "int64"
18683
+ },
18684
+ "message": {
18685
+ "type": "string",
18686
+ "x-nullable": false
18687
+ }
18688
+ }
18689
+ }
18690
+ }
18691
+ }
18692
+ }
18693
+ },
18694
+ "/sites/{site_id}/database/migrations/{name}": {
18695
+ "parameters": [
18696
+ {
18697
+ "name": "site_id",
18698
+ "type": "string",
18699
+ "in": "path",
18700
+ "required": true
18701
+ },
18702
+ {
18703
+ "name": "name",
18704
+ "type": "string",
18705
+ "in": "path",
18706
+ "required": true,
18707
+ "description": "The migration name"
18708
+ }
18709
+ ],
18710
+ "get": {
18711
+ "operationId": "getSiteDatabaseMigration",
18712
+ "tags": [
18713
+ "database"
18714
+ ],
18715
+ "description": "Returns the contents of a named migration for the specified branch.",
18716
+ "parameters": [
18717
+ {
18718
+ "name": "branch",
18719
+ "type": "string",
18720
+ "in": "query",
18721
+ "description": "The branch ID to look up the migration on. Defaults to the currently published deploy's branch."
18722
+ }
18723
+ ],
18724
+ "responses": {
18725
+ "200": {
18726
+ "description": "OK",
18727
+ "schema": {
18728
+ "type": "object",
18729
+ "description": "A migration with its file contents",
18730
+ "properties": {
18731
+ "version": {
18732
+ "type": "integer",
18733
+ "format": "int64",
18734
+ "description": "The migration version number"
18735
+ },
18736
+ "name": {
18737
+ "type": "string",
18738
+ "description": "The migration name"
18739
+ },
18740
+ "path": {
18741
+ "type": "string",
18742
+ "description": "The path to the migration file in the deploy bundle"
18743
+ },
18744
+ "content": {
18745
+ "type": "string",
18746
+ "description": "The raw contents of the migration file"
18747
+ }
18748
+ }
18749
+ }
18750
+ },
18751
+ "404": {
18752
+ "description": "Migration, database, or branch not found"
18753
+ },
18754
+ "423": {
18755
+ "description": "Database is disabled"
18756
+ },
18757
+ "default": {
18758
+ "description": "error",
18759
+ "schema": {
18760
+ "type": "object",
18761
+ "required": [
18762
+ "message"
18763
+ ],
18764
+ "properties": {
18765
+ "code": {
18766
+ "type": "integer",
18767
+ "format": "int64"
18768
+ },
18769
+ "message": {
18770
+ "type": "string",
18771
+ "x-nullable": false
18772
+ }
18773
+ }
18774
+ }
18775
+ }
18776
+ }
18777
+ }
18778
+ },
18779
+ "/sites/{site_id}/database/migrations/{deploy_id}": {
18780
+ "parameters": [
18781
+ {
18782
+ "name": "site_id",
18783
+ "type": "string",
18784
+ "in": "path",
18785
+ "required": true
18786
+ },
18787
+ {
18788
+ "name": "deploy_id",
18789
+ "type": "string",
18790
+ "in": "path",
18791
+ "required": true,
18792
+ "description": "The deploy ID to run migrations for"
18793
+ }
18794
+ ],
18795
+ "post": {
18796
+ "operationId": "runSiteDatabaseMigrations",
18797
+ "tags": [
18798
+ "database"
18799
+ ],
18800
+ "description": "Runs database migrations for the specified deploy. Finds the deploy and determines the appropriate branch.",
18801
+ "consumes": [
18802
+ "application/json"
18803
+ ],
18804
+ "parameters": [
18805
+ {
18806
+ "name": "migrations",
18807
+ "in": "body",
18808
+ "schema": {
18809
+ "type": "object",
18810
+ "description": "Request body for running database migrations",
18811
+ "properties": {
18812
+ "dry_run": {
18813
+ "type": "boolean",
18814
+ "description": "If true, validates migrations without applying them."
18815
+ }
18816
+ }
18817
+ }
18818
+ }
18819
+ ],
18820
+ "responses": {
18821
+ "200": {
18822
+ "description": "OK"
18823
+ },
18824
+ "409": {
18825
+ "description": "Migration conflict - migration modified or removed after being applied"
18826
+ },
18827
+ "422": {
18828
+ "description": "Migration validation failed"
18829
+ },
18830
+ "default": {
18831
+ "description": "error",
18832
+ "schema": {
18833
+ "type": "object",
18834
+ "required": [
18835
+ "message"
18836
+ ],
18837
+ "properties": {
18838
+ "code": {
18839
+ "type": "integer",
18840
+ "format": "int64"
18841
+ },
18842
+ "message": {
18843
+ "type": "string",
18844
+ "x-nullable": false
18845
+ }
18846
+ }
18847
+ }
18848
+ }
18849
+ }
18850
+ }
18851
+ },
18852
+ "/sites/{site_id}/database/snapshot": {
18853
+ "parameters": [
18854
+ {
18855
+ "name": "site_id",
18856
+ "type": "string",
18857
+ "in": "path",
18858
+ "required": true
18859
+ }
18860
+ ],
18861
+ "post": {
18862
+ "operationId": "createSiteDatabaseSnapshot",
18863
+ "tags": [
18864
+ "database"
18865
+ ],
18866
+ "description": "Creates a point-in-time snapshot of a database branch. Defaults to the production branch if no branch name is specified.",
18867
+ "consumes": [
18868
+ "application/json"
18869
+ ],
18870
+ "parameters": [
18871
+ {
18872
+ "name": "snapshot",
18873
+ "in": "body",
18874
+ "schema": {
18875
+ "type": "object",
18876
+ "description": "Request body for creating a database snapshot",
18877
+ "properties": {
18878
+ "branch_id": {
18879
+ "type": "string",
18880
+ "description": "The ID of the branch to snapshot. Defaults to \"production\" if not specified."
18881
+ },
18882
+ "name": {
18883
+ "type": "string",
18884
+ "description": "A name for the snapshot"
18885
+ },
18886
+ "metadata": {
18887
+ "type": "object",
18888
+ "description": "Metadata associated with a snapshot",
18889
+ "properties": {
18890
+ "deploy": {
18891
+ "type": "object",
18892
+ "description": "Deploy information associated with the snapshot",
18893
+ "additionalProperties": true
18894
+ },
18895
+ "source": {
18896
+ "type": "string",
18897
+ "description": "The source that created the snapshot"
18898
+ }
18899
+ }
18900
+ }
18901
+ }
18902
+ }
18903
+ }
18904
+ ],
18905
+ "responses": {
18906
+ "201": {
18907
+ "description": "Created",
18908
+ "schema": {
18909
+ "type": "object",
18910
+ "description": "A point-in-time snapshot of a database branch",
18911
+ "properties": {
18912
+ "id": {
18913
+ "type": "string",
18914
+ "description": "The unique identifier of the snapshot"
18915
+ },
18916
+ "source_branch_id": {
18917
+ "type": "string",
18918
+ "description": "The ID of the branch that was snapshotted"
18919
+ },
18920
+ "manual": {
18921
+ "type": "boolean",
18922
+ "description": "Whether this snapshot was manually created"
18923
+ },
18924
+ "created_at": {
18925
+ "type": "string",
18926
+ "format": "dateTime",
18927
+ "description": "When the snapshot was created"
18928
+ },
18929
+ "expires_at": {
18930
+ "type": "string",
18931
+ "format": "dateTime",
18932
+ "description": "When the snapshot expires"
18933
+ },
18934
+ "timestamp": {
18935
+ "type": "string",
18936
+ "format": "dateTime",
18937
+ "description": "The point-in-time timestamp of the snapshot"
18938
+ },
18939
+ "metadata": {
18940
+ "type": "object",
18941
+ "description": "Metadata associated with a snapshot",
18942
+ "properties": {
18943
+ "deploy": {
18944
+ "type": "object",
18945
+ "description": "Deploy information associated with the snapshot",
18946
+ "additionalProperties": true
18947
+ },
18948
+ "source": {
18949
+ "type": "string",
18950
+ "description": "The source that created the snapshot"
18951
+ }
18952
+ }
18953
+ }
18954
+ }
18955
+ }
18956
+ },
18957
+ "default": {
18958
+ "description": "error",
18959
+ "schema": {
18960
+ "type": "object",
18961
+ "required": [
18962
+ "message"
18963
+ ],
18964
+ "properties": {
18965
+ "code": {
18966
+ "type": "integer",
18967
+ "format": "int64"
18968
+ },
18969
+ "message": {
18970
+ "type": "string",
18971
+ "x-nullable": false
18972
+ }
18973
+ }
18974
+ }
18975
+ }
18976
+ }
18977
+ }
18978
+ },
18979
+ "/sites/{site_id}/database/snapshots": {
18980
+ "parameters": [
18981
+ {
18982
+ "name": "site_id",
18983
+ "type": "string",
18984
+ "in": "path",
18985
+ "required": true
18986
+ }
18987
+ ],
18988
+ "get": {
18989
+ "operationId": "listSiteDatabaseSnapshots",
18990
+ "tags": [
18991
+ "database"
18992
+ ],
18993
+ "description": "Returns all snapshots for the site's database.",
18994
+ "responses": {
18995
+ "200": {
18996
+ "description": "OK",
18997
+ "schema": {
18998
+ "type": "object",
18999
+ "description": "Response containing a list of database snapshots",
19000
+ "properties": {
19001
+ "snapshots": {
19002
+ "type": "array",
17756
19003
  "items": {
17757
19004
  "type": "object",
17758
19005
  "description": "A point-in-time snapshot of a database branch",
@@ -17761,14 +19008,43 @@
17761
19008
  "type": "string",
17762
19009
  "description": "The unique identifier of the snapshot"
17763
19010
  },
17764
- "timestamp": {
19011
+ "source_branch_id": {
19012
+ "type": "string",
19013
+ "description": "The ID of the branch that was snapshotted"
19014
+ },
19015
+ "manual": {
19016
+ "type": "boolean",
19017
+ "description": "Whether this snapshot was manually created"
19018
+ },
19019
+ "created_at": {
17765
19020
  "type": "string",
17766
19021
  "format": "dateTime",
17767
- "description": "The timestamp when the snapshot was created"
19022
+ "description": "When the snapshot was created"
17768
19023
  },
17769
- "source_branch_id": {
19024
+ "expires_at": {
17770
19025
  "type": "string",
17771
- "description": "The ID of the branch that was snapshotted"
19026
+ "format": "dateTime",
19027
+ "description": "When the snapshot expires"
19028
+ },
19029
+ "timestamp": {
19030
+ "type": "string",
19031
+ "format": "dateTime",
19032
+ "description": "The point-in-time timestamp of the snapshot"
19033
+ },
19034
+ "metadata": {
19035
+ "type": "object",
19036
+ "description": "Metadata associated with a snapshot",
19037
+ "properties": {
19038
+ "deploy": {
19039
+ "type": "object",
19040
+ "description": "Deploy information associated with the snapshot",
19041
+ "additionalProperties": true
19042
+ },
19043
+ "source": {
19044
+ "type": "string",
19045
+ "description": "The source that created the snapshot"
19046
+ }
19047
+ }
17772
19048
  }
17773
19049
  }
17774
19050
  },
@@ -17816,7 +19092,6 @@
17816
19092
  }
17817
19093
  ],
17818
19094
  "delete": {
17819
- "x-internal": true,
17820
19095
  "operationId": "deleteSiteDatabaseSnapshot",
17821
19096
  "tags": [
17822
19097
  "database"
@@ -17865,7 +19140,6 @@
17865
19140
  }
17866
19141
  ],
17867
19142
  "post": {
17868
- "x-internal": true,
17869
19143
  "operationId": "restoreSiteDatabaseSnapshot",
17870
19144
  "tags": [
17871
19145
  "database"
@@ -17882,9 +19156,9 @@
17882
19156
  "type": "object",
17883
19157
  "description": "Request body for restoring a database snapshot",
17884
19158
  "properties": {
17885
- "branch_name": {
19159
+ "branch_id": {
17886
19160
  "type": "string",
17887
- "description": "The name of the branch to restore the snapshot to. Defaults to \"production\" if not specified."
19161
+ "description": "The ID of the branch to restore the snapshot to. Defaults to \"production\" if not specified."
17888
19162
  }
17889
19163
  }
17890
19164
  }
@@ -17934,34 +19208,264 @@
17934
19208
  "properties": {
17935
19209
  "connection_string": {
17936
19210
  "type": "string",
17937
- "description": "The connection string for the database"
17938
- }
17939
- }
17940
- },
17941
- "createDatabaseBranchRequest": {
17942
- "type": "object",
17943
- "description": "Request body for creating a database branch",
17944
- "required": [
17945
- "deploy_id"
17946
- ],
17947
- "properties": {
17948
- "parent_branch_id": {
19211
+ "description": "The connection string for the database"
19212
+ }
19213
+ }
19214
+ },
19215
+ "createDatabaseBranchRequest": {
19216
+ "type": "object",
19217
+ "description": "Request body for creating a database branch",
19218
+ "required": [
19219
+ "branch_id"
19220
+ ],
19221
+ "properties": {
19222
+ "parent_branch_id": {
19223
+ "type": "string",
19224
+ "description": "The ID of the parent branch to create the new branch from. Defaults to the production branch if not specified."
19225
+ },
19226
+ "branch_id": {
19227
+ "type": "string",
19228
+ "description": "The branch identifier"
19229
+ },
19230
+ "metadata": {
19231
+ "type": "object",
19232
+ "description": "Arbitrary metadata to associate with the branch",
19233
+ "additionalProperties": true
19234
+ }
19235
+ }
19236
+ },
19237
+ "databaseBranchResponse": {
19238
+ "type": "object",
19239
+ "description": "Response containing the database branch connection string",
19240
+ "properties": {
19241
+ "connection_string": {
19242
+ "type": "string",
19243
+ "description": "The connection string for the database branch"
19244
+ },
19245
+ "metadata": {
19246
+ "type": "object",
19247
+ "description": "Metadata associated with the branch",
19248
+ "additionalProperties": true
19249
+ }
19250
+ }
19251
+ },
19252
+ "databaseBranchesResponse": {
19253
+ "type": "object",
19254
+ "description": "Response containing a list of database branches",
19255
+ "properties": {
19256
+ "branches": {
19257
+ "type": "array",
19258
+ "items": {
19259
+ "type": "object",
19260
+ "description": "Detailed information about a database branch",
19261
+ "properties": {
19262
+ "branch_id": {
19263
+ "type": "string",
19264
+ "description": "The branch identifier"
19265
+ },
19266
+ "name": {
19267
+ "type": "string",
19268
+ "description": "The branch name"
19269
+ },
19270
+ "connection_string": {
19271
+ "type": "string",
19272
+ "description": "The connection string for the branch"
19273
+ },
19274
+ "state": {
19275
+ "type": "string",
19276
+ "description": "The current state of the branch",
19277
+ "enum": [
19278
+ "init",
19279
+ "creating",
19280
+ "resetting",
19281
+ "ready",
19282
+ "archived"
19283
+ ]
19284
+ },
19285
+ "logical_size_bytes": {
19286
+ "type": "integer",
19287
+ "format": "int64",
19288
+ "description": "The logical size of the branch in bytes"
19289
+ },
19290
+ "created_at": {
19291
+ "type": "string",
19292
+ "format": "dateTime",
19293
+ "description": "When the branch was created"
19294
+ },
19295
+ "updated_at": {
19296
+ "type": "string",
19297
+ "format": "dateTime",
19298
+ "description": "When the branch was last updated"
19299
+ },
19300
+ "last_active_at": {
19301
+ "type": "string",
19302
+ "format": "dateTime",
19303
+ "description": "When the branch was last active"
19304
+ },
19305
+ "compute": {
19306
+ "type": "object",
19307
+ "description": "Compute endpoint status for a branch",
19308
+ "properties": {
19309
+ "current_state": {
19310
+ "type": "string",
19311
+ "description": "The current state of the compute endpoint",
19312
+ "enum": [
19313
+ "active",
19314
+ "idle"
19315
+ ]
19316
+ },
19317
+ "autoscaling_limit_min_cu": {
19318
+ "type": "number",
19319
+ "format": "double",
19320
+ "description": "Minimum compute units for autoscaling"
19321
+ },
19322
+ "autoscaling_limit_max_cu": {
19323
+ "type": "number",
19324
+ "format": "double",
19325
+ "description": "Maximum compute units for autoscaling"
19326
+ },
19327
+ "suspend_timeout_seconds": {
19328
+ "type": "integer",
19329
+ "format": "int64",
19330
+ "description": "Seconds of inactivity before the compute endpoint is suspended"
19331
+ },
19332
+ "last_active": {
19333
+ "type": "string",
19334
+ "format": "dateTime",
19335
+ "description": "When the compute endpoint was last active"
19336
+ }
19337
+ }
19338
+ },
19339
+ "metadata": {
19340
+ "type": "object",
19341
+ "description": "Metadata associated with the branch",
19342
+ "additionalProperties": true
19343
+ }
19344
+ }
19345
+ },
19346
+ "description": "List of database branches"
19347
+ }
19348
+ }
19349
+ },
19350
+ "databaseBranchDetail": {
19351
+ "type": "object",
19352
+ "description": "Detailed information about a database branch",
19353
+ "properties": {
19354
+ "branch_id": {
19355
+ "type": "string",
19356
+ "description": "The branch identifier"
19357
+ },
19358
+ "name": {
19359
+ "type": "string",
19360
+ "description": "The branch name"
19361
+ },
19362
+ "connection_string": {
19363
+ "type": "string",
19364
+ "description": "The connection string for the branch"
19365
+ },
19366
+ "state": {
19367
+ "type": "string",
19368
+ "description": "The current state of the branch",
19369
+ "enum": [
19370
+ "init",
19371
+ "creating",
19372
+ "resetting",
19373
+ "ready",
19374
+ "archived"
19375
+ ]
19376
+ },
19377
+ "logical_size_bytes": {
19378
+ "type": "integer",
19379
+ "format": "int64",
19380
+ "description": "The logical size of the branch in bytes"
19381
+ },
19382
+ "created_at": {
19383
+ "type": "string",
19384
+ "format": "dateTime",
19385
+ "description": "When the branch was created"
19386
+ },
19387
+ "updated_at": {
17949
19388
  "type": "string",
17950
- "description": "The ID of the parent branch to create the new branch from. Defaults to the production branch if not specified."
19389
+ "format": "dateTime",
19390
+ "description": "When the branch was last updated"
17951
19391
  },
17952
- "deploy_id": {
19392
+ "last_active_at": {
17953
19393
  "type": "string",
17954
- "description": "The deploy ID to associate with this branch"
19394
+ "format": "dateTime",
19395
+ "description": "When the branch was last active"
19396
+ },
19397
+ "compute": {
19398
+ "type": "object",
19399
+ "description": "Compute endpoint status for a branch",
19400
+ "properties": {
19401
+ "current_state": {
19402
+ "type": "string",
19403
+ "description": "The current state of the compute endpoint",
19404
+ "enum": [
19405
+ "active",
19406
+ "idle"
19407
+ ]
19408
+ },
19409
+ "autoscaling_limit_min_cu": {
19410
+ "type": "number",
19411
+ "format": "double",
19412
+ "description": "Minimum compute units for autoscaling"
19413
+ },
19414
+ "autoscaling_limit_max_cu": {
19415
+ "type": "number",
19416
+ "format": "double",
19417
+ "description": "Maximum compute units for autoscaling"
19418
+ },
19419
+ "suspend_timeout_seconds": {
19420
+ "type": "integer",
19421
+ "format": "int64",
19422
+ "description": "Seconds of inactivity before the compute endpoint is suspended"
19423
+ },
19424
+ "last_active": {
19425
+ "type": "string",
19426
+ "format": "dateTime",
19427
+ "description": "When the compute endpoint was last active"
19428
+ }
19429
+ }
19430
+ },
19431
+ "metadata": {
19432
+ "type": "object",
19433
+ "description": "Metadata associated with the branch",
19434
+ "additionalProperties": true
17955
19435
  }
17956
19436
  }
17957
19437
  },
17958
- "databaseBranchResponse": {
19438
+ "databaseBranchCompute": {
17959
19439
  "type": "object",
17960
- "description": "Response containing the database branch connection string",
19440
+ "description": "Compute endpoint status for a branch",
17961
19441
  "properties": {
17962
- "connection_string": {
19442
+ "current_state": {
17963
19443
  "type": "string",
17964
- "description": "The connection string for the database branch"
19444
+ "description": "The current state of the compute endpoint",
19445
+ "enum": [
19446
+ "active",
19447
+ "idle"
19448
+ ]
19449
+ },
19450
+ "autoscaling_limit_min_cu": {
19451
+ "type": "number",
19452
+ "format": "double",
19453
+ "description": "Minimum compute units for autoscaling"
19454
+ },
19455
+ "autoscaling_limit_max_cu": {
19456
+ "type": "number",
19457
+ "format": "double",
19458
+ "description": "Maximum compute units for autoscaling"
19459
+ },
19460
+ "suspend_timeout_seconds": {
19461
+ "type": "integer",
19462
+ "format": "int64",
19463
+ "description": "Seconds of inactivity before the compute endpoint is suspended"
19464
+ },
19465
+ "last_active": {
19466
+ "type": "string",
19467
+ "format": "dateTime",
19468
+ "description": "When the compute endpoint was last active"
17965
19469
  }
17966
19470
  }
17967
19471
  },
@@ -17969,13 +19473,28 @@
17969
19473
  "type": "object",
17970
19474
  "description": "Request body for creating a database snapshot",
17971
19475
  "properties": {
17972
- "branch_name": {
19476
+ "branch_id": {
17973
19477
  "type": "string",
17974
- "description": "The name of the branch to snapshot. Defaults to \"production\" if not specified."
19478
+ "description": "The ID of the branch to snapshot. Defaults to \"production\" if not specified."
17975
19479
  },
17976
19480
  "name": {
17977
19481
  "type": "string",
17978
- "description": "An optional name for the snapshot"
19482
+ "description": "A name for the snapshot"
19483
+ },
19484
+ "metadata": {
19485
+ "type": "object",
19486
+ "description": "Metadata associated with a snapshot",
19487
+ "properties": {
19488
+ "deploy": {
19489
+ "type": "object",
19490
+ "description": "Deploy information associated with the snapshot",
19491
+ "additionalProperties": true
19492
+ },
19493
+ "source": {
19494
+ "type": "string",
19495
+ "description": "The source that created the snapshot"
19496
+ }
19497
+ }
17979
19498
  }
17980
19499
  }
17981
19500
  },
@@ -17987,14 +19506,58 @@
17987
19506
  "type": "string",
17988
19507
  "description": "The unique identifier of the snapshot"
17989
19508
  },
19509
+ "source_branch_id": {
19510
+ "type": "string",
19511
+ "description": "The ID of the branch that was snapshotted"
19512
+ },
19513
+ "manual": {
19514
+ "type": "boolean",
19515
+ "description": "Whether this snapshot was manually created"
19516
+ },
19517
+ "created_at": {
19518
+ "type": "string",
19519
+ "format": "dateTime",
19520
+ "description": "When the snapshot was created"
19521
+ },
19522
+ "expires_at": {
19523
+ "type": "string",
19524
+ "format": "dateTime",
19525
+ "description": "When the snapshot expires"
19526
+ },
17990
19527
  "timestamp": {
17991
19528
  "type": "string",
17992
19529
  "format": "dateTime",
17993
- "description": "The timestamp when the snapshot was created"
19530
+ "description": "The point-in-time timestamp of the snapshot"
17994
19531
  },
17995
- "source_branch_id": {
19532
+ "metadata": {
19533
+ "type": "object",
19534
+ "description": "Metadata associated with a snapshot",
19535
+ "properties": {
19536
+ "deploy": {
19537
+ "type": "object",
19538
+ "description": "Deploy information associated with the snapshot",
19539
+ "additionalProperties": true
19540
+ },
19541
+ "source": {
19542
+ "type": "string",
19543
+ "description": "The source that created the snapshot"
19544
+ }
19545
+ }
19546
+ }
19547
+ }
19548
+ },
19549
+ "databaseSnapshotMetadata": {
19550
+ "type": "object",
19551
+ "description": "Metadata associated with a snapshot",
19552
+ "properties": {
19553
+ "deploy": {
19554
+ "type": "object",
19555
+ "description": "Deploy information associated with the snapshot",
19556
+ "additionalProperties": true
19557
+ },
19558
+ "source": {
17996
19559
  "type": "string",
17997
- "description": "The ID of the branch that was snapshotted"
19560
+ "description": "The source that created the snapshot"
17998
19561
  }
17999
19562
  }
18000
19563
  },
@@ -18012,14 +19575,43 @@
18012
19575
  "type": "string",
18013
19576
  "description": "The unique identifier of the snapshot"
18014
19577
  },
18015
- "timestamp": {
19578
+ "source_branch_id": {
19579
+ "type": "string",
19580
+ "description": "The ID of the branch that was snapshotted"
19581
+ },
19582
+ "manual": {
19583
+ "type": "boolean",
19584
+ "description": "Whether this snapshot was manually created"
19585
+ },
19586
+ "created_at": {
18016
19587
  "type": "string",
18017
19588
  "format": "dateTime",
18018
- "description": "The timestamp when the snapshot was created"
19589
+ "description": "When the snapshot was created"
18019
19590
  },
18020
- "source_branch_id": {
19591
+ "expires_at": {
18021
19592
  "type": "string",
18022
- "description": "The ID of the branch that was snapshotted"
19593
+ "format": "dateTime",
19594
+ "description": "When the snapshot expires"
19595
+ },
19596
+ "timestamp": {
19597
+ "type": "string",
19598
+ "format": "dateTime",
19599
+ "description": "The point-in-time timestamp of the snapshot"
19600
+ },
19601
+ "metadata": {
19602
+ "type": "object",
19603
+ "description": "Metadata associated with a snapshot",
19604
+ "properties": {
19605
+ "deploy": {
19606
+ "type": "object",
19607
+ "description": "Deploy information associated with the snapshot",
19608
+ "additionalProperties": true
19609
+ },
19610
+ "source": {
19611
+ "type": "string",
19612
+ "description": "The source that created the snapshot"
19613
+ }
19614
+ }
18023
19615
  }
18024
19616
  }
18025
19617
  },
@@ -18031,9 +19623,177 @@
18031
19623
  "type": "object",
18032
19624
  "description": "Request body for restoring a database snapshot",
18033
19625
  "properties": {
18034
- "branch_name": {
19626
+ "branch_id": {
19627
+ "type": "string",
19628
+ "description": "The ID of the branch to restore the snapshot to. Defaults to \"production\" if not specified."
19629
+ }
19630
+ }
19631
+ },
19632
+ "databaseComputeSettingsRequest": {
19633
+ "type": "object",
19634
+ "description": "Request body for setting compute settings. All fields are optional; only provided fields are updated.",
19635
+ "properties": {
19636
+ "min_cu": {
19637
+ "type": "number",
19638
+ "format": "double",
19639
+ "minimum": 0.25,
19640
+ "maximum": 16,
19641
+ "x-nullable": true,
19642
+ "description": "Minimum compute units (0.25 to 16.0). Must be less than or equal to max_cu."
19643
+ },
19644
+ "max_cu": {
19645
+ "type": "number",
19646
+ "format": "double",
19647
+ "minimum": 0.25,
19648
+ "maximum": 16,
19649
+ "x-nullable": true,
19650
+ "description": "Maximum compute units (0.25 to 16.0). Must be greater than or equal to min_cu. max_cu - min_cu must not exceed 8.0."
19651
+ },
19652
+ "sleep_timeout_seconds": {
19653
+ "type": "integer",
19654
+ "format": "int64",
19655
+ "minimum": -1,
19656
+ "x-nullable": true,
19657
+ "description": "Seconds of inactivity before the compute endpoint is suspended. Use -1 for always on, or a non-negative value."
19658
+ }
19659
+ }
19660
+ },
19661
+ "databaseComputeSettings": {
19662
+ "type": "object",
19663
+ "description": "Compute settings for a database or branch",
19664
+ "properties": {
19665
+ "min_cu": {
19666
+ "type": "number",
19667
+ "format": "double",
19668
+ "description": "Minimum compute units"
19669
+ },
19670
+ "max_cu": {
19671
+ "type": "number",
19672
+ "format": "double",
19673
+ "description": "Maximum compute units"
19674
+ },
19675
+ "sleep_timeout_seconds": {
19676
+ "type": "integer",
19677
+ "format": "int64",
19678
+ "description": "Seconds of inactivity before suspension"
19679
+ }
19680
+ }
19681
+ },
19682
+ "runDatabaseMigrationsRequest": {
19683
+ "type": "object",
19684
+ "description": "Request body for running database migrations",
19685
+ "properties": {
19686
+ "dry_run": {
19687
+ "type": "boolean",
19688
+ "description": "If true, validates migrations without applying them."
19689
+ }
19690
+ }
19691
+ },
19692
+ "resetDatabaseBranchRequest": {
19693
+ "type": "object",
19694
+ "description": "Request body for resetting a database branch",
19695
+ "properties": {
19696
+ "source_branch_id": {
19697
+ "type": "string",
19698
+ "description": "The ID of the branch to re-fork the target branch from. Defaults to \"production\" if not specified."
19699
+ }
19700
+ }
19701
+ },
19702
+ "resetDatabaseBranchResponse": {
19703
+ "type": "object",
19704
+ "description": "Response for a database branch reset",
19705
+ "properties": {
19706
+ "reset": {
19707
+ "type": "boolean",
19708
+ "description": "Whether the branch was actually re-forked. False when the target was already in sync with the source and `force=true` was not set."
19709
+ },
19710
+ "connection_string": {
19711
+ "type": "string",
19712
+ "description": "The connection string for the reset (or unchanged) branch"
19713
+ },
19714
+ "metadata": {
19715
+ "type": "object",
19716
+ "description": "Metadata associated with the branch",
19717
+ "additionalProperties": true
19718
+ }
19719
+ }
19720
+ },
19721
+ "listDatabaseMigrationsResponse": {
19722
+ "type": "object",
19723
+ "description": "Response containing the list of migrations for a branch",
19724
+ "properties": {
19725
+ "migrations": {
19726
+ "type": "array",
19727
+ "items": {
19728
+ "type": "object",
19729
+ "description": "A migration available to a database branch",
19730
+ "properties": {
19731
+ "version": {
19732
+ "type": "integer",
19733
+ "format": "int64",
19734
+ "description": "The migration version number"
19735
+ },
19736
+ "name": {
19737
+ "type": "string",
19738
+ "description": "The migration name"
19739
+ },
19740
+ "path": {
19741
+ "type": "string",
19742
+ "description": "The path to the migration file in the deploy bundle"
19743
+ },
19744
+ "applied": {
19745
+ "type": "boolean",
19746
+ "description": "Whether this migration has been applied to the branch"
19747
+ }
19748
+ }
19749
+ },
19750
+ "description": "List of migrations"
19751
+ }
19752
+ }
19753
+ },
19754
+ "databaseMigration": {
19755
+ "type": "object",
19756
+ "description": "A migration available to a database branch",
19757
+ "properties": {
19758
+ "version": {
19759
+ "type": "integer",
19760
+ "format": "int64",
19761
+ "description": "The migration version number"
19762
+ },
19763
+ "name": {
19764
+ "type": "string",
19765
+ "description": "The migration name"
19766
+ },
19767
+ "path": {
19768
+ "type": "string",
19769
+ "description": "The path to the migration file in the deploy bundle"
19770
+ },
19771
+ "applied": {
19772
+ "type": "boolean",
19773
+ "description": "Whether this migration has been applied to the branch"
19774
+ }
19775
+ }
19776
+ },
19777
+ "databaseMigrationDetail": {
19778
+ "type": "object",
19779
+ "description": "A migration with its file contents",
19780
+ "properties": {
19781
+ "version": {
19782
+ "type": "integer",
19783
+ "format": "int64",
19784
+ "description": "The migration version number"
19785
+ },
19786
+ "name": {
19787
+ "type": "string",
19788
+ "description": "The migration name"
19789
+ },
19790
+ "path": {
19791
+ "type": "string",
19792
+ "description": "The path to the migration file in the deploy bundle"
19793
+ },
19794
+ "content": {
18035
19795
  "type": "string",
18036
- "description": "The name of the branch to restore the snapshot to. Defaults to \"production\" if not specified."
19796
+ "description": "The raw contents of the migration file"
18037
19797
  }
18038
19798
  }
18039
19799
  },
@@ -18459,6 +20219,25 @@
18459
20219
  }
18460
20220
  }
18461
20221
  }
20222
+ },
20223
+ "functions_region": {
20224
+ "type": "string",
20225
+ "description": "The functions region for this deploy as an airport code.\n"
20226
+ },
20227
+ "functions_region_overrides": {
20228
+ "type": "array",
20229
+ "items": {
20230
+ "type": "object",
20231
+ "properties": {
20232
+ "name": {
20233
+ "type": "string"
20234
+ },
20235
+ "region": {
20236
+ "type": "string"
20237
+ }
20238
+ }
20239
+ },
20240
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
18462
20241
  }
18463
20242
  }
18464
20243
  },
@@ -18772,6 +20551,25 @@
18772
20551
  }
18773
20552
  }
18774
20553
  }
20554
+ },
20555
+ "functions_region": {
20556
+ "type": "string",
20557
+ "description": "The functions region for this deploy as an airport code.\n"
20558
+ },
20559
+ "functions_region_overrides": {
20560
+ "type": "array",
20561
+ "items": {
20562
+ "type": "object",
20563
+ "properties": {
20564
+ "name": {
20565
+ "type": "string"
20566
+ },
20567
+ "region": {
20568
+ "type": "string"
20569
+ }
20570
+ }
20571
+ },
20572
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
18775
20573
  }
18776
20574
  }
18777
20575
  },
@@ -19333,6 +21131,9 @@
19333
21131
  },
19334
21132
  "sha": {
19335
21133
  "type": "string"
21134
+ },
21135
+ "region": {
21136
+ "type": "string"
19336
21137
  }
19337
21138
  }
19338
21139
  },
@@ -19495,6 +21296,25 @@
19495
21296
  }
19496
21297
  }
19497
21298
  }
21299
+ },
21300
+ "functions_region": {
21301
+ "type": "string",
21302
+ "description": "The functions region for this deploy as an airport code.\n"
21303
+ },
21304
+ "functions_region_overrides": {
21305
+ "type": "array",
21306
+ "items": {
21307
+ "type": "object",
21308
+ "properties": {
21309
+ "name": {
21310
+ "type": "string"
21311
+ },
21312
+ "region": {
21313
+ "type": "string"
21314
+ }
21315
+ }
21316
+ },
21317
+ "description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
19498
21318
  }
19499
21319
  }
19500
21320
  },
@@ -19634,6 +21454,9 @@
19634
21454
  "priority": {
19635
21455
  "type": "integer"
19636
21456
  },
21457
+ "region": {
21458
+ "type": "string"
21459
+ },
19637
21460
  "traffic_rules": {
19638
21461
  "type": "object",
19639
21462
  "properties": {
@@ -21270,6 +23093,9 @@
21270
23093
  "priority": {
21271
23094
  "type": "integer"
21272
23095
  },
23096
+ "region": {
23097
+ "type": "string"
23098
+ },
21273
23099
  "traffic_rules": {
21274
23100
  "type": "object",
21275
23101
  "properties": {