aspera-cli 4.27.5 → 4.28.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.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +160 -4
  4. data/CONTRIBUTING.md +4 -2
  5. data/README.md +1 -1
  6. data/bin/asession +1 -1
  7. data/docs/README.md +1086 -331
  8. data/docs/test-mcp-with-ai.md +5 -3
  9. data/lib/aspera/agent/direct.rb +15 -4
  10. data/lib/aspera/agent/factory.rb +2 -1
  11. data/lib/aspera/agent/node.rb +1 -1
  12. data/lib/aspera/api/cos_node.rb +1 -1
  13. data/lib/aspera/api/faspex.rb +1 -1
  14. data/lib/aspera/api/node.rb +6 -2
  15. data/lib/aspera/ascp/installation.rb +47 -11
  16. data/lib/aspera/ascp/management.rb +89 -43
  17. data/lib/aspera/cli/ascp_actions.rb +5 -19
  18. data/lib/aspera/cli/bootstrapper.rb +1 -2
  19. data/lib/aspera/cli/command_registry.rb +43 -3
  20. data/lib/aspera/cli/command_spec.rb +3 -0
  21. data/lib/aspera/cli/completion/ascli.bash +39 -5
  22. data/lib/aspera/cli/completion/ascli.fish +16 -8
  23. data/lib/aspera/cli/completion/ascli.ps1 +41 -0
  24. data/lib/aspera/cli/completion/ascli.zsh +20 -4
  25. data/lib/aspera/cli/completion_actions.rb +360 -0
  26. data/lib/aspera/cli/error.rb +42 -0
  27. data/lib/aspera/cli/extended_value.rb +30 -5
  28. data/lib/aspera/cli/formatter.rb +118 -56
  29. data/lib/aspera/cli/hints.rb +0 -1
  30. data/lib/aspera/cli/http.rb +6 -5
  31. data/lib/aspera/cli/info.rb +10 -4
  32. data/lib/aspera/cli/mailer.rb +1 -1
  33. data/lib/aspera/cli/mcp/http_servlet.rb +156 -0
  34. data/lib/aspera/cli/mcp/secrets.rb +143 -0
  35. data/lib/aspera/cli/mcp/tool.rb +231 -0
  36. data/lib/aspera/cli/option_value.rb +9 -1
  37. data/lib/aspera/cli/options.schema.yaml +390 -39
  38. data/lib/aspera/cli/parser.rb +14 -5
  39. data/lib/aspera/cli/plugins/aoc.rb +8 -11
  40. data/lib/aspera/cli/plugins/base.rb +36 -15
  41. data/lib/aspera/cli/plugins/config.rb +15 -44
  42. data/lib/aspera/cli/plugins/console.rb +3 -1
  43. data/lib/aspera/cli/plugins/factory.rb +1 -1
  44. data/lib/aspera/cli/plugins/faspex5.rb +9 -19
  45. data/lib/aspera/cli/plugins/faspio.rb +36 -5
  46. data/lib/aspera/cli/plugins/httpgw.rb +1 -0
  47. data/lib/aspera/cli/plugins/mcp.rb +177 -118
  48. data/lib/aspera/cli/plugins/node.rb +14 -8
  49. data/lib/aspera/cli/plugins/orchestrator.rb +351 -38
  50. data/lib/aspera/cli/plugins/server.rb +3 -1
  51. data/lib/aspera/cli/plugins/shares.rb +205 -35
  52. data/lib/aspera/cli/preset_actions.rb +15 -7
  53. data/lib/aspera/cli/preset_manager.rb +24 -2
  54. data/lib/aspera/cli/prompt.rb +3 -1
  55. data/lib/aspera/cli/result.rb +17 -4
  56. data/lib/aspera/cli/runner.rb +133 -43
  57. data/lib/aspera/cli/security.rb +134 -0
  58. data/lib/aspera/cli/table_fitter.rb +116 -0
  59. data/lib/aspera/cli/terminal_formatter.rb +23 -34
  60. data/lib/aspera/cli/transfer_agent.rb +4 -1
  61. data/lib/aspera/cli/vault_manager.rb +6 -5
  62. data/lib/aspera/cli/version.rb +1 -1
  63. data/lib/aspera/cli/web_secret.html.erb +61 -0
  64. data/lib/aspera/cli/web_secret.rb +220 -0
  65. data/lib/aspera/cli/wizard.rb +19 -9
  66. data/lib/aspera/command_line_builder.rb +26 -0
  67. data/lib/aspera/data_repository.rb +38 -24
  68. data/lib/aspera/duration.rb +42 -0
  69. data/lib/aspera/environment.rb +88 -24
  70. data/lib/aspera/exec_spec.rb +6 -5
  71. data/lib/aspera/faspex_gw.rb +98 -32
  72. data/lib/aspera/faspex_postproc.rb +187 -44
  73. data/lib/aspera/formatter_interface.rb +0 -1
  74. data/lib/aspera/id_generator.rb +2 -1
  75. data/lib/aspera/json_rpc/client.rb +51 -32
  76. data/lib/aspera/json_rpc/version.rb +1 -0
  77. data/lib/aspera/keychain/base.rb +5 -0
  78. data/lib/aspera/keychain/encrypted_hash.rb +6 -2
  79. data/lib/aspera/keychain/factory.rb +2 -3
  80. data/lib/aspera/keychain/hashicorp_vault.rb +7 -4
  81. data/lib/aspera/keychain/macos_security.rb +119 -13
  82. data/lib/aspera/keychain/one_password_api.rb +8 -3
  83. data/lib/aspera/keychain/one_password_base.rb +14 -9
  84. data/lib/aspera/keychain/one_password_cli.rb +4 -2
  85. data/lib/aspera/log.rb +3 -6
  86. data/lib/aspera/markdown.rb +152 -115
  87. data/lib/aspera/mime.rb +6 -0
  88. data/lib/aspera/nagios.rb +3 -1
  89. data/lib/aspera/node_emulator.rb +98 -101
  90. data/lib/aspera/oauth/{base.rb → client/base.rb} +5 -4
  91. data/lib/aspera/oauth/{boot.rb → client/boot.rb} +3 -2
  92. data/lib/aspera/oauth/{factory.rb → client/factory.rb} +7 -0
  93. data/lib/aspera/oauth/{generic.rb → client/generic.rb} +1 -1
  94. data/lib/aspera/oauth/{json_credentials.rb → client/json_credentials.rb} +1 -1
  95. data/lib/aspera/oauth/{jwt.rb → client/jwt.rb} +1 -1
  96. data/lib/aspera/oauth/{url_json.rb → client/url_json.rb} +1 -1
  97. data/lib/aspera/oauth/{web.rb → client/web.rb} +2 -2
  98. data/lib/aspera/oauth/server/authorize.html.erb +34 -0
  99. data/lib/aspera/oauth/server/pkce.rb +426 -0
  100. data/lib/aspera/orchestrator_workflow_checker.rb +561 -0
  101. data/lib/aspera/preview/terminal.rb +3 -2
  102. data/lib/aspera/rainbow.rb +27 -1
  103. data/lib/aspera/rest/aspera_errors.rb +51 -59
  104. data/lib/aspera/rest/client.rb +21 -14
  105. data/lib/aspera/rest/error_analyzer.rb +9 -0
  106. data/lib/aspera/rest/list.rb +6 -6
  107. data/lib/aspera/rest/util.rb +7 -1
  108. data/lib/aspera/rest.rb +0 -1
  109. data/lib/aspera/schema/IBM Aspera Faspex API-5.0-enhanced.yaml +0 -2
  110. data/lib/aspera/schema/IBM Aspera Orchestrator API-v1-enhanced.yaml +4001 -0
  111. data/lib/aspera/schema/IBM Aspera faspio Gateway API-1.0.0-enhanced.yaml +1097 -0
  112. data/lib/aspera/schema/IBM Aspera on Cloud Automation API-1.0.5-enhanced.yaml +35 -35
  113. data/lib/aspera/schema/IBM_Aspera_Shares.yaml +819 -7
  114. data/lib/aspera/schema/documentation.rb +50 -78
  115. data/lib/aspera/schema/reader.rb +39 -11
  116. data/lib/aspera/schema/registry.rb +8 -2
  117. data/lib/aspera/secret_hider.rb +94 -15
  118. data/lib/aspera/secret_strength.rb +114 -0
  119. data/lib/aspera/servlet_helpers.rb +111 -0
  120. data/lib/aspera/sync/args.schema.yaml +3 -1
  121. data/lib/aspera/sync/conf.schema.yaml +16 -6
  122. data/lib/aspera/sync/operations.rb +21 -1
  123. data/lib/aspera/temp_file_manager.rb +79 -20
  124. data/lib/aspera/transfer/parameters.rb +5 -0
  125. data/lib/aspera/transfer/spec.rb +52 -12
  126. data/lib/aspera/transfer/spec.schema.yaml +8 -5
  127. data/lib/aspera/web_auth/index.html.erb +16 -0
  128. data/lib/aspera/web_auth/server.rb +18 -10
  129. data/lib/aspera/web_page.html.erb +262 -0
  130. data/lib/aspera/web_page.rb +61 -0
  131. data/lib/aspera/web_server_simple.rb +76 -10
  132. data.tar.gz.sig +0 -0
  133. metadata +47 -32
  134. metadata.gz.sig +0 -0
  135. data/lib/aspera/cli/mcp_tool.rb +0 -189
  136. data/lib/aspera/oauth.rb +0 -9
  137. data/lib/aspera/schema/IBM Aspera Orchestrator API-v1.yaml +0 -1784
  138. data/lib/aspera/schema/IBM Aspera faspio Gateway API-1.0.0.yaml +0 -249
  139. data/lib/aspera/web_auth/index.html +0 -147
@@ -29,13 +29,63 @@ info:
29
29
 
30
30
  ## Authentication
31
31
 
32
- The API uses HTTP Basic Authentication.
33
- Include your credentials in the Authorization header:
32
+ The Aspera Shares API supports two authentication methods: **HTTP Basic Authentication** and **OAuth 2.0 Bearer Authentication**.
34
33
 
35
- ```
34
+ ### 1. HTTP Basic Authentication
35
+
36
+ Include your username and password encoded in Base64 in the `Authorization` header:
37
+
38
+ ```http
36
39
  Authorization: Basic base64(username:password)
37
40
  ```
38
41
 
42
+ ### 2. OAuth 2.0 Authentication
43
+
44
+ When SAML authentication is configured, clients can obtain and use OAuth 2.0 access tokens.
45
+
46
+ #### Obtaining an Access Token (SAML 2.0 Bearer Assertion)
47
+
48
+ Exchange a base64-encoded SAML 2.0 assertion for an access token via `POST /auth/oauth2/token`:
49
+
50
+ ```http
51
+ POST /auth/oauth2/token
52
+ Content-Type: application/x-www-form-urlencoded
53
+
54
+ grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer&assertion=<base64_encoded_saml_assertion>
55
+ ```
56
+
57
+ #### Refreshing an Access Token
58
+
59
+ Refresh a previously issued access token before it expires:
60
+
61
+ ```http
62
+ POST /auth/oauth2/token
63
+ Content-Type: application/x-www-form-urlencoded
64
+
65
+ grant_type=refresh_token&refresh_token=<refresh_token>
66
+ ```
67
+
68
+ #### Token Response
69
+
70
+ The token endpoint returns a JSON payload containing the access and refresh tokens:
71
+
72
+ ```json
73
+ {
74
+ "token_type": "bearer",
75
+ "access_token": "<access_token>",
76
+ "refresh_token": "<refresh_token>",
77
+ "expires_in": 86400
78
+ }
79
+ ```
80
+
81
+ #### Using the Bearer Token
82
+
83
+ Include the `access_token` in the `Authorization` header of subsequent API requests:
84
+
85
+ ```http
86
+ Authorization: Bearer <access_token>
87
+ ```
88
+
39
89
  ## Base URLs
40
90
 
41
91
  - `/node_api` - API for file and transfer operation. A subset of HSTS Node API.
@@ -49,11 +99,16 @@ servers:
49
99
  description: Your Aspera Shares hostname
50
100
  security:
51
101
  - basicAuth: []
102
+ - bearerAuth: []
52
103
  tags:
53
104
  - name: Information
54
- description: Information information and health checks
105
+ description: System status and health checks
55
106
  - name: API Information
56
107
  description: List of base endpoints and their capabilities
108
+ - name: Authentication
109
+ description: User authentication and OAuth2 token management
110
+ - name: Directories
111
+ description: Authentication directory services and queries
57
112
  - name: Files
58
113
  description: File operations (browse, info, create, rename, delete)
59
114
  - name: Node Transfers
@@ -62,6 +117,7 @@ tags:
62
117
  description: Watch folder management and monitoring
63
118
  - name: Users
64
119
  description: |
120
+ User management and directory user lookups.
65
121
  To create users, refer to Local User Management, SAML User Management, or LDAP User Management.
66
122
  However, delete occurs under Authorizable Users although you can also delete local users from Local User Management.
67
123
  It is important to note that only when the user type is database will the `local_user_id` be returned.
@@ -69,9 +125,9 @@ tags:
69
125
  > [!NOTE]
70
126
  > Manager authorization to these resources depends on the configuration option selected in the UI.
71
127
  - name: Groups
72
- description: Group management
128
+ description: Group management and directory group lookups
73
129
  - name: Shares
74
- description: Share management and operations
130
+ description: Share management, accessible shares, and transfer events
75
131
  - name: Nodes
76
132
  description: Node management
77
133
  - name: Transfer Settings
@@ -86,8 +142,13 @@ x-tagGroups:
86
142
  - Files
87
143
  - Node Transfers
88
144
  - Watch Folder
145
+ - name: Authentication & Directories
146
+ tags:
147
+ - Authentication
148
+ - Directories
89
149
  - name: Administrative
90
150
  tags:
151
+ - API Information
91
152
  - Users
92
153
  - Groups
93
154
  - Shares
@@ -95,13 +156,68 @@ x-tagGroups:
95
156
  - Transfer Settings
96
157
  - SMTP Servers
97
158
  paths:
159
+ # Health Check & Authentication
160
+ /health_check:
161
+ get:
162
+ tags:
163
+ - Information
164
+ summary: System health check
165
+ description: |
166
+ Returns the health status of the Aspera Shares instance.
167
+ Validates license status (or entitlement licensing) and connectivity to all configured transfer nodes.
168
+ operationId: getHealthCheck
169
+ security: []
170
+ responses:
171
+ "200":
172
+ description: System is healthy (valid license and all nodes active)
173
+ content:
174
+ application/json:
175
+ schema:
176
+ $ref: "#/components/schemas/HealthCheckResponse"
177
+ "500":
178
+ description: System is unhealthy (invalid license or one or more nodes unreachable)
179
+ content:
180
+ application/json:
181
+ schema:
182
+ $ref: "#/components/schemas/HealthCheckResponse"
183
+ /auth/oauth2/token:
184
+ post:
185
+ tags:
186
+ - Authentication
187
+ summary: Request or refresh OAuth2 access token
188
+ description: |
189
+ Exchange a SAML 2.0 assertion for an OAuth2 bearer access token, or exchange a refresh token for a new access token.
190
+ operationId: createOAuth2Token
191
+ security: []
192
+ requestBody:
193
+ required: true
194
+ content:
195
+ application/x-www-form-urlencoded:
196
+ schema:
197
+ $ref: "#/components/schemas/OAuth2TokenRequest"
198
+ application/json:
199
+ schema:
200
+ $ref: "#/components/schemas/OAuth2TokenRequest"
201
+ responses:
202
+ "200":
203
+ description: OAuth2 access token successfully generated
204
+ content:
205
+ application/json:
206
+ schema:
207
+ $ref: "#/components/schemas/OAuth2TokenResponse"
208
+ "400":
209
+ description: Bad request (invalid assertion, invalid refresh token, or unsupported grant type)
210
+ content:
211
+ application/json:
212
+ schema:
213
+ $ref: "#/components/schemas/OAuth2ErrorResponse"
98
214
  # API v1 Endpoints
99
215
  /api/v1:
100
216
  get:
101
217
  tags:
102
218
  - API Information
103
219
  summary: Get API v1 information
104
- description: Returns general information about API v1
220
+ description: Returns general information about API v1 and links to core services
105
221
  operationId: getApiV1Info
106
222
  responses:
107
223
  "200":
@@ -130,6 +246,255 @@ paths:
130
246
  - links
131
247
  "401":
132
248
  $ref: "#/components/responses/Unauthorized"
249
+ /api/v1/authenticate:
250
+ post:
251
+ tags:
252
+ - Authentication
253
+ summary: Authenticate user credentials
254
+ description: |
255
+ Authenticates a user against all configured authentication directories (Local Database, LDAP, SAML).
256
+ Optionally verifies that the user possesses a specific permission (e.g. `app.admin`, `app.login`, `app.share_manager`).
257
+ operationId: authenticateUser
258
+ requestBody:
259
+ required: true
260
+ content:
261
+ application/json:
262
+ schema:
263
+ $ref: "#/components/schemas/AuthenticateRequest"
264
+ responses:
265
+ "200":
266
+ description: User authenticated successfully or authentication error object
267
+ content:
268
+ application/json:
269
+ schema:
270
+ $ref: "#/components/schemas/DirectoryUserDetail"
271
+ "401":
272
+ $ref: "#/components/responses/Unauthorized"
273
+ # Directory Endpoints
274
+ /api/v1/directories:
275
+ get:
276
+ tags:
277
+ - Directories
278
+ summary: List authentication directories
279
+ description: Returns the list of all configured authentication directories in the Shares system.
280
+ operationId: listDirectories
281
+ responses:
282
+ "200":
283
+ description: List of configured directories
284
+ content:
285
+ application/json:
286
+ schema:
287
+ type: array
288
+ items:
289
+ $ref: "#/components/schemas/DirectorySummary"
290
+ "401":
291
+ $ref: "#/components/responses/Unauthorized"
292
+ /api/v1/directories/{id}:
293
+ get:
294
+ tags:
295
+ - Directories
296
+ summary: Get directory details
297
+ description: Returns detailed information for a specific authentication directory identified by its URN.
298
+ operationId: getDirectory
299
+ parameters:
300
+ - $ref: "#/components/parameters/UrnIdInPath"
301
+ responses:
302
+ "200":
303
+ description: Directory details
304
+ content:
305
+ application/json:
306
+ schema:
307
+ $ref: "#/components/schemas/DirectorySummary"
308
+ "401":
309
+ $ref: "#/components/responses/Unauthorized"
310
+ "404":
311
+ $ref: "#/components/responses/NotFound"
312
+ /api/v1/directories/{directory_id}/users:
313
+ get:
314
+ tags:
315
+ - Directories
316
+ summary: Search users in a directory
317
+ description: Searches or lists users belonging to a specific directory identified by its URN.
318
+ operationId: searchDirectoryUsers
319
+ parameters:
320
+ - $ref: "#/components/parameters/DirectoryIdInPath"
321
+ - $ref: "#/components/parameters/SearchQueryParam"
322
+ responses:
323
+ "200":
324
+ description: Collection of users found in the directory
325
+ content:
326
+ application/json:
327
+ schema:
328
+ $ref: "#/components/schemas/UserCollectionResource"
329
+ "401":
330
+ $ref: "#/components/responses/Unauthorized"
331
+ "404":
332
+ $ref: "#/components/responses/NotFound"
333
+ /api/v1/directories/{directory_id}/groups:
334
+ get:
335
+ tags:
336
+ - Directories
337
+ summary: Search groups in a directory
338
+ description: Searches or lists groups belonging to a specific directory identified by its URN.
339
+ operationId: searchDirectoryGroups
340
+ parameters:
341
+ - $ref: "#/components/parameters/DirectoryIdInPath"
342
+ - $ref: "#/components/parameters/SearchQueryParam"
343
+ responses:
344
+ "200":
345
+ description: Collection of groups found in the directory
346
+ content:
347
+ application/json:
348
+ schema:
349
+ $ref: "#/components/schemas/GroupCollectionResource"
350
+ "401":
351
+ $ref: "#/components/responses/Unauthorized"
352
+ "404":
353
+ $ref: "#/components/responses/NotFound"
354
+ # Directory User & Group Lookups
355
+ /api/v1/users:
356
+ get:
357
+ tags:
358
+ - Users
359
+ summary: Search users across all directories
360
+ description: Searches for users across all active directories (Local Database, LDAP, SAML).
361
+ operationId: searchUsers
362
+ parameters:
363
+ - $ref: "#/components/parameters/SearchQueryParam"
364
+ responses:
365
+ "200":
366
+ description: Collection of matching users
367
+ content:
368
+ application/json:
369
+ schema:
370
+ $ref: "#/components/schemas/UserCollectionResource"
371
+ "401":
372
+ $ref: "#/components/responses/Unauthorized"
373
+ /api/v1/users/{id}:
374
+ get:
375
+ tags:
376
+ - Users
377
+ summary: Get directory user details by URN
378
+ description: Returns full directory user details, including group memberships and permissions, for a user identified by their URN.
379
+ operationId: getDirectoryUser
380
+ parameters:
381
+ - $ref: "#/components/parameters/UrnIdInPath"
382
+ responses:
383
+ "200":
384
+ description: Directory user details
385
+ content:
386
+ application/json:
387
+ schema:
388
+ $ref: "#/components/schemas/DirectoryUserDetail"
389
+ "401":
390
+ $ref: "#/components/responses/Unauthorized"
391
+ "404":
392
+ $ref: "#/components/responses/NotFound"
393
+ /api/v1/groups:
394
+ get:
395
+ tags:
396
+ - Groups
397
+ summary: Search groups across all directories
398
+ description: Searches for groups across all active directories (Local Database, LDAP, SAML).
399
+ operationId: searchGroups
400
+ parameters:
401
+ - $ref: "#/components/parameters/SearchQueryParam"
402
+ responses:
403
+ "200":
404
+ description: Collection of matching groups
405
+ content:
406
+ application/json:
407
+ schema:
408
+ $ref: "#/components/schemas/GroupCollectionResource"
409
+ "401":
410
+ $ref: "#/components/responses/Unauthorized"
411
+ /api/v1/groups/{id}:
412
+ get:
413
+ tags:
414
+ - Groups
415
+ summary: Get directory group details by URN
416
+ description: Returns full details for a group identified by its URN.
417
+ operationId: getDirectoryGroup
418
+ parameters:
419
+ - $ref: "#/components/parameters/UrnIdInPath"
420
+ responses:
421
+ "200":
422
+ description: Directory group details
423
+ content:
424
+ application/json:
425
+ schema:
426
+ $ref: "#/components/schemas/DirectoryGroupDetail"
427
+ "401":
428
+ $ref: "#/components/responses/Unauthorized"
429
+ "404":
430
+ $ref: "#/components/responses/NotFound"
431
+ /api/v1/groups/{id}/members:
432
+ get:
433
+ tags:
434
+ - Groups
435
+ summary: Search members in a directory group
436
+ description: Searches or lists members within a specific group identified by its URN.
437
+ operationId: searchGroupMembers
438
+ parameters:
439
+ - $ref: "#/components/parameters/UrnIdInPath"
440
+ - $ref: "#/components/parameters/SearchQueryParam"
441
+ responses:
442
+ "200":
443
+ description: Collection of group members
444
+ content:
445
+ application/json:
446
+ schema:
447
+ $ref: "#/components/schemas/UserCollectionResource"
448
+ "401":
449
+ $ref: "#/components/responses/Unauthorized"
450
+ "404":
451
+ $ref: "#/components/responses/NotFound"
452
+ # User Shares and Share Events
453
+ /api/v1/shares:
454
+ get:
455
+ tags:
456
+ - Shares
457
+ summary: List shares accessible by current user
458
+ description: Returns the list of shares that the authenticated API user has permission to access.
459
+ operationId: listUserShares
460
+ responses:
461
+ "200":
462
+ description: List of accessible shares
463
+ content:
464
+ application/json:
465
+ schema:
466
+ $ref: "#/components/schemas/UserSharesList"
467
+ "401":
468
+ $ref: "#/components/responses/Unauthorized"
469
+ /api/v1/shares/{share_id}/events:
470
+ post:
471
+ tags:
472
+ - Shares
473
+ summary: Create share transfer notification event (Faux Transfer)
474
+ description: |
475
+ Notifies Aspera Shares of a completed file transfer on a specific share.
476
+ Queues email notifications to users configured to receive transfer completion alerts for that share.
477
+ operationId: createShareTransferEvent
478
+ parameters:
479
+ - name: share_id
480
+ in: path
481
+ required: true
482
+ schema:
483
+ type: integer
484
+ description: Share ID
485
+ requestBody:
486
+ required: true
487
+ content:
488
+ application/json:
489
+ schema:
490
+ $ref: "#/components/schemas/FauxTransferEventRequest"
491
+ responses:
492
+ "204":
493
+ description: Event processed and notification emails queued
494
+ "401":
495
+ $ref: "#/components/responses/Unauthorized"
496
+ "404":
497
+ $ref: "#/components/responses/NotFound"
133
498
  # User Endpoints
134
499
  /api/v1/data/users:
135
500
  get:
@@ -2536,6 +2901,10 @@ components:
2536
2901
  type: http
2537
2902
  scheme: basic
2538
2903
  description: HTTP Basic Authentication with username and password
2904
+ bearerAuth:
2905
+ type: http
2906
+ scheme: bearer
2907
+ description: OAuth2 Bearer token authentication
2539
2908
  parameters:
2540
2909
  IntegerIdInPath:
2541
2910
  name: id
@@ -2551,7 +2920,450 @@ components:
2551
2920
  schema:
2552
2921
  type: string
2553
2922
  description: Transfer ID
2923
+ UrnIdInPath:
2924
+ name: id
2925
+ in: path
2926
+ required: true
2927
+ schema:
2928
+ type: string
2929
+ description: URN identifier of the entity (URL-encoded)
2930
+ DirectoryIdInPath:
2931
+ name: directory_id
2932
+ in: path
2933
+ required: true
2934
+ schema:
2935
+ type: string
2936
+ description: Directory URN identifier (URL-encoded)
2937
+ SearchQueryParam:
2938
+ name: search
2939
+ in: query
2940
+ required: false
2941
+ schema:
2942
+ type: string
2943
+ description: Search filter query
2554
2944
  schemas:
2945
+ HealthCheckResponse:
2946
+ type: object
2947
+ properties:
2948
+ valid_license:
2949
+ type: boolean
2950
+ description: Indicates whether the standard license is valid
2951
+ example: true
2952
+ entitled:
2953
+ type: boolean
2954
+ description: Indicates whether entitlement licensing is active and valid (Linux only)
2955
+ example: true
2956
+ nodes:
2957
+ type: array
2958
+ description: Connectivity status for each configured node
2959
+ items:
2960
+ type: object
2961
+ required:
2962
+ - id
2963
+ - status
2964
+ properties:
2965
+ id:
2966
+ type: integer
2967
+ description: Node ID
2968
+ example: 1
2969
+ status:
2970
+ type: string
2971
+ description: Node status (e.g. "Active" or error message)
2972
+ example: Active
2973
+
2974
+ OAuth2TokenRequest:
2975
+ type: object
2976
+ required:
2977
+ - grant_type
2978
+ properties:
2979
+ grant_type:
2980
+ type: string
2981
+ enum:
2982
+ - urn:ietf:params:oauth:grant-type:saml2-bearer
2983
+ - refresh_token
2984
+ description: The OAuth2 grant type
2985
+ example: urn:ietf:params:oauth:grant-type:saml2-bearer
2986
+ assertion:
2987
+ type: string
2988
+ description: Base64-encoded SAML 2.0 assertion (required for saml2-bearer grant)
2989
+ refresh_token:
2990
+ type: string
2991
+ description: Refresh token previously issued (required for refresh_token grant)
2992
+
2993
+ OAuth2TokenResponse:
2994
+ type: object
2995
+ required:
2996
+ - token_type
2997
+ - access_token
2998
+ - refresh_token
2999
+ - expires_in
3000
+ properties:
3001
+ token_type:
3002
+ type: string
3003
+ example: bearer
3004
+ access_token:
3005
+ type: string
3006
+ description: OAuth2 access token
3007
+ example: 4a2b9c8d7e6f5a1b
3008
+ refresh_token:
3009
+ type: string
3010
+ description: OAuth2 refresh token
3011
+ example: 9f8e7d6c5b4a3b2a
3012
+ expires_in:
3013
+ type: integer
3014
+ description: Token lifetime in seconds (86400 seconds = 1 day)
3015
+ example: 86400
3016
+
3017
+ OAuth2ErrorResponse:
3018
+ type: object
3019
+ required:
3020
+ - error
3021
+ properties:
3022
+ error:
3023
+ type: string
3024
+ example: invalid_grant
3025
+ error_description:
3026
+ type: string
3027
+ example: Invalid grant
3028
+
3029
+ AuthenticateRequest:
3030
+ type: object
3031
+ required:
3032
+ - username
3033
+ - password
3034
+ properties:
3035
+ username:
3036
+ type: string
3037
+ description: Username for authentication
3038
+ example: admin
3039
+ password:
3040
+ type: string
3041
+ format: password
3042
+ description: Password for authentication
3043
+ example: secret
3044
+ required_permission:
3045
+ type: string
3046
+ description: Optional permission identifier required (e.g. app.admin, app.login, app.share_manager)
3047
+ example: app.admin
3048
+
3049
+ ApiLink:
3050
+ type: object
3051
+ required:
3052
+ - rel
3053
+ - href
3054
+ properties:
3055
+ rel:
3056
+ type: string
3057
+ description: Relation type of the link
3058
+ example: self
3059
+ href:
3060
+ type: string
3061
+ description: URL target of the link
3062
+ example: https://shares.example.com/api/v1/directories/urn:aspera:shares:directory:local_database
3063
+
3064
+ DirectorySummary:
3065
+ type: object
3066
+ required:
3067
+ - id
3068
+ - name
3069
+ - resource_type
3070
+ - type
3071
+ properties:
3072
+ id:
3073
+ type: string
3074
+ description: Unique URN of the directory
3075
+ example: urn:aspera:shares:directory:local_database
3076
+ name:
3077
+ type: string
3078
+ description: Directory display name
3079
+ example: Local Database
3080
+ type:
3081
+ type: string
3082
+ description: Directory provider type (e.g. local_database, active_directory, saml)
3083
+ example: local_database
3084
+ resource_type:
3085
+ type: string
3086
+ example: directory
3087
+ links:
3088
+ type: array
3089
+ items:
3090
+ $ref: "#/components/schemas/ApiLink"
3091
+
3092
+ DirectoryPermissionSummary:
3093
+ type: object
3094
+ required:
3095
+ - id
3096
+ - name
3097
+ - resource_type
3098
+ properties:
3099
+ id:
3100
+ type: string
3101
+ description: Permission URN
3102
+ example: urn:aspera:shares:permission:app.admin
3103
+ name:
3104
+ type: string
3105
+ description: Permission name
3106
+ example: app.admin
3107
+ resource_type:
3108
+ type: string
3109
+ example: permission
3110
+ links:
3111
+ type: array
3112
+ items:
3113
+ $ref: "#/components/schemas/ApiLink"
3114
+
3115
+ DirectoryUserSummary:
3116
+ type: object
3117
+ required:
3118
+ - id
3119
+ - name
3120
+ - username
3121
+ - resource_type
3122
+ properties:
3123
+ id:
3124
+ type: string
3125
+ description: Unique URN of the user across directories
3126
+ example: urn:aspera:shares:directory:local_database:user:admin
3127
+ name:
3128
+ type: string
3129
+ description: User display name
3130
+ example: admin
3131
+ username:
3132
+ type: string
3133
+ description: User login name
3134
+ example: admin
3135
+ first_name:
3136
+ type: string
3137
+ nullable: true
3138
+ example: John
3139
+ last_name:
3140
+ type: string
3141
+ nullable: true
3142
+ example: Doe
3143
+ email:
3144
+ type: string
3145
+ format: email
3146
+ nullable: true
3147
+ example: admin@example.com
3148
+ resource_type:
3149
+ type: string
3150
+ example: user
3151
+ directory:
3152
+ $ref: "#/components/schemas/DirectorySummary"
3153
+ links:
3154
+ type: array
3155
+ items:
3156
+ $ref: "#/components/schemas/ApiLink"
3157
+
3158
+ DirectoryUserDetail:
3159
+ type: object
3160
+ required:
3161
+ - id
3162
+ - name
3163
+ - username
3164
+ - resource_type
3165
+ properties:
3166
+ id:
3167
+ type: string
3168
+ description: Unique URN of the user
3169
+ example: urn:aspera:shares:directory:local_database:user:admin
3170
+ name:
3171
+ type: string
3172
+ description: User display name
3173
+ example: admin
3174
+ username:
3175
+ type: string
3176
+ description: User login name
3177
+ example: admin
3178
+ first_name:
3179
+ type: string
3180
+ nullable: true
3181
+ example: John
3182
+ last_name:
3183
+ type: string
3184
+ nullable: true
3185
+ example: Doe
3186
+ email:
3187
+ type: string
3188
+ format: email
3189
+ nullable: true
3190
+ example: admin@example.com
3191
+ resource_type:
3192
+ type: string
3193
+ example: user
3194
+ directory:
3195
+ $ref: "#/components/schemas/DirectorySummary"
3196
+ groups:
3197
+ type: array
3198
+ description: Groups the user belongs to
3199
+ items:
3200
+ $ref: "#/components/schemas/DirectoryGroupSummary"
3201
+ permissions:
3202
+ type: array
3203
+ description: Permissions assigned to the user
3204
+ items:
3205
+ $ref: "#/components/schemas/DirectoryPermissionSummary"
3206
+ links:
3207
+ type: array
3208
+ items:
3209
+ $ref: "#/components/schemas/ApiLink"
3210
+
3211
+ DirectoryGroupSummary:
3212
+ type: object
3213
+ required:
3214
+ - id
3215
+ - name
3216
+ - resource_type
3217
+ properties:
3218
+ id:
3219
+ type: string
3220
+ description: Unique URN of the group
3221
+ example: urn:aspera:shares:directory:local_database:group:administrators
3222
+ name:
3223
+ type: string
3224
+ description: Group display name
3225
+ example: Administrators
3226
+ resource_type:
3227
+ type: string
3228
+ example: group
3229
+ directory:
3230
+ $ref: "#/components/schemas/DirectorySummary"
3231
+ links:
3232
+ type: array
3233
+ items:
3234
+ $ref: "#/components/schemas/ApiLink"
3235
+
3236
+ DirectoryGroupDetail:
3237
+ type: object
3238
+ required:
3239
+ - id
3240
+ - name
3241
+ - resource_type
3242
+ properties:
3243
+ id:
3244
+ type: string
3245
+ description: Unique URN of the group
3246
+ example: urn:aspera:shares:directory:local_database:group:administrators
3247
+ name:
3248
+ type: string
3249
+ description: Group display name
3250
+ example: Administrators
3251
+ resource_type:
3252
+ type: string
3253
+ example: group
3254
+ directory:
3255
+ $ref: "#/components/schemas/DirectorySummary"
3256
+ groups:
3257
+ type: array
3258
+ description: Nested or parent groups
3259
+ items:
3260
+ $ref: "#/components/schemas/DirectoryGroupSummary"
3261
+ links:
3262
+ type: array
3263
+ items:
3264
+ $ref: "#/components/schemas/ApiLink"
3265
+
3266
+ UserCollectionResource:
3267
+ type: object
3268
+ required:
3269
+ - resource_type
3270
+ - complete
3271
+ - members
3272
+ properties:
3273
+ resource_type:
3274
+ type: string
3275
+ example: collection
3276
+ complete:
3277
+ type: boolean
3278
+ description: Indicates whether all matching records are returned (false if truncated by limits)
3279
+ example: true
3280
+ members:
3281
+ type: array
3282
+ description: List of user resources
3283
+ items:
3284
+ $ref: "#/components/schemas/DirectoryUserSummary"
3285
+
3286
+ GroupCollectionResource:
3287
+ type: object
3288
+ required:
3289
+ - resource_type
3290
+ - complete
3291
+ - members
3292
+ properties:
3293
+ resource_type:
3294
+ type: string
3295
+ example: collection
3296
+ complete:
3297
+ type: boolean
3298
+ description: Indicates whether all matching records are returned (false if truncated by limits)
3299
+ example: true
3300
+ members:
3301
+ type: array
3302
+ description: List of group resources
3303
+ items:
3304
+ $ref: "#/components/schemas/DirectoryGroupSummary"
3305
+
3306
+ UserSharesList:
3307
+ type: object
3308
+ required:
3309
+ - shares
3310
+ properties:
3311
+ shares:
3312
+ type: array
3313
+ description: List of shares accessible by the current user
3314
+ items:
3315
+ type: object
3316
+ required:
3317
+ - id
3318
+ - name
3319
+ - directory
3320
+ properties:
3321
+ id:
3322
+ type: integer
3323
+ description: Share ID
3324
+ example: 1
3325
+ name:
3326
+ type: string
3327
+ description: Share display name
3328
+ example: Marketing
3329
+ directory:
3330
+ type: string
3331
+ description: Target path/directory on the node
3332
+ example: /shares/marketing
3333
+
3334
+ FauxTransferEventRequest:
3335
+ type: object
3336
+ required:
3337
+ - faux_transfer
3338
+ properties:
3339
+ faux_transfer:
3340
+ type: object
3341
+ properties:
3342
+ path:
3343
+ type: string
3344
+ description: Destination path on the share
3345
+ example: /marketing/videos
3346
+ bytes_written:
3347
+ type: integer
3348
+ description: Total bytes transferred
3349
+ example: 10485760
3350
+ files_complete:
3351
+ type: integer
3352
+ description: Number of files successfully transferred
3353
+ example: 1
3354
+ files:
3355
+ type: array
3356
+ description: Detailed list of files transferred
3357
+ items:
3358
+ type: object
3359
+ required:
3360
+ - path
3361
+ properties:
3362
+ path:
3363
+ type: string
3364
+ description: Relative path of the transferred file
3365
+ example: /marketing/videos/intro.mp4
3366
+
2555
3367
  # User Schemas
2556
3368
  AuthorizableUser:
2557
3369
  type: object