-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2108 lines (1981 loc) · 62 KB
/
Copy pathopenapi.yaml
File metadata and controls
2108 lines (1981 loc) · 62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: Ghost API
version: 0.1.0
description: Ghost database management API
servers:
- url: https://api.ghost.build/v0
description: Production
security:
- BearerAuth: []
paths:
# --- System ---
/health:
get:
operationId: health
summary: Health check
description: Returns 200 OK if the service is healthy.
security: []
responses:
"200":
description: Service is healthy
# --- Pricing ---
/pricing:
get:
operationId: getPricing
summary: Get pricing
description: |
Returns current pricing.
This endpoint is unauthenticated.
security: []
responses:
"200":
description: Pricing
content:
application/json:
schema:
$ref: "#/components/schemas/Pricing"
default:
$ref: "#/components/responses/Error"
# --- Auth ---
/auth/info:
get:
operationId: authInfo
summary: Get authentication info
description: Returns info about the authenticated API key.
responses:
"200":
description: Authentication info
content:
application/json:
schema:
$ref: "#/components/schemas/AuthInfo"
default:
$ref: "#/components/responses/Error"
/auth/logout:
post:
operationId: logout
summary: Log out
description: |
Logs the user out by revoking the given refresh token.
Requires user authentication (JWT). API keys and project access tokens
cannot be used with this endpoint.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/LogoutRequest"
responses:
"204":
description: Logged out successfully
default:
$ref: "#/components/responses/Error"
# --- Spaces ---
/spaces:
get:
operationId: listSpaces
summary: List spaces
description: |
Returns Ghost spaces accessible to the authenticated user.
For user JWTs, returns all Ghost spaces the user is a member of.
For API keys, returns the single space the key is scoped to.
responses:
"200":
description: List of spaces
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Space"
default:
$ref: "#/components/responses/Error"
post:
operationId: createSpace
summary: Create a space
description: |
Creates a new Ghost space. Requires user authentication (JWT).
API keys cannot be used to create spaces.
When no name is provided, the space is named after its owner
(e.g. "Jane Doe's space").
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSpaceRequest"
responses:
"201":
description: Space created
content:
application/json:
schema:
$ref: "#/components/schemas/Space"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}:
get:
operationId: getSpace
summary: Get a space
description: |
Returns details about a single space, including the owner and the
caller's role. For user JWTs the role and owner are populated; for API
keys they are omitted (the members lookup that resolves the owner is not
available to API keys).
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: Space details
content:
application/json:
schema:
$ref: "#/components/schemas/SpaceDetail"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/rename:
post:
operationId: renameSpace
summary: Rename a space
description: |
Renames a space. Requires user authentication (JWT).
API keys cannot be used to rename spaces.
parameters:
- $ref: "#/components/parameters/SpaceId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RenameSpaceRequest"
responses:
"200":
description: Space renamed
content:
application/json:
schema:
$ref: "#/components/schemas/RenameSpaceResult"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/usage:
get:
operationId: spaceUsage
summary: Get space usage
description: Returns compute usage, storage usage, and billing/cost information for a space.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: Space usage
content:
application/json:
schema:
$ref: "#/components/schemas/SpaceUsage"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/status:
get:
operationId: spaceStatus
deprecated: true
summary: Get space usage (deprecated)
description: Deprecated alias for `GET /spaces/{space_id}/usage`. Use the `/usage` endpoint instead.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: Space usage
content:
application/json:
schema:
$ref: "#/components/schemas/SpaceUsage"
default:
$ref: "#/components/responses/Error"
# --- Members ---
/spaces/{space_id}/members:
get:
operationId: listMembers
summary: List space members
description: |
Lists the members of a space.
Requires user authentication (JWT). API keys cannot manage members.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: List of space members
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Member"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/members/{user_id}:
delete:
operationId: removeMember
summary: Remove a member
description: |
Removes a member from a space. The space owner cannot be removed,
and callers cannot remove themselves.
Requires user authentication (JWT). API keys cannot manage members.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/MemberUserId"
responses:
"200":
description: Member removed
content:
application/json:
schema:
$ref: "#/components/schemas/Member"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/members/{user_id}/role:
put:
operationId: updateMemberRole
summary: Update a member's role
description: |
Changes a member's role within a space. The `owner` role cannot be
granted, the owner's role cannot be changed, and callers cannot
change their own role.
Requires user authentication (JWT). API keys cannot manage members.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/MemberUserId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateMemberRoleRequest"
responses:
"200":
description: Member role updated
content:
application/json:
schema:
$ref: "#/components/schemas/Member"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/leave:
post:
operationId: leaveSpace
summary: Leave a space
description: |
Removes the authenticated user from the space. Requires user
authentication (JWT). API keys cannot leave a space. The space owner
cannot leave their own space.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: Left the space
content:
application/json:
schema:
$ref: "#/components/schemas/LeaveSpaceResult"
default:
$ref: "#/components/responses/Error"
# --- Invites ---
/spaces/{space_id}/invites:
get:
operationId: listInvites
summary: List sent invites
description: |
Lists the pending invites that have been sent for a space.
Requires user authentication (JWT). API keys cannot manage invites.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: List of pending invites
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Invite"
default:
$ref: "#/components/responses/Error"
post:
operationId: createInvite
summary: Invite a user to a space
description: |
Invites a user to a space by email address. The invitee accepts the
invitation with their own Ghost account.
Requires user authentication (JWT). API keys cannot manage invites.
parameters:
- $ref: "#/components/parameters/SpaceId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateInviteRequest"
responses:
"201":
description: Invite created
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/invites/{email}:
delete:
operationId: cancelInvite
summary: Cancel a sent invite
description: |
Cancels the pending invite sent to the given email address for a space.
Requires user authentication (JWT). API keys cannot manage invites.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/InviteEmail"
responses:
"200":
description: Invite cancelled
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"
default:
$ref: "#/components/responses/Error"
/invites:
get:
operationId: listReceivedInvites
summary: List received invites
description: |
Lists the pending invites the authenticated user has received, across
all spaces. Requires user authentication (JWT).
responses:
"200":
description: List of pending received invites
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ReceivedInvite"
default:
$ref: "#/components/responses/Error"
/invites/{space_id}/accept:
post:
operationId: acceptInvite
summary: Accept a received invite
description: |
Accepts the invite the authenticated user has received to the given
space, joining it. Requires user authentication (JWT).
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: Invite accepted
content:
application/json:
schema:
$ref: "#/components/schemas/InviteActionResult"
default:
$ref: "#/components/responses/Error"
/invites/{space_id}/decline:
post:
operationId: declineInvite
summary: Decline a received invite
description: |
Declines the invite the authenticated user has received to the given
space. Requires user authentication (JWT).
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: Invite declined
content:
application/json:
schema:
$ref: "#/components/schemas/InviteActionResult"
default:
$ref: "#/components/responses/Error"
# --- API Keys ---
/spaces/{space_id}/api_keys:
get:
operationId: listApiKeys
summary: List API keys
description: |
Lists all API keys for the specified space.
Requires user authentication (JWT). API keys cannot list other API keys.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: List of API keys
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ApiKey"
default:
$ref: "#/components/responses/Error"
post:
operationId: createApiKey
summary: Create an API key
description: |
Creates a new API key (client credentials) for the specified space.
Requires user authentication (JWT). API keys cannot create other API keys.
parameters:
- $ref: "#/components/parameters/SpaceId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateApiKeyRequest"
responses:
"201":
description: API key created
content:
application/json:
schema:
$ref: "#/components/schemas/ApiKeyCredentials"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/api_keys/{prefix}:
delete:
operationId: deleteApiKey
summary: Delete an API key
description: |
Deletes an API key from the specified space.
Requires user authentication (JWT). API keys cannot delete other API keys.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/ApiKeyPrefix"
responses:
"204":
description: API key deleted
default:
$ref: "#/components/responses/Error"
# --- Databases ---
/spaces/{space_id}/databases:
get:
operationId: listDatabases
summary: List databases
description: Lists all databases in a space.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: List of databases
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/DatabaseWithUsage"
default:
$ref: "#/components/responses/Error"
post:
operationId: createDatabase
summary: Create a database
description: Creates a new database in a space.
parameters:
- $ref: "#/components/parameters/SpaceId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateDatabaseRequest"
responses:
"202":
description: Database created
content:
application/json:
schema:
$ref: "#/components/schemas/Database"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/databases/{database_ref}:
get:
operationId: getDatabase
summary: Get a database
description: Gets a single database by ID or name.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
responses:
"200":
description: Database details
content:
application/json:
schema:
$ref: "#/components/schemas/Database"
default:
$ref: "#/components/responses/Error"
delete:
operationId: deleteDatabase
summary: Delete a database
description: Deletes a database.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
responses:
"202":
description: Database deleted
content:
application/json:
schema:
$ref: "#/components/schemas/Database"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/databases/{database_ref}/fork:
post:
operationId: forkDatabase
summary: Fork a database
description: Forks an existing database.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ForkDatabaseRequest"
responses:
"202":
description: Database forked
content:
application/json:
schema:
$ref: "#/components/schemas/Database"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/databases/{database_ref}/pause:
post:
operationId: pauseDatabase
summary: Pause a database
description: Pauses a running database.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
responses:
"202":
description: Database paused
content:
application/json:
schema:
$ref: "#/components/schemas/Database"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/databases/{database_ref}/resume:
post:
operationId: resumeDatabase
summary: Resume a database
description: Resumes a paused database.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
responses:
"202":
description: Database resumed
content:
application/json:
schema:
$ref: "#/components/schemas/Database"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/databases/{database_ref}/rename:
post:
operationId: renameDatabase
summary: Rename a database
description: Renames a database.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RenameDatabaseRequest"
responses:
"204":
description: Database renamed
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/databases/{database_ref}/password:
post:
operationId: updatePassword
summary: Update database password
description: Resets the database password.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdatePasswordRequest"
responses:
"204":
description: Password updated
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/databases/{database_ref}/logs:
get:
operationId: databaseLogs
summary: Get database logs
description: |
Fetch logs for a specific database. Returns up to 500 log entries in
reverse chronological order. Supports cursor-based pagination via the
`cursor` parameter and the `last_cursor` field in the response.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
- name: cursor
in: query
required: false
schema:
type: string
description: |
Opaque pagination cursor returned as `last_cursor` in a previous
response. When provided, returns the next page of logs older than
the cursor position.
- name: until
in: query
required: false
description: Upper bound timestamp — return logs at or before this time (RFC3339 format, e.g., 2024-01-15T10:00:00Z). Defaults to now.
schema:
type: string
format: date-time
- name: since
in: query
required: false
schema:
type: string
format: date-time
description: Lower bound timestamp — fetch logs after this time (RFC3339 format, e.g., 2024-01-15T09:00:00Z)
- name: search
in: query
required: false
schema:
type: array
items:
type: string
description: |
Full-text search terms to filter log lines. Repeat the parameter
for multiple values (e.g. `?search=slow+query&search=ERROR`).
- name: severity
in: query
required: false
schema:
type: array
items:
type: string
description: |
Severity levels to filter results. Repeat the parameter for multiple
values (e.g. `?severity=ERROR&severity=WARNING`). Common values
include `LOG`, `WARNING`, `ERROR`, and `FATAL`; PostgreSQL may also
emit `DEBUG*`, `INFO`, `NOTICE`, and `PANIC`.
responses:
"200":
description: Database logs
content:
application/json:
schema:
$ref: "#/components/schemas/LogsResponse"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/databases/{database_ref}/share:
post:
operationId: shareDatabase
summary: Share a database
description: Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/DatabaseRef"
requestBody:
required: false
content:
application/json:
schema:
$ref: "#/components/schemas/ShareDatabaseRequest"
responses:
"201":
description: Share created
content:
application/json:
schema:
$ref: "#/components/schemas/DatabaseShare"
default:
$ref: "#/components/responses/Error"
# --- Shares ---
/spaces/{space_id}/shares:
get:
operationId: listShares
summary: List database shares
description: Lists all shared snapshots for a space.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: List of shares
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/DatabaseShare"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/shares/{share_token}:
delete:
operationId: revokeShare
summary: Revoke a database share
description: Revokes a shared snapshot, deleting the underlying storage snapshot. The share is identified by its share token.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/ShareToken"
responses:
"200":
description: Share revoked
content:
application/json:
schema:
$ref: "#/components/schemas/DatabaseShare"
default:
$ref: "#/components/responses/Error"
# --- Billing ---
/spaces/{space_id}/invoices:
get:
operationId: listInvoices
summary: List invoices
description: |
Lists the most recent invoices for a space.
Requires a user JWT; API keys are not authorized.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: List of invoices
content:
application/json:
schema:
$ref: "#/components/schemas/InvoicesResponse"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/invoices/{invoice_id}:
get:
operationId: getInvoice
summary: Get invoice detail
description: |
Returns the line-item breakdown for a single invoice, looked up by the
invoice ID returned from `listInvoices`.
Requires a user JWT; API keys are not authorized.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/InvoiceId"
responses:
"200":
description: Invoice detail
content:
application/json:
schema:
$ref: "#/components/schemas/InvoiceDetail"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/payment:
get:
operationId: listPaymentMethods
summary: List payment methods
description: Lists payment methods on file for a space.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: List of payment methods
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentMethodsResponse"
default:
$ref: "#/components/responses/Error"
post:
operationId: createPaymentMethodSetup
summary: Create payment method setup
description: Creates a Stripe Setup Intent for payment method collection and returns the client secret and payment page URL.
parameters:
- $ref: "#/components/parameters/SpaceId"
responses:
"200":
description: Payment setup created
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentSetupResponse"
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/payment/{payment_id}:
get:
operationId: getPaymentMethod
summary: Get a payment method
description: Returns a single payment method by ID.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/PaymentId"
responses:
"200":
description: Payment method
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentMethod"
default:
$ref: "#/components/responses/Error"
delete:
operationId: deletePaymentMethod
summary: Delete a payment method
description: Deletes a payment method.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/PaymentId"
responses:
"204":
description: Payment method deleted
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/payment/{payment_id}/primary:
put:
operationId: setPaymentMethodPrimary
summary: Set primary payment method
description: Sets a payment method as the primary payment method for the space.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/PaymentId"
responses:
"204":
description: Payment method set as primary
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/payment/{payment_id}/deletion:
delete:
operationId: cancelPaymentMethodDeletion
summary: Cancel pending payment method deletion
description: Cancels a pending deletion for a payment method.
parameters:
- $ref: "#/components/parameters/SpaceId"
- $ref: "#/components/parameters/PaymentId"
responses:
"204":
description: Pending deletion cancelled
default:
$ref: "#/components/responses/Error"
/spaces/{space_id}/overages:
put:
operationId: updateOverages
summary: Update compute overage settings
description: |
Enables or disables compute overage billing for the space, optionally
setting a monthly compute-minute cap above which standard databases
auto-pause. Requires a user JWT and a payment method on file.
parameters:
- $ref: "#/components/parameters/SpaceId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateOverageSettingsRequest"
responses:
"204":
description: Overage settings updated
default:
$ref: "#/components/responses/Error"
# --- Analytics ---
/analytics/identify:
post:
operationId: analyticsIdentify
summary: Identify user
description: Identifies a user for analytics.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/IdentifyRequest"
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/StatusResponse"
default:
$ref: "#/components/responses/Error"
/analytics/track:
post:
operationId: analyticsTrack
summary: Track event
description: Tracks an analytics event.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/TrackRequest"
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/StatusResponse"
default:
$ref: "#/components/responses/Error"
# --- Feedback ---
/feedback:
post:
operationId: submitFeedback
summary: Submit feedback
description: Submits feedback or bug report.
requestBody:
required: true