-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenapi.yaml
More file actions
13655 lines (13211 loc) · 482 KB
/
openapi.yaml
File metadata and controls
13655 lines (13211 loc) · 482 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: My Nethesis API
description: REST API for My Nethesis with business hierarchy management and RBAC
version: 0.6.1
contact:
name: Nethesis S.r.l.
url: http://www.nethesis.it
email: info@nethesis.it
license:
name: AGPL-3.0-or-later
url: https://www.gnu.org/licenses/agpl-3.0.html
servers:
- url: https://api.your-domain.com/api
description: Backend API server (port 8080)
- url: https://collect.your-domain.com/api
description: Collect API server (port 8081)
tags:
- name: Backend - Authentication
description: Token exchange, refresh, and logout
- name: Backend - Me
description: Current user profile, password and avatar management
- name: Backend - Impersonation
description: Consent-based user impersonation flow (start, exit, status, consent)
- name: Backend - Impersonation Sessions
description: Impersonation session history and audit logs
- name: Backend - Users
description: User CRUD and lifecycle management
- name: Backend - Users Stats
description: User statistics and trends
- name: Backend - Users Import/Export
description: User CSV import and CSV/PDF export
- name: Backend - Distributors
description: Distributor CRUD and lifecycle management
- name: Backend - Distributors Stats
description: Distributor statistics and trends
- name: Backend - Distributors Import/Export
description: Distributor CSV import and CSV/PDF export
- name: Backend - Resellers
description: Reseller CRUD and lifecycle management
- name: Backend - Resellers Stats
description: Reseller statistics and trends
- name: Backend - Resellers Import/Export
description: Reseller CSV import and CSV/PDF export
- name: Backend - Customers
description: Customer CRUD and lifecycle management
- name: Backend - Customers Stats
description: Customer statistics and trends
- name: Backend - Customers Import/Export
description: Customer CSV import and CSV/PDF export
- name: Backend - Systems
description: System CRUD and lifecycle management
- name: Backend - Systems Stats
description: System statistics, trends and exports
- name: Backend - Systems Inventory
description: System inventory history, diffs and timeline
- name: Backend - Applications
description: Application CRUD and organization assignment
- name: Backend - Applications Stats
description: Application statistics, summaries and trends
- name: Backend - Metadata
description: Read-only reference data (roles, organization roles, organizations, third-party applications)
- name: Backend - Filters
description: Aggregated filter values for UI dropdowns
- name: Backend - Rebranding
description: Rebranding management for organizations and products
- name: Backend - Public
description: Public endpoints requiring no authentication (avatars, etc.)
- name: Backend - User
description: OAuth2/OIDC user profile and permissions endpoints
- name: Backend - Validators
description: Real-time validation endpoints (VAT, etc.)
- name: Backend - Health
description: Backend service health check
- name: Backend - Alerts
description: Active alert monitoring and aggregates (list, totals, trend, stats, history, activity)
- name: Backend - Alerts Configuration
description: Per-organization alerting layer configuration and effective merged config
- name: Backend - Alerts Silences
description: Cross-hierarchy alert silences (mute/unmute across systems)
- name: Backend - Alerts (Per-System)
description: Alerts and silences scoped to a single system (/systems/{id}/alerts)
- name: Collect - Health
description: Collect service health and monitoring
- name: Collect - Systems
description: Collect service inventory and heartbeat collection
- name: Collect - Rebranding
description: Collect service rebranding endpoints for systems
- name: Collect - Alerting
description: |
Collect service alerting proxy to Mimir Alertmanager.
**Multi-tenant Alertmanager API**
This proxy forwards requests to the Grafana Mimir Alertmanager with automatic multi-tenant isolation.
Each system's organization is automatically resolved and injected as the `X-Scope-OrgID` header,
ensuring complete isolation of alerts and silences between organizations.
**Accessible endpoints:**
- `POST /api/services/mimir/alertmanager/api/v2/alerts` - Push alerts
- `GET /api/services/mimir/alertmanager/api/v2/alerts` - List alerts
- `POST /api/services/mimir/alertmanager/api/v2/silences` - Create silence
- `GET /api/services/mimir/alertmanager/api/v2/silences` - List silences
- `GET /api/services/mimir/alertmanager/api/v2/silences/{id}` - Get silence
- `DELETE /api/services/mimir/alertmanager/api/v2/silences/{id}` - Delete silence
- `POST /api/alert_history` - Alertmanager webhook for alert history persistence
security:
- BearerAuth: []
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: JWT token from auth exchange endpoint
BasicAuth:
type: http
scheme: basic
description: HTTP Basic authentication for system inventory collection
schemas:
ErrorResponse:
type: object
properties:
code:
type: integer
description: HTTP error code
example: 400
message:
type: string
description: Error message
example: "validation failed"
data:
$ref: '#/components/schemas/ErrorData'
ChannelToggles:
type: object
description: |
Per-layer enable/disable for each notification channel. Each value
is tri-state:
* `true` — explicitly enabled at this layer
* `false` — explicitly disabled (Owner only; non-Owner false is
normalised to null on save)
* `null` — no opinion at this layer; effective state inherits
from the merge of any ancestor layer that took a
position. If no layer in the chain enables a channel,
the channel stays off.
properties:
email:
type: boolean
nullable: true
webhook:
type: boolean
nullable: true
telegram:
type: boolean
nullable: true
EmailRecipient:
type: object
required:
- address
properties:
address:
type: string
format: email
maxLength: 320
severities:
type: array
maxItems: 3
items:
type: string
enum: [critical, warning, info]
description: |
Severity scope for this recipient. Empty (or omitted) means
"all severities" — the recipient lands on every per-severity
receiver. A non-empty subset narrows delivery to those severities.
language:
type: string
enum: [en, it]
description: |
Rendering language for this recipient's email body and subject.
Defaults to `en` when omitted.
format:
type: string
enum: [html, plain]
description: |
Body format preference. `html` (default) emits multipart with
an html primary body and text alternative; `plain` emits only
a text body.
WebhookRecipient:
type: object
required:
- name
- url
properties:
name:
type: string
maxLength: 100
description: Descriptive label for the webhook target (UI only).
url:
type: string
format: uri
maxLength: 2048
description: |
Webhook URL. Validation rejects non-public destinations (loopback,
RFC1918, RFC6598 CGNAT, link-local, multicast, cloud metadata) and
requires a canonical hostname (containing at least one letter) or
a valid IP literal. Only http/https schemes are accepted; URLs
cannot embed userinfo.
severities:
type: array
maxItems: 3
items:
type: string
enum: [critical, warning, info]
TelegramRecipient:
type: object
required:
- bot_token
- chat_id
properties:
bot_token:
type: string
maxLength: 256
example: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
chat_id:
type: integer
format: int64
example: -1001234567890
severities:
type: array
maxItems: 3
items:
type: string
enum: [critical, warning, info]
AlertmanagerSilenceStatus:
type: object
properties:
state:
type: string
enum: [active, expired, pending]
description: Runtime state of the silence
example: "active"
AlertmanagerMatcher:
type: object
properties:
name:
type: string
description: Label name
example: "alertname"
value:
type: string
description: Label value
example: "HighCPU"
isRegex:
type: boolean
description: Whether the value is a regex
example: false
AlertmanagerSilence:
type: object
properties:
id:
type: string
description: Alertmanager silence ID
example: "4e6f0c30-c383-4e22-9443-0d7b6a8bd40b"
matchers:
type: array
items:
$ref: '#/components/schemas/AlertmanagerMatcher'
startsAt:
type: string
format: date-time
example: "2024-01-01T00:00:00Z"
endsAt:
type: string
format: date-time
example: "2024-01-01T01:00:00Z"
updatedAt:
type: string
format: date-time
example: "2024-01-01T00:00:00Z"
createdBy:
type: string
example: "admin@example.com"
comment:
type: string
example: "silenced during maintenance"
status:
$ref: '#/components/schemas/AlertmanagerSilenceStatus'
AlertingConfigLayer:
type: object
description: |
The caller's alerting configuration. This is what POST /alerts/config
accepts and what GET /alerts/config returns; the merged effective
config that backs Mimir is computed server-side and never exposed.
Each recipient carries its own `severities[]` (empty = all
severities); email recipients additionally carry per-recipient
`language` and `format`. Channel toggles under `enabled` are
tri-state: null = no opinion at this layer (inherit), true =
enabled, false = disabled (Owner only — non-Owner false is
normalised to null on save).
Body size: the request body is capped at 1 MiB on POST. Oversized
requests are rejected with HTTP 413 before binding.
properties:
enabled:
$ref: '#/components/schemas/ChannelToggles'
email_recipients:
type: array
maxItems: 50
items:
$ref: '#/components/schemas/EmailRecipient'
webhook_recipients:
type: array
maxItems: 20
items:
$ref: '#/components/schemas/WebhookRecipient'
telegram_recipients:
type: array
maxItems: 20
items:
$ref: '#/components/schemas/TelegramRecipient'
ErrorData:
type: object
properties:
type:
type: string
enum: [validation_error, external_api_error]
description: Type of error
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
details:
description: Additional error details
ValidationError:
type: object
properties:
key:
type: string
description: Field name that failed validation
example: "username"
message:
type: string
description: Error code or message
example: "required"
value:
type: string
description: Value that failed validation
example: ""
VATValidationResponse:
type: object
properties:
exists:
type: boolean
description: Whether the VAT number exists in the specified entity type
example: true
ActiveAlert:
type: object
description: |
Active alert returned by Mimir Alertmanager. The fan-out includes
silenced and inhibited alerts (not just `active` ones), so callers can
render the muted/suppressed state. System identity (id, key, name,
type) is carried as labels (`system_id`, `system_key`, `system_name`,
`system_type`), stamped server-side at ingest time.
properties:
fingerprint:
type: string
description: Alertmanager fingerprint (hex hash of labels)
example: "01cfde4b7fa6d1c7"
labels:
type: object
additionalProperties:
type: string
description: |
Alert labels. Always includes server-stamped identity labels
(`system_id`, `system_key`, `system_name`, `system_type`,
`system_fqdn`, `system_ipv4`, `organization_id`,
`organization_name`, `organization_vat`, `organization_type`)
plus the alert's own labels (`alertname`, `severity`, ...). Use
`system_id` to link to the system detail page (/systems/:id) and
`organization_id` to link to the organization.
example:
alertname: "DiskFilling"
severity: "warning"
system_id: "35aa0d84-08c1-4013-b1fd-d5f6ef3e0541"
system_key: "NETH-FBB2-1A6E-7CAD-44A4-A772-B3EE-F0F6-F371"
system_name: "cust1-sys-A"
system_type: "ns8"
organization_id: "org-1a2b3c4d"
organization_name: "Test Customer"
organization_type: "customer"
organization_vat: "123456789012"
annotations:
type: object
additionalProperties:
type: string
status:
type: object
properties:
state:
type: string
enum: [active, suppressed, unprocessed]
silencedBy:
type: array
items:
type: string
description: Active silence IDs muting this alert (non-empty → state is "suppressed")
inhibitedBy:
type: array
items:
type: string
startsAt:
type: string
format: date-time
endsAt:
type: string
format: date-time
generatorURL:
type: string
description: Source URL of the alert (set by the pushing agent), if any
AlertActivityEntry:
type: object
description: One event in the per-alert audit timeline (silence created/updated/removed).
properties:
id:
type: integer
format: int64
organization_id:
type: string
fingerprint:
type: string
description: Alertmanager fingerprint of the alert this event belongs to
action:
type: string
enum: [silenced, silence_updated, unsilenced]
description: Event kind. Note edits are surfaced as `silence_updated` (note = silence comment).
actor_user_id:
type: string
nullable: true
description: logto_id of the user who triggered the action
actor_name:
type: string
nullable: true
description: Display name of the actor (denormalized for cheap render)
silence_id:
type: string
nullable: true
description: Silence ID associated with this event
details:
type: object
additionalProperties: true
description: |
Free-form payload for the event. For `silenced` / `silence_updated`:
`{comment, end_at, duration_minutes?}`. For `unsilenced`: empty.
created_at:
type: string
format: date-time
AlertHistoryRecord:
type: object
description: A single resolved or inactive alert stored from an Alertmanager webhook
properties:
id:
type: integer
format: int64
description: Auto-incrementing record ID
example: 1
organization_id:
type: string
description: Tenant the alert belongs to (logto_id of the owning org)
example: "m4m3mdjdiizs"
system_key:
type: string
description: System key extracted from alert labels
example: "NETH-F5D2-5E69-A174-45A9-B1AB-2BB9-03F5-F1B4"
alertname:
type: string
description: Alert name from labels
example: "DiskFull"
severity:
type: string
nullable: true
description: Severity from alert labels
example: "critical"
status:
type: string
description: Alert status at time of receipt
enum: [resolved, inactive]
example: "resolved"
fingerprint:
type: string
description: Alertmanager fingerprint for the alert
example: "ac193fc966f036ca"
starts_at:
type: string
format: date-time
description: When the alert started firing
example: "2026-04-08T13:28:38Z"
ends_at:
type: string
format: date-time
nullable: true
description: When the alert resolved. Null when the end time is unknown.
example: "2026-04-08T13:33:39Z"
summary:
type: string
nullable: true
description: Human-readable summary from alert annotations
example: "Disk usage above 90%"
labels:
type: object
additionalProperties:
type: string
description: All labels from the alert
example:
alertname: "DiskFull"
severity: "critical"
system_key: "NETH-F5D2-5E69-A174-45A9-B1AB-2BB9-03F5-F1B4"
annotations:
type: object
additionalProperties:
type: string
description: All annotations from the alert
example:
summary: "Disk usage above 90%"
receiver:
type: string
nullable: true
description: Alertmanager receiver that handled this alert
example: "severity-critical-receiver"
created_at:
type: string
format: date-time
description: When the record was created in the database
example: "2026-04-08T13:33:40Z"
InventoryRecord:
type: object
description: A snapshot of a system's inventory data at a point in time
properties:
id:
type: integer
format: int64
description: Auto-incrementing record ID
example: 42
system_id:
type: string
description: ID of the system that sent the inventory
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
timestamp:
type: string
format: date-time
description: When the inventory was collected on the system
example: "2026-02-20T14:30:00Z"
data:
type: object
description: >
Complete raw inventory JSON. Contains the full system inventory payload
(facts, modules, nodes, network, etc.). The structure varies by system type
and can contain hundreds of fields.
example:
facts:
distro:
name: "NethServer"
version: "8.2.0"
network:
hostname: "ns8.example.com"
public_ip: "203.0.113.10"
memory:
total_bytes: 17179869184
data_hash:
type: string
description: SHA-256 hash of the inventory data for deduplication
example: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
data_size:
type: integer
format: int64
description: Size of the inventory data in bytes
example: 24576
processed_at:
type: string
format: date-time
nullable: true
description: When diff processing completed for this record. Null if not yet processed.
example: "2026-02-20T14:31:00Z"
has_changes:
type: boolean
description: Whether changes were detected compared to the previous inventory
example: true
change_count:
type: integer
description: Number of significant changes detected
example: 5
created_at:
type: string
format: date-time
description: When the record was created in the database
example: "2026-02-20T14:30:05Z"
updated_at:
type: string
format: date-time
description: When the record was last updated
example: "2026-02-20T14:31:00Z"
InventoryDiff:
type: object
description: A single field-level difference between two inventory snapshots
properties:
id:
type: integer
format: int64
description: Auto-incrementing diff ID
example: 101
system_id:
type: string
description: ID of the system
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
previous_inventory_id:
type: integer
format: int64
nullable: true
description: ID of the previous inventory record this diff was computed against. Null for the first inventory.
example: 41
inventory_id:
type: integer
format: int64
description: ID of the inventory record this diff belongs to
example: 42
diff_type:
type: string
enum: [create, update, delete]
description: Type of change detected
example: "update"
field_path:
type: string
description: JSON path of the changed field (e.g. facts.nodes.1.version)
example: "facts.distro.version"
previous_value:
type: string
description: Previous field value. Can be a string, number, object, or array depending on the field. Null for 'create' diffs.
nullable: true
example: "8.1.0"
current_value:
type: string
description: Current field value. Can be a string, number, object, or array depending on the field. Null for 'delete' diffs.
nullable: true
example: "8.2.0"
severity:
type: string
enum: [low, medium, high, critical]
description: >
Severity of the change. Determined by the differ engine configuration:
critical (deleted nodes/memory/network, error entries),
high (version changes, subscription, certificates),
medium (feature updates, cluster changes),
low (uptime, memory usage fluctuations).
example: "high"
category:
type: string
description: >
Category of the change. Possible values: os, hardware, network, security,
backup, features, modules, cluster, nodes, system.
enum: [os, hardware, network, security, backup, features, modules, cluster, nodes, system]
example: "os"
notification_sent:
type: boolean
description: Whether a notification has been sent for this change
example: false
created_at:
type: string
format: date-time
description: When the diff was created
example: "2026-02-20T14:31:00Z"
InventoryChangesSummary:
type: object
description: Aggregated summary of inventory changes for a system
properties:
system_id:
type: string
description: ID of the system
example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
total_changes:
type: integer
description: Total number of changes across all inventory snapshots
example: 42
recent_changes:
type: integer
description: Number of changes in the most recent period
example: 5
last_inventory_time:
type: string
format: date-time
description: Timestamp of the most recent inventory record
example: "2026-02-20T14:30:00Z"
has_critical_changes:
type: boolean
description: Whether any critical-severity changes exist
example: false
has_alerts:
type: boolean
description: Whether any unresolved alerts exist for this system
example: true
changes_by_category:
type: object
description: Count of changes grouped by category
additionalProperties:
type: integer
example:
os: 10
hardware: 5
network: 8
security: 3
changes_by_severity:
type: object
description: Count of changes grouped by severity
additionalProperties:
type: integer
example:
low: 20
medium: 15
high: 5
critical: 2
InventoryTimelineSummary:
type: object
description: Filtered severity counts for the timeline view
properties:
total:
type: integer
description: Total number of changes matching the active filters
example: 12
critical:
type: integer
description: Number of critical-severity changes matching the active filters
example: 1
high:
type: integer
description: Number of high-severity changes matching the active filters
example: 3
medium:
type: integer
description: Number of medium-severity changes matching the active filters
example: 8
low:
type: integer
description: Number of low-severity changes matching the active filters
example: 0
InventoryTimelineGroup:
type: object
description: A date group in the inventory timeline
properties:
date:
type: string
description: Date in YYYY-MM-DD format (UTC)
example: "2026-03-04"
inventory_count:
type: integer
description: Number of inventory snapshots collected on this date
example: 3
change_count:
type: integer
description: Number of diffs on this date matching the active filters (0 means no changes)
example: 2
inventory_ids:
type: array
description: IDs of the inventory records collected on this date. Pass these as repeated params to `GET /systems/{id}/inventory/diffs?inventory_id=42&inventory_id=43` to fetch the actual diffs.
items:
type: integer
format: int64
example: [42, 43]
BackupMetadata:
type: object
description: Metadata describing a single configuration backup stored for a system.
properties:
id:
type: string
description: Backup object ID (UUIDv7 plus original extension)
example: "01934fab-bc33-7890-a1b2-c3d4e5f6a7b8.tar.gz"
filename:
type: string
description: User-facing filename as supplied by the appliance via X-Filename
example: "daily-backup-2026-04-12.tar.gz"
size:
type: integer
format: int64
description: Object size in bytes
example: 82944000
sha256:
type: string
description: Hex SHA-256 checksum computed at ingest; always present once the upload returns 201
example: "3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b"
mimetype:
type: string
example: "application/gzip"
uploaded_at:
type: string
format: date-time
description: Server-observed timestamp of the upload
example: "2026-04-12T02:15:00Z"
Pagination:
type: object
properties:
page:
type: integer
minimum: 1
description: Current page number
example: 1
page_size:
type: integer
minimum: 1
maximum: 200
description: Number of items per page
example: 20
total_count:
type: integer
minimum: 0
description: Total number of items
example: 156
total_pages:
type: integer
minimum: 0
description: Total number of pages
example: 8
has_next:
type: boolean
description: Whether there is a next page
example: true
has_prev:
type: boolean
description: Whether there is a previous page
example: false
next_page:
type: integer
nullable: true
description: Next page number if available
example: 2
prev_page:
type: integer
nullable: true
description: Previous page number if available
example: null
sort_by:
type: string
nullable: true
description: Field used for sorting
example: "name"
sort_direction:
type: string
nullable: true
enum: ["asc", "desc"]
description: Sort direction
example: "asc"
TokenExchangeRequest:
type: object
required:
- access_token
properties:
access_token:
type: string
description: Logto access token to exchange
example: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
TokenRefreshRequest:
type: object
required:
- refresh_token
properties:
refresh_token:
type: string
description: Refresh token to exchange for new access token
example: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
ChangePasswordRequest:
type: object
required:
- current_password
- new_password
properties:
current_password:
type: string
description: Current user password for verification
example: "MyCurrentP4ssw0rd!"
new_password:
type: string
minLength: 12
maxLength: 128
description: |
New password meeting security requirements:
- At least 12 characters long
- At least one uppercase letter (A-Z)
- At least one lowercase letter (a-z)
- At least one digit (0-9)
- At least one special character (!@#$%^&*...)
- No more than 3 consecutive identical characters
- Cannot contain common weak patterns
example: "MyNewSecureP4ssw0rd!"
ChangeInfoRequest:
type: object
properties:
name:
type: string
minLength: 1
description: User's full name (cannot be empty if provided)
example: "John Doe"
email:
type: string
format: email
minLength: 1
description: User's email address (cannot be empty if provided)
example: "john.doe@example.com"
phone:
type: string
nullable: true
description: User's phone number (can be empty to remove)
example: "+39 333 123456"
AuthResponse:
type: object
properties:
token:
type: string
description: JWT access token (24h)
example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
refresh_token:
type: string
description: Refresh token (7 days)
example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
expires_in:
type: integer
description: Token expiration time in seconds
example: 86400
user:
$ref: '#/components/schemas/UserProfile'
UserProfile:
type: object
properties:
id:
type: string
description: User ID
example: "user_123456789"
logto_id:
type: string
nullable: true
description: Logto user ID
example: "user_abc123def456"
username:
type: string
description: Username
example: "john.doe"
email:
type: string
format: email
description: User email address
example: "john@example.com"
name:
type: string
description: Full name
example: "John Doe"
phone:
type: string
nullable: true
description: Phone number
example: "+39 333 123456"
user_roles:
type: array
items:
type: string
description: User role names