@celigo/api-specs 0.2.290 → 0.2.292

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 (53) hide show
  1. package/dist/account.yml +70 -59
  2. package/dist/agent.yml +30 -19
  3. package/dist/agentgroup.yml +30 -19
  4. package/dist/ai-agent.yml +31 -20
  5. package/dist/alert.yml +30 -19
  6. package/dist/api.yml +31 -20
  7. package/dist/apim.yml +30 -19
  8. package/dist/asynchelper.yml +48 -37
  9. package/dist/audit.yml +30 -19
  10. package/dist/bartendertemplate.yml +30 -19
  11. package/dist/connection.yml +92 -64
  12. package/dist/connector.yml +30 -19
  13. package/dist/ediprofile.yml +43 -32
  14. package/dist/editransaction.yml +30 -19
  15. package/dist/enduser.yml +30 -19
  16. package/dist/environment.yml +30 -19
  17. package/dist/eventreport.yml +70 -59
  18. package/dist/export.yml +110 -88
  19. package/dist/filedefinition.yml +65 -54
  20. package/dist/fileserver.yml +30 -19
  21. package/dist/filestorage.yml +30 -19
  22. package/dist/flow.yml +31 -20
  23. package/dist/guardrail.yml +70 -59
  24. package/dist/httpconnector.yml +71 -60
  25. package/dist/httpconnectorendpoint.yml +30 -19
  26. package/dist/httpconnectorresource.yml +31 -20
  27. package/dist/iclient.yml +51 -40
  28. package/dist/import.yml +77 -60
  29. package/dist/integration.yml +37 -26
  30. package/dist/job.yml +30 -19
  31. package/dist/lookupcache.yml +35 -24
  32. package/dist/marketplace.yml +30 -19
  33. package/dist/mcp-oauth-provider.yml +42 -31
  34. package/dist/mcp-server.yml +52 -41
  35. package/dist/networkpolicy.yml +30 -19
  36. package/dist/notification.yml +30 -19
  37. package/dist/processor.yml +70 -59
  38. package/dist/profile.yml +43 -32
  39. package/dist/recyclebin.yml +30 -19
  40. package/dist/script.yml +70 -59
  41. package/dist/stack.yml +30 -19
  42. package/dist/state.yml +30 -19
  43. package/dist/storagequery.yml +30 -19
  44. package/dist/subscription.yml +70 -19
  45. package/dist/sync.yml +30 -19
  46. package/dist/tag.yml +46 -35
  47. package/dist/template.yml +30 -19
  48. package/dist/tool.yml +87 -59
  49. package/dist/topic.yml +30 -19
  50. package/dist/tradingpartnerconnector.yml +31 -20
  51. package/dist/user.yml +30 -19
  52. package/package.json +1 -1
  53. package/schemas.json +2 -2
@@ -4854,13 +4854,6 @@ components:
4854
4854
  x-celigo-refModel: topics
4855
4855
  examples:
4856
4856
  - - 6aab2870265e1cf39fcbee4d
4857
- Request:
4858
- type: object
4859
- description: Fields that can be sent when creating or updating an integration.
4860
- required:
4861
- - name
4862
- allOf:
4863
- - $ref: '#/components/schemas/IntegrationBase'
4864
4857
  Error:
4865
4858
  type: object
4866
4859
  description: Standard error response envelope returned by integrator.io APIs.
@@ -4901,6 +4894,13 @@ components:
4901
4894
  - message
4902
4895
  required:
4903
4896
  - errors
4897
+ Request:
4898
+ type: object
4899
+ description: Fields that can be sent when creating or updating an integration.
4900
+ required:
4901
+ - name
4902
+ allOf:
4903
+ - $ref: '#/components/schemas/IntegrationBase'
4904
4904
  JsonPatchOperation:
4905
4905
  type: object
4906
4906
  description: A single JSON Patch operation (RFC 6902).
@@ -5807,29 +5807,34 @@ components:
5807
5807
  responses:
5808
5808
  401-unauthorized:
5809
5809
  description: |-
5810
- Unauthorized. The request lacks a valid bearer token, or the provided token
5811
- failed to authenticate.
5810
+ Unauthorized, in one of two shapes.
5812
5811
 
5813
- Note: the 401 response is produced by the auth middleware **before** the
5814
- request reaches the endpoint handler, so it does **not** follow the
5815
- standard `{errors: [...]}` envelope. Instead the body is a bare
5816
- `{message: string}` object with no `code`, no `errors` array. Callers
5817
- handling 401s should key off the HTTP status and the `message` string,
5818
- not try to destructure an `errors[]`.
5812
+ No valid bearer token: the auth middleware answers before the endpoint
5813
+ handler runs, with a bare `{message: string}` body — no `code`, no
5814
+ `errors` array — so key off the HTTP status and `message`.
5815
+
5816
+ An API token with a custom scope calling an operation its scope does not
5817
+ grant: the token authenticated, and the body is the standard
5818
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
5819
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
5820
+ passed both, a personal access token `GET /v1/exports/{_id}`.
5819
5821
  content:
5820
5822
  application/json:
5821
5823
  schema:
5822
- type: object
5823
- properties:
5824
- message:
5825
- type: string
5826
- description: |-
5827
- Human-readable description of the auth failure. Known values:
5828
- - `"Unauthorized"` — no `Authorization` header on the request.
5829
- - `"Bearer Authentication Failed"` — header present but token
5830
- is invalid, revoked, or expired.
5831
- required:
5832
- - message
5824
+ oneOf:
5825
+ - type: object
5826
+ description: The auth middleware's bare body for a missing or invalid token.
5827
+ properties:
5828
+ message:
5829
+ type: string
5830
+ description: |-
5831
+ Human-readable description of the auth failure. Known values:
5832
+ - `"Unauthorized"` — no `Authorization` header on the request.
5833
+ - `"Bearer Authentication Failed"` — header present but token
5834
+ is invalid, revoked, or expired.
5835
+ required:
5836
+ - message
5837
+ - $ref: '#/components/schemas/Error'
5833
5838
  examples:
5834
5839
  missing_token:
5835
5840
  summary: No Authorization header sent
@@ -5839,6 +5844,12 @@ components:
5839
5844
  summary: Bearer token invalid or revoked
5840
5845
  value:
5841
5846
  message: Bearer Authentication Failed
5847
+ scoped_token:
5848
+ summary: An API token with a custom scope reading a resource
5849
+ value:
5850
+ errors:
5851
+ - code: access_restricted
5852
+ message: You don't have the required permissions to perform the action.
5842
5853
  400-bad-request:
5843
5854
  description: |
5844
5855
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
package/dist/job.yml CHANGED
@@ -2155,29 +2155,34 @@ components:
2155
2155
  responses:
2156
2156
  401-unauthorized:
2157
2157
  description: |-
2158
- Unauthorized. The request lacks a valid bearer token, or the provided token
2159
- failed to authenticate.
2158
+ Unauthorized, in one of two shapes.
2160
2159
 
2161
- Note: the 401 response is produced by the auth middleware **before** the
2162
- request reaches the endpoint handler, so it does **not** follow the
2163
- standard `{errors: [...]}` envelope. Instead the body is a bare
2164
- `{message: string}` object with no `code`, no `errors` array. Callers
2165
- handling 401s should key off the HTTP status and the `message` string,
2166
- not try to destructure an `errors[]`.
2160
+ No valid bearer token: the auth middleware answers before the endpoint
2161
+ handler runs, with a bare `{message: string}` body — no `code`, no
2162
+ `errors` array — so key off the HTTP status and `message`.
2163
+
2164
+ An API token with a custom scope calling an operation its scope does not
2165
+ grant: the token authenticated, and the body is the standard
2166
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
2167
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
2168
+ passed both, a personal access token `GET /v1/exports/{_id}`.
2167
2169
  content:
2168
2170
  application/json:
2169
2171
  schema:
2170
- type: object
2171
- properties:
2172
- message:
2173
- type: string
2174
- description: |-
2175
- Human-readable description of the auth failure. Known values:
2176
- - `"Unauthorized"` — no `Authorization` header on the request.
2177
- - `"Bearer Authentication Failed"` — header present but token
2178
- is invalid, revoked, or expired.
2179
- required:
2180
- - message
2172
+ oneOf:
2173
+ - type: object
2174
+ description: The auth middleware's bare body for a missing or invalid token.
2175
+ properties:
2176
+ message:
2177
+ type: string
2178
+ description: |-
2179
+ Human-readable description of the auth failure. Known values:
2180
+ - `"Unauthorized"` — no `Authorization` header on the request.
2181
+ - `"Bearer Authentication Failed"` — header present but token
2182
+ is invalid, revoked, or expired.
2183
+ required:
2184
+ - message
2185
+ - $ref: '#/components/schemas/Error'
2181
2186
  examples:
2182
2187
  missing_token:
2183
2188
  summary: No Authorization header sent
@@ -2187,6 +2192,12 @@ components:
2187
2192
  summary: Bearer token invalid or revoked
2188
2193
  value:
2189
2194
  message: Bearer Authentication Failed
2195
+ scoped_token:
2196
+ summary: An API token with a custom scope reading a resource
2197
+ value:
2198
+ errors:
2199
+ - code: access_restricted
2200
+ message: You don't have the required permissions to perform the action.
2190
2201
  400-bad-request:
2191
2202
  description: |
2192
2203
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -973,11 +973,6 @@ components:
973
973
  description: When the draft cache expires and will be automatically deleted. Only present when `draft` is `true`.
974
974
  examples:
975
975
  - '2026-05-08T17:29:30.726Z'
976
- Request:
977
- type: object
978
- description: Writable fields for creating or updating a lookup cache.
979
- allOf:
980
- - $ref: '#/components/schemas/LookupCacheBase'
981
976
  Error:
982
977
  type: object
983
978
  description: Standard error response envelope returned by integrator.io APIs.
@@ -1018,6 +1013,11 @@ components:
1018
1013
  - message
1019
1014
  required:
1020
1015
  - errors
1016
+ Request:
1017
+ type: object
1018
+ description: Writable fields for creating or updating a lookup cache.
1019
+ allOf:
1020
+ - $ref: '#/components/schemas/LookupCacheBase'
1021
1021
  JsonPatchOperation:
1022
1022
  type: object
1023
1023
  description: A single JSON Patch operation (RFC 6902).
@@ -1412,29 +1412,34 @@ components:
1412
1412
  responses:
1413
1413
  401-unauthorized:
1414
1414
  description: |-
1415
- Unauthorized. The request lacks a valid bearer token, or the provided token
1416
- failed to authenticate.
1415
+ Unauthorized, in one of two shapes.
1416
+
1417
+ No valid bearer token: the auth middleware answers before the endpoint
1418
+ handler runs, with a bare `{message: string}` body — no `code`, no
1419
+ `errors` array — so key off the HTTP status and `message`.
1417
1420
 
1418
- Note: the 401 response is produced by the auth middleware **before** the
1419
- request reaches the endpoint handler, so it does **not** follow the
1420
- standard `{errors: [...]}` envelope. Instead the body is a bare
1421
- `{message: string}` object with no `code`, no `errors` array. Callers
1422
- handling 401s should key off the HTTP status and the `message` string,
1423
- not try to destructure an `errors[]`.
1421
+ An API token with a custom scope calling an operation its scope does not
1422
+ grant: the token authenticated, and the body is the standard
1423
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1424
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1425
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1424
1426
  content:
1425
1427
  application/json:
1426
1428
  schema:
1427
- type: object
1428
- properties:
1429
- message:
1430
- type: string
1431
- description: |-
1432
- Human-readable description of the auth failure. Known values:
1433
- - `"Unauthorized"` — no `Authorization` header on the request.
1434
- - `"Bearer Authentication Failed"` — header present but token
1435
- is invalid, revoked, or expired.
1436
- required:
1437
- - message
1429
+ oneOf:
1430
+ - type: object
1431
+ description: The auth middleware's bare body for a missing or invalid token.
1432
+ properties:
1433
+ message:
1434
+ type: string
1435
+ description: |-
1436
+ Human-readable description of the auth failure. Known values:
1437
+ - `"Unauthorized"` — no `Authorization` header on the request.
1438
+ - `"Bearer Authentication Failed"` — header present but token
1439
+ is invalid, revoked, or expired.
1440
+ required:
1441
+ - message
1442
+ - $ref: '#/components/schemas/Error'
1438
1443
  examples:
1439
1444
  missing_token:
1440
1445
  summary: No Authorization header sent
@@ -1444,6 +1449,12 @@ components:
1444
1449
  summary: Bearer token invalid or revoked
1445
1450
  value:
1446
1451
  message: Bearer Authentication Failed
1452
+ scoped_token:
1453
+ summary: An API token with a custom scope reading a resource
1454
+ value:
1455
+ errors:
1456
+ - code: access_restricted
1457
+ message: You don't have the required permissions to perform the action.
1447
1458
  400-bad-request:
1448
1459
  description: |
1449
1460
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -961,29 +961,34 @@ components:
961
961
  responses:
962
962
  401-unauthorized:
963
963
  description: |-
964
- Unauthorized. The request lacks a valid bearer token, or the provided token
965
- failed to authenticate.
964
+ Unauthorized, in one of two shapes.
966
965
 
967
- Note: the 401 response is produced by the auth middleware **before** the
968
- request reaches the endpoint handler, so it does **not** follow the
969
- standard `{errors: [...]}` envelope. Instead the body is a bare
970
- `{message: string}` object with no `code`, no `errors` array. Callers
971
- handling 401s should key off the HTTP status and the `message` string,
972
- not try to destructure an `errors[]`.
966
+ No valid bearer token: the auth middleware answers before the endpoint
967
+ handler runs, with a bare `{message: string}` body — no `code`, no
968
+ `errors` array — so key off the HTTP status and `message`.
969
+
970
+ An API token with a custom scope calling an operation its scope does not
971
+ grant: the token authenticated, and the body is the standard
972
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
973
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
974
+ passed both, a personal access token `GET /v1/exports/{_id}`.
973
975
  content:
974
976
  application/json:
975
977
  schema:
976
- type: object
977
- properties:
978
- message:
979
- type: string
980
- description: |-
981
- Human-readable description of the auth failure. Known values:
982
- - `"Unauthorized"` — no `Authorization` header on the request.
983
- - `"Bearer Authentication Failed"` — header present but token
984
- is invalid, revoked, or expired.
985
- required:
986
- - message
978
+ oneOf:
979
+ - type: object
980
+ description: The auth middleware's bare body for a missing or invalid token.
981
+ properties:
982
+ message:
983
+ type: string
984
+ description: |-
985
+ Human-readable description of the auth failure. Known values:
986
+ - `"Unauthorized"` — no `Authorization` header on the request.
987
+ - `"Bearer Authentication Failed"` — header present but token
988
+ is invalid, revoked, or expired.
989
+ required:
990
+ - message
991
+ - $ref: '#/components/schemas/Error'
987
992
  examples:
988
993
  missing_token:
989
994
  summary: No Authorization header sent
@@ -993,5 +998,11 @@ components:
993
998
  summary: Bearer token invalid or revoked
994
999
  value:
995
1000
  message: Bearer Authentication Failed
1001
+ scoped_token:
1002
+ summary: An API token with a custom scope reading a resource
1003
+ value:
1004
+ errors:
1005
+ - code: access_restricted
1006
+ message: You don't have the required permissions to perform the action.
996
1007
  x-enable-proxy: true
997
1008
  x-internal: false
@@ -452,18 +452,6 @@ components:
452
452
  description: Owning user ID.
453
453
  examples:
454
454
  - 624cb0346309dc3a543733a2
455
- Request:
456
- type: object
457
- description: |-
458
- Request body for creating or updating an MCP OAuth provider. On PUT,
459
- this is a full replacement; include all fields you want to keep because
460
- omitted optional fields are cleared.
461
- required:
462
- - name
463
- - issuerURL
464
- - audience
465
- allOf:
466
- - $ref: '#/components/schemas/MCPOAuthProviderBase'
467
455
  Error:
468
456
  type: object
469
457
  description: Standard error response envelope returned by integrator.io APIs.
@@ -504,32 +492,49 @@ components:
504
492
  - message
505
493
  required:
506
494
  - errors
495
+ Request:
496
+ type: object
497
+ description: |-
498
+ Request body for creating or updating an MCP OAuth provider. On PUT,
499
+ this is a full replacement; include all fields you want to keep because
500
+ omitted optional fields are cleared.
501
+ required:
502
+ - name
503
+ - issuerURL
504
+ - audience
505
+ allOf:
506
+ - $ref: '#/components/schemas/MCPOAuthProviderBase'
507
507
  responses:
508
508
  401-unauthorized:
509
509
  description: |-
510
- Unauthorized. The request lacks a valid bearer token, or the provided token
511
- failed to authenticate.
510
+ Unauthorized, in one of two shapes.
512
511
 
513
- Note: the 401 response is produced by the auth middleware **before** the
514
- request reaches the endpoint handler, so it does **not** follow the
515
- standard `{errors: [...]}` envelope. Instead the body is a bare
516
- `{message: string}` object with no `code`, no `errors` array. Callers
517
- handling 401s should key off the HTTP status and the `message` string,
518
- not try to destructure an `errors[]`.
512
+ No valid bearer token: the auth middleware answers before the endpoint
513
+ handler runs, with a bare `{message: string}` body — no `code`, no
514
+ `errors` array — so key off the HTTP status and `message`.
515
+
516
+ An API token with a custom scope calling an operation its scope does not
517
+ grant: the token authenticated, and the body is the standard
518
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
519
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
520
+ passed both, a personal access token `GET /v1/exports/{_id}`.
519
521
  content:
520
522
  application/json:
521
523
  schema:
522
- type: object
523
- properties:
524
- message:
525
- type: string
526
- description: |-
527
- Human-readable description of the auth failure. Known values:
528
- - `"Unauthorized"` — no `Authorization` header on the request.
529
- - `"Bearer Authentication Failed"` — header present but token
530
- is invalid, revoked, or expired.
531
- required:
532
- - message
524
+ oneOf:
525
+ - type: object
526
+ description: The auth middleware's bare body for a missing or invalid token.
527
+ properties:
528
+ message:
529
+ type: string
530
+ description: |-
531
+ Human-readable description of the auth failure. Known values:
532
+ - `"Unauthorized"` — no `Authorization` header on the request.
533
+ - `"Bearer Authentication Failed"` — header present but token
534
+ is invalid, revoked, or expired.
535
+ required:
536
+ - message
537
+ - $ref: '#/components/schemas/Error'
533
538
  examples:
534
539
  missing_token:
535
540
  summary: No Authorization header sent
@@ -539,6 +544,12 @@ components:
539
544
  summary: Bearer token invalid or revoked
540
545
  value:
541
546
  message: Bearer Authentication Failed
547
+ scoped_token:
548
+ summary: An API token with a custom scope reading a resource
549
+ value:
550
+ errors:
551
+ - code: access_restricted
552
+ message: You don't have the required permissions to perform the action.
542
553
  400-bad-request:
543
554
  description: |
544
555
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -4795,28 +4795,6 @@ components:
4795
4795
  - |-
4796
4796
  Contains the complete MCP server configuration including metadata,
4797
4797
  tool entries, API entries, and their override settings.
4798
- Request:
4799
- type: object
4800
- description: |-
4801
- Request body for creating or updating an MCP server. On PUT, include the
4802
- full `connections`, `tools`, `apis`, `prompts`, `resources`,
4803
- `permissionSets`, and `policies` arrays because omitted arrays are
4804
- cleared; `upstreamMcpConnections`, `_networkPolicyId` and `logging` are
4805
- the exceptions and keep their stored value when omitted. Every array entry
4806
- must be an object — a `null` entry in `tools`, `apis`, `prompts`,
4807
- `resources`, or `upstreamMcpConnections` is rejected with 422
4808
- `mcp_server_invalid_array_item`. Use PATCH to update individual fields
4809
- without affecting these arrays.
4810
- x-celigo-ai-guidance:
4811
- - |-
4812
- MCP servers expose Celigo tools, builder-mode APIs,
4813
- and inline prompt templates as MCP-compatible endpoints for consumption by AI
4814
- agents and MCP clients.
4815
- required:
4816
- - name
4817
- - relativeURI
4818
- allOf:
4819
- - $ref: '#/components/schemas/MCPServerBase'
4820
4798
  Error:
4821
4799
  type: object
4822
4800
  description: Standard error response envelope returned by integrator.io APIs.
@@ -4857,6 +4835,28 @@ components:
4857
4835
  - message
4858
4836
  required:
4859
4837
  - errors
4838
+ Request:
4839
+ type: object
4840
+ description: |-
4841
+ Request body for creating or updating an MCP server. On PUT, include the
4842
+ full `connections`, `tools`, `apis`, `prompts`, `resources`,
4843
+ `permissionSets`, and `policies` arrays because omitted arrays are
4844
+ cleared; `upstreamMcpConnections`, `_networkPolicyId` and `logging` are
4845
+ the exceptions and keep their stored value when omitted. Every array entry
4846
+ must be an object — a `null` entry in `tools`, `apis`, `prompts`,
4847
+ `resources`, or `upstreamMcpConnections` is rejected with 422
4848
+ `mcp_server_invalid_array_item`. Use PATCH to update individual fields
4849
+ without affecting these arrays.
4850
+ x-celigo-ai-guidance:
4851
+ - |-
4852
+ MCP servers expose Celigo tools, builder-mode APIs,
4853
+ and inline prompt templates as MCP-compatible endpoints for consumption by AI
4854
+ agents and MCP clients.
4855
+ required:
4856
+ - name
4857
+ - relativeURI
4858
+ allOf:
4859
+ - $ref: '#/components/schemas/MCPServerBase'
4860
4860
  JsonPatchOperation:
4861
4861
  type: object
4862
4862
  description: A single JSON Patch operation (RFC 6902).
@@ -12105,29 +12105,34 @@ components:
12105
12105
  responses:
12106
12106
  401-unauthorized:
12107
12107
  description: |-
12108
- Unauthorized. The request lacks a valid bearer token, or the provided token
12109
- failed to authenticate.
12108
+ Unauthorized, in one of two shapes.
12110
12109
 
12111
- Note: the 401 response is produced by the auth middleware **before** the
12112
- request reaches the endpoint handler, so it does **not** follow the
12113
- standard `{errors: [...]}` envelope. Instead the body is a bare
12114
- `{message: string}` object with no `code`, no `errors` array. Callers
12115
- handling 401s should key off the HTTP status and the `message` string,
12116
- not try to destructure an `errors[]`.
12110
+ No valid bearer token: the auth middleware answers before the endpoint
12111
+ handler runs, with a bare `{message: string}` body — no `code`, no
12112
+ `errors` array — so key off the HTTP status and `message`.
12113
+
12114
+ An API token with a custom scope calling an operation its scope does not
12115
+ grant: the token authenticated, and the body is the standard
12116
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
12117
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
12118
+ passed both, a personal access token `GET /v1/exports/{_id}`.
12117
12119
  content:
12118
12120
  application/json:
12119
12121
  schema:
12120
- type: object
12121
- properties:
12122
- message:
12123
- type: string
12124
- description: |-
12125
- Human-readable description of the auth failure. Known values:
12126
- - `"Unauthorized"` — no `Authorization` header on the request.
12127
- - `"Bearer Authentication Failed"` — header present but token
12128
- is invalid, revoked, or expired.
12129
- required:
12130
- - message
12122
+ oneOf:
12123
+ - type: object
12124
+ description: The auth middleware's bare body for a missing or invalid token.
12125
+ properties:
12126
+ message:
12127
+ type: string
12128
+ description: |-
12129
+ Human-readable description of the auth failure. Known values:
12130
+ - `"Unauthorized"` — no `Authorization` header on the request.
12131
+ - `"Bearer Authentication Failed"` — header present but token
12132
+ is invalid, revoked, or expired.
12133
+ required:
12134
+ - message
12135
+ - $ref: '#/components/schemas/Error'
12131
12136
  examples:
12132
12137
  missing_token:
12133
12138
  summary: No Authorization header sent
@@ -12137,6 +12142,12 @@ components:
12137
12142
  summary: Bearer token invalid or revoked
12138
12143
  value:
12139
12144
  message: Bearer Authentication Failed
12145
+ scoped_token:
12146
+ summary: An API token with a custom scope reading a resource
12147
+ value:
12148
+ errors:
12149
+ - code: access_restricted
12150
+ message: You don't have the required permissions to perform the action.
12140
12151
  400-bad-request:
12141
12152
  description: |
12142
12153
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -1149,29 +1149,34 @@ components:
1149
1149
  message: The request body failed validation.
1150
1150
  401-unauthorized:
1151
1151
  description: |-
1152
- Unauthorized. The request lacks a valid bearer token, or the provided token
1153
- failed to authenticate.
1152
+ Unauthorized, in one of two shapes.
1154
1153
 
1155
- Note: the 401 response is produced by the auth middleware **before** the
1156
- request reaches the endpoint handler, so it does **not** follow the
1157
- standard `{errors: [...]}` envelope. Instead the body is a bare
1158
- `{message: string}` object with no `code`, no `errors` array. Callers
1159
- handling 401s should key off the HTTP status and the `message` string,
1160
- not try to destructure an `errors[]`.
1154
+ No valid bearer token: the auth middleware answers before the endpoint
1155
+ handler runs, with a bare `{message: string}` body — no `code`, no
1156
+ `errors` array — so key off the HTTP status and `message`.
1157
+
1158
+ An API token with a custom scope calling an operation its scope does not
1159
+ grant: the token authenticated, and the body is the standard
1160
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1161
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1162
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1161
1163
  content:
1162
1164
  application/json:
1163
1165
  schema:
1164
- type: object
1165
- properties:
1166
- message:
1167
- type: string
1168
- description: |-
1169
- Human-readable description of the auth failure. Known values:
1170
- - `"Unauthorized"` — no `Authorization` header on the request.
1171
- - `"Bearer Authentication Failed"` — header present but token
1172
- is invalid, revoked, or expired.
1173
- required:
1174
- - message
1166
+ oneOf:
1167
+ - type: object
1168
+ description: The auth middleware's bare body for a missing or invalid token.
1169
+ properties:
1170
+ message:
1171
+ type: string
1172
+ description: |-
1173
+ Human-readable description of the auth failure. Known values:
1174
+ - `"Unauthorized"` — no `Authorization` header on the request.
1175
+ - `"Bearer Authentication Failed"` — header present but token
1176
+ is invalid, revoked, or expired.
1177
+ required:
1178
+ - message
1179
+ - $ref: '#/components/schemas/Error'
1175
1180
  examples:
1176
1181
  missing_token:
1177
1182
  summary: No Authorization header sent
@@ -1181,6 +1186,12 @@ components:
1181
1186
  summary: Bearer token invalid or revoked
1182
1187
  value:
1183
1188
  message: Bearer Authentication Failed
1189
+ scoped_token:
1190
+ summary: An API token with a custom scope reading a resource
1191
+ value:
1192
+ errors:
1193
+ - code: access_restricted
1194
+ message: You don't have the required permissions to perform the action.
1184
1195
  422-unprocessable-entity:
1185
1196
  description: |
1186
1197
  Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.