@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
@@ -1060,6 +1060,46 @@ components:
1060
1060
  description: Display name for this version (e.g. `v3`).
1061
1061
  examples:
1062
1062
  - v1
1063
+ Error:
1064
+ type: object
1065
+ description: Standard error response envelope returned by integrator.io APIs.
1066
+ properties:
1067
+ errors:
1068
+ type: array
1069
+ description: List of errors that occurred while processing the request.
1070
+ items:
1071
+ type: object
1072
+ properties:
1073
+ code:
1074
+ oneOf:
1075
+ - type: string
1076
+ - type: integer
1077
+ description: |-
1078
+ Machine-readable error code. Usually a string like
1079
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
1080
+ may be an **integer** when the error mirrors an upstream HTTP
1081
+ status (e.g. `500`) — most commonly returned by connection-ping
1082
+ and adaptor-proxy responses.
1083
+ message:
1084
+ type: string
1085
+ description: Human-readable description of the error.
1086
+ field:
1087
+ type: string
1088
+ description: |-
1089
+ Optional pointer to the document field that caused the error.
1090
+ Used by structural validation errors (`missing_required_field`,
1091
+ `invalid_ref`) to indicate which field is at fault
1092
+ (e.g. `_id`, `type`, `http.baseURI`).
1093
+ source:
1094
+ type: string
1095
+ description: |-
1096
+ Optional origin layer for the error — e.g. `application` when
1097
+ the error came from the remote system the adaptor called,
1098
+ `connector` when the adaptor itself rejected the request.
1099
+ required:
1100
+ - message
1101
+ required:
1102
+ - errors
1063
1103
  Versioning:
1064
1104
  type: object
1065
1105
  description: |-
@@ -2715,46 +2755,6 @@ components:
2715
2755
  description: Name of the resolved version.
2716
2756
  examples:
2717
2757
  - v3
2718
- Error:
2719
- type: object
2720
- description: Standard error response envelope returned by integrator.io APIs.
2721
- properties:
2722
- errors:
2723
- type: array
2724
- description: List of errors that occurred while processing the request.
2725
- items:
2726
- type: object
2727
- properties:
2728
- code:
2729
- oneOf:
2730
- - type: string
2731
- - type: integer
2732
- description: |-
2733
- Machine-readable error code. Usually a string like
2734
- `invalid_ref`, `missing_required_field`, or `unauthorized`;
2735
- may be an **integer** when the error mirrors an upstream HTTP
2736
- status (e.g. `500`) — most commonly returned by connection-ping
2737
- and adaptor-proxy responses.
2738
- message:
2739
- type: string
2740
- description: Human-readable description of the error.
2741
- field:
2742
- type: string
2743
- description: |-
2744
- Optional pointer to the document field that caused the error.
2745
- Used by structural validation errors (`missing_required_field`,
2746
- `invalid_ref`) to indicate which field is at fault
2747
- (e.g. `_id`, `type`, `http.baseURI`).
2748
- source:
2749
- type: string
2750
- description: |-
2751
- Optional origin layer for the error — e.g. `application` when
2752
- the error came from the remote system the adaptor called,
2753
- `connector` when the adaptor itself rejected the request.
2754
- required:
2755
- - message
2756
- required:
2757
- - errors
2758
2758
  CatalogEndpointSummary:
2759
2759
  type: object
2760
2760
  required:
@@ -2950,29 +2950,34 @@ components:
2950
2950
  responses:
2951
2951
  401-unauthorized:
2952
2952
  description: |-
2953
- Unauthorized. The request lacks a valid bearer token, or the provided token
2954
- failed to authenticate.
2955
-
2956
- Note: the 401 response is produced by the auth middleware **before** the
2957
- request reaches the endpoint handler, so it does **not** follow the
2958
- standard `{errors: [...]}` envelope. Instead the body is a bare
2959
- `{message: string}` object with no `code`, no `errors` array. Callers
2960
- handling 401s should key off the HTTP status and the `message` string,
2961
- not try to destructure an `errors[]`.
2953
+ Unauthorized, in one of two shapes.
2954
+
2955
+ No valid bearer token: the auth middleware answers before the endpoint
2956
+ handler runs, with a bare `{message: string}` body — no `code`, no
2957
+ `errors` array — so key off the HTTP status and `message`.
2958
+
2959
+ An API token with a custom scope calling an operation its scope does not
2960
+ grant: the token authenticated, and the body is the standard
2961
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
2962
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
2963
+ passed both, a personal access token `GET /v1/exports/{_id}`.
2962
2964
  content:
2963
2965
  application/json:
2964
2966
  schema:
2965
- type: object
2966
- properties:
2967
- message:
2968
- type: string
2969
- description: |-
2970
- Human-readable description of the auth failure. Known values:
2971
- - `"Unauthorized"` — no `Authorization` header on the request.
2972
- - `"Bearer Authentication Failed"` — header present but token
2973
- is invalid, revoked, or expired.
2974
- required:
2975
- - message
2967
+ oneOf:
2968
+ - type: object
2969
+ description: The auth middleware's bare body for a missing or invalid token.
2970
+ properties:
2971
+ message:
2972
+ type: string
2973
+ description: |-
2974
+ Human-readable description of the auth failure. Known values:
2975
+ - `"Unauthorized"` — no `Authorization` header on the request.
2976
+ - `"Bearer Authentication Failed"` — header present but token
2977
+ is invalid, revoked, or expired.
2978
+ required:
2979
+ - message
2980
+ - $ref: '#/components/schemas/Error'
2976
2981
  examples:
2977
2982
  missing_token:
2978
2983
  summary: No Authorization header sent
@@ -2982,6 +2987,12 @@ components:
2982
2987
  summary: Bearer token invalid or revoked
2983
2988
  value:
2984
2989
  message: Bearer Authentication Failed
2990
+ scoped_token:
2991
+ summary: An API token with a custom scope reading a resource
2992
+ value:
2993
+ errors:
2994
+ - code: access_restricted
2995
+ message: You don't have the required permissions to perform the action.
2985
2996
  400-bad-request:
2986
2997
  description: |
2987
2998
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -1133,29 +1133,34 @@ components:
1133
1133
  responses:
1134
1134
  401-unauthorized:
1135
1135
  description: |-
1136
- Unauthorized. The request lacks a valid bearer token, or the provided token
1137
- failed to authenticate.
1136
+ Unauthorized, in one of two shapes.
1138
1137
 
1139
- Note: the 401 response is produced by the auth middleware **before** the
1140
- request reaches the endpoint handler, so it does **not** follow the
1141
- standard `{errors: [...]}` envelope. Instead the body is a bare
1142
- `{message: string}` object with no `code`, no `errors` array. Callers
1143
- handling 401s should key off the HTTP status and the `message` string,
1144
- not try to destructure an `errors[]`.
1138
+ No valid bearer token: the auth middleware answers before the endpoint
1139
+ handler runs, with a bare `{message: string}` body — no `code`, no
1140
+ `errors` array — so key off the HTTP status and `message`.
1141
+
1142
+ An API token with a custom scope calling an operation its scope does not
1143
+ grant: the token authenticated, and the body is the standard
1144
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1145
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1146
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1145
1147
  content:
1146
1148
  application/json:
1147
1149
  schema:
1148
- type: object
1149
- properties:
1150
- message:
1151
- type: string
1152
- description: |-
1153
- Human-readable description of the auth failure. Known values:
1154
- - `"Unauthorized"` — no `Authorization` header on the request.
1155
- - `"Bearer Authentication Failed"` — header present but token
1156
- is invalid, revoked, or expired.
1157
- required:
1158
- - message
1150
+ oneOf:
1151
+ - type: object
1152
+ description: The auth middleware's bare body for a missing or invalid token.
1153
+ properties:
1154
+ message:
1155
+ type: string
1156
+ description: |-
1157
+ Human-readable description of the auth failure. Known values:
1158
+ - `"Unauthorized"` — no `Authorization` header on the request.
1159
+ - `"Bearer Authentication Failed"` — header present but token
1160
+ is invalid, revoked, or expired.
1161
+ required:
1162
+ - message
1163
+ - $ref: '#/components/schemas/Error'
1159
1164
  examples:
1160
1165
  missing_token:
1161
1166
  summary: No Authorization header sent
@@ -1165,6 +1170,12 @@ components:
1165
1170
  summary: Bearer token invalid or revoked
1166
1171
  value:
1167
1172
  message: Bearer Authentication Failed
1173
+ scoped_token:
1174
+ summary: An API token with a custom scope reading a resource
1175
+ value:
1176
+ errors:
1177
+ - code: access_restricted
1178
+ message: You don't have the required permissions to perform the action.
1168
1179
  403-forbidden:
1169
1180
  description: |
1170
1181
  Forbidden. The authenticated caller does not have permission to perform this operation.
@@ -1472,29 +1472,34 @@ components:
1472
1472
  responses:
1473
1473
  401-unauthorized:
1474
1474
  description: |-
1475
- Unauthorized. The request lacks a valid bearer token, or the provided token
1476
- failed to authenticate.
1477
-
1478
- Note: the 401 response is produced by the auth middleware **before** the
1479
- request reaches the endpoint handler, so it does **not** follow the
1480
- standard `{errors: [...]}` envelope. Instead the body is a bare
1481
- `{message: string}` object with no `code`, no `errors` array. Callers
1482
- handling 401s should key off the HTTP status and the `message` string,
1483
- not try to destructure an `errors[]`.
1475
+ Unauthorized, in one of two shapes.
1476
+
1477
+ No valid bearer token: the auth middleware answers before the endpoint
1478
+ handler runs, with a bare `{message: string}` body — no `code`, no
1479
+ `errors` array — so key off the HTTP status and `message`.
1480
+
1481
+ An API token with a custom scope calling an operation its scope does not
1482
+ grant: the token authenticated, and the body is the standard
1483
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1484
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1485
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1484
1486
  content:
1485
1487
  application/json:
1486
1488
  schema:
1487
- type: object
1488
- properties:
1489
- message:
1490
- type: string
1491
- description: |-
1492
- Human-readable description of the auth failure. Known values:
1493
- - `"Unauthorized"` — no `Authorization` header on the request.
1494
- - `"Bearer Authentication Failed"` — header present but token
1495
- is invalid, revoked, or expired.
1496
- required:
1497
- - message
1489
+ oneOf:
1490
+ - type: object
1491
+ description: The auth middleware's bare body for a missing or invalid token.
1492
+ properties:
1493
+ message:
1494
+ type: string
1495
+ description: |-
1496
+ Human-readable description of the auth failure. Known values:
1497
+ - `"Unauthorized"` — no `Authorization` header on the request.
1498
+ - `"Bearer Authentication Failed"` — header present but token
1499
+ is invalid, revoked, or expired.
1500
+ required:
1501
+ - message
1502
+ - $ref: '#/components/schemas/Error'
1498
1503
  examples:
1499
1504
  missing_token:
1500
1505
  summary: No Authorization header sent
@@ -1504,6 +1509,12 @@ components:
1504
1509
  summary: Bearer token invalid or revoked
1505
1510
  value:
1506
1511
  message: Bearer Authentication Failed
1512
+ scoped_token:
1513
+ summary: An API token with a custom scope reading a resource
1514
+ value:
1515
+ errors:
1516
+ - code: access_restricted
1517
+ message: You don't have the required permissions to perform the action.
1507
1518
  403-forbidden:
1508
1519
  description: |
1509
1520
  Forbidden. The authenticated caller does not have permission to perform this operation.
package/dist/iclient.yml CHANGED
@@ -4211,27 +4211,6 @@ components:
4211
4211
  - $ref: '#/components/schemas/IClientBase'
4212
4212
  - $ref: '#/components/schemas/ResourceResponse'
4213
4213
  - $ref: '#/components/schemas/IAResourceResponse'
4214
- Request:
4215
- type: object
4216
- description: |-
4217
- iClient configuration. The shape varies by `provider` — each provider
4218
- requires its own credential sub-object (`oauth2`, `netsuite`,
4219
- `salesforce`, `ebay`, `amazonmws`, `azureserviceprincipal`,
4220
- `googleserviceaccount`, `awsIam`).
4221
- For `custom_oauth2`, credentials go in the `oauth2` sub-object.
4222
- Secrets (`clientSecret`, `privateKey`, and so on) come back masked
4223
- as `"******"`. Re-send that mask on update to keep the stored
4224
- secret; omitting it does not. Two providers differ. A Google
4225
- service account: `serviceAccountJSON` is not returned, and every
4226
- update must send the full key — the mask or an omission fails with
4227
- 422 `invalid_json_key`. An Azure service principal: the stored
4228
- `clientSecret` or `certificate` is kept when its field is omitted
4229
- on update, and only a new value replaces it (`certificate` is never
4230
- returned, not even masked).
4231
- required:
4232
- - provider
4233
- allOf:
4234
- - $ref: '#/components/schemas/IClientBase'
4235
4214
  Error:
4236
4215
  type: object
4237
4216
  description: Standard error response envelope returned by integrator.io APIs.
@@ -4272,6 +4251,27 @@ components:
4272
4251
  - message
4273
4252
  required:
4274
4253
  - errors
4254
+ Request:
4255
+ type: object
4256
+ description: |-
4257
+ iClient configuration. The shape varies by `provider` — each provider
4258
+ requires its own credential sub-object (`oauth2`, `netsuite`,
4259
+ `salesforce`, `ebay`, `amazonmws`, `azureserviceprincipal`,
4260
+ `googleserviceaccount`, `awsIam`).
4261
+ For `custom_oauth2`, credentials go in the `oauth2` sub-object.
4262
+ Secrets (`clientSecret`, `privateKey`, and so on) come back masked
4263
+ as `"******"`. Re-send that mask on update to keep the stored
4264
+ secret; omitting it does not. Two providers differ. A Google
4265
+ service account: `serviceAccountJSON` is not returned, and every
4266
+ update must send the full key — the mask or an omission fails with
4267
+ 422 `invalid_json_key`. An Azure service principal: the stored
4268
+ `clientSecret` or `certificate` is kept when its field is omitted
4269
+ on update, and only a new value replaces it (`certificate` is never
4270
+ returned, not even masked).
4271
+ required:
4272
+ - provider
4273
+ allOf:
4274
+ - $ref: '#/components/schemas/IClientBase'
4275
4275
  DependencyEntry:
4276
4276
  type: object
4277
4277
  description: A single resource that depends on the queried resource.
@@ -4358,29 +4358,34 @@ components:
4358
4358
  responses:
4359
4359
  401-unauthorized:
4360
4360
  description: |-
4361
- Unauthorized. The request lacks a valid bearer token, or the provided token
4362
- failed to authenticate.
4361
+ Unauthorized, in one of two shapes.
4363
4362
 
4364
- Note: the 401 response is produced by the auth middleware **before** the
4365
- request reaches the endpoint handler, so it does **not** follow the
4366
- standard `{errors: [...]}` envelope. Instead the body is a bare
4367
- `{message: string}` object with no `code`, no `errors` array. Callers
4368
- handling 401s should key off the HTTP status and the `message` string,
4369
- not try to destructure an `errors[]`.
4363
+ No valid bearer token: the auth middleware answers before the endpoint
4364
+ handler runs, with a bare `{message: string}` body — no `code`, no
4365
+ `errors` array — so key off the HTTP status and `message`.
4366
+
4367
+ An API token with a custom scope calling an operation its scope does not
4368
+ grant: the token authenticated, and the body is the standard
4369
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
4370
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
4371
+ passed both, a personal access token `GET /v1/exports/{_id}`.
4370
4372
  content:
4371
4373
  application/json:
4372
4374
  schema:
4373
- type: object
4374
- properties:
4375
- message:
4376
- type: string
4377
- description: |-
4378
- Human-readable description of the auth failure. Known values:
4379
- - `"Unauthorized"` — no `Authorization` header on the request.
4380
- - `"Bearer Authentication Failed"` — header present but token
4381
- is invalid, revoked, or expired.
4382
- required:
4383
- - message
4375
+ oneOf:
4376
+ - type: object
4377
+ description: The auth middleware's bare body for a missing or invalid token.
4378
+ properties:
4379
+ message:
4380
+ type: string
4381
+ description: |-
4382
+ Human-readable description of the auth failure. Known values:
4383
+ - `"Unauthorized"` — no `Authorization` header on the request.
4384
+ - `"Bearer Authentication Failed"` — header present but token
4385
+ is invalid, revoked, or expired.
4386
+ required:
4387
+ - message
4388
+ - $ref: '#/components/schemas/Error'
4384
4389
  examples:
4385
4390
  missing_token:
4386
4391
  summary: No Authorization header sent
@@ -4390,6 +4395,12 @@ components:
4390
4395
  summary: Bearer token invalid or revoked
4391
4396
  value:
4392
4397
  message: Bearer Authentication Failed
4398
+ scoped_token:
4399
+ summary: An API token with a custom scope reading a resource
4400
+ value:
4401
+ errors:
4402
+ - code: access_restricted
4403
+ message: You don't have the required permissions to perform the action.
4393
4404
  400-bad-request:
4394
4405
  description: |
4395
4406
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
package/dist/import.yml CHANGED
@@ -9381,6 +9381,12 @@ components:
9381
9381
  `fileName` still writes, naming the file with a hyphenated UTC stamp and no extension
9382
9382
  (`2026-11-07T02-26-06`), so always set one. Live-verified 2026-11-06 with flow runs on
9383
9383
  a Celigo Storage import.
9384
+ - |-
9385
+ On Celigo Storage a file written under a name the destination folder already holds
9386
+ replaces that file's content in place: the folder still lists one item, with the same
9387
+ storage item id, the run reports no error, and the storage activity log records the
9388
+ upload with `overwrite: true`. Live-verified 2026-11-12 with two flow runs of one
9389
+ import that wrote different content under a fixed `fileName`.
9384
9390
  examples:
9385
9391
  - customers-{{timestamp "x"}}.json
9386
9392
  - orders-export.csv
@@ -18816,6 +18822,46 @@ components:
18816
18822
  (`GET /v1/{flows|apis|tools}/{containerId}/{_id}/requests`). Read-only on PUT —
18817
18823
  written only by `PATCH /v1/imports/{_id}` on `/debugUntil`, at most 3600 seconds
18818
18824
  ahead (`422` `update_not_allowed` beyond that); `remove` stops capture.
18825
+ Error:
18826
+ type: object
18827
+ description: Standard error response envelope returned by integrator.io APIs.
18828
+ properties:
18829
+ errors:
18830
+ type: array
18831
+ description: List of errors that occurred while processing the request.
18832
+ items:
18833
+ type: object
18834
+ properties:
18835
+ code:
18836
+ oneOf:
18837
+ - type: string
18838
+ - type: integer
18839
+ description: |-
18840
+ Machine-readable error code. Usually a string like
18841
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
18842
+ may be an **integer** when the error mirrors an upstream HTTP
18843
+ status (e.g. `500`) — most commonly returned by connection-ping
18844
+ and adaptor-proxy responses.
18845
+ message:
18846
+ type: string
18847
+ description: Human-readable description of the error.
18848
+ field:
18849
+ type: string
18850
+ description: |-
18851
+ Optional pointer to the document field that caused the error.
18852
+ Used by structural validation errors (`missing_required_field`,
18853
+ `invalid_ref`) to indicate which field is at fault
18854
+ (e.g. `_id`, `type`, `http.baseURI`).
18855
+ source:
18856
+ type: string
18857
+ description: |-
18858
+ Optional origin layer for the error — e.g. `application` when
18859
+ the error came from the remote system the adaptor called,
18860
+ `connector` when the adaptor itself rejected the request.
18861
+ required:
18862
+ - message
18863
+ required:
18864
+ - errors
18819
18865
  Request:
18820
18866
  type: object
18821
18867
  description: |-
@@ -18953,46 +18999,6 @@ components:
18953
18999
  directory:
18954
19000
  required:
18955
19001
  - storageRootId
18956
- Error:
18957
- type: object
18958
- description: Standard error response envelope returned by integrator.io APIs.
18959
- properties:
18960
- errors:
18961
- type: array
18962
- description: List of errors that occurred while processing the request.
18963
- items:
18964
- type: object
18965
- properties:
18966
- code:
18967
- oneOf:
18968
- - type: string
18969
- - type: integer
18970
- description: |-
18971
- Machine-readable error code. Usually a string like
18972
- `invalid_ref`, `missing_required_field`, or `unauthorized`;
18973
- may be an **integer** when the error mirrors an upstream HTTP
18974
- status (e.g. `500`) — most commonly returned by connection-ping
18975
- and adaptor-proxy responses.
18976
- message:
18977
- type: string
18978
- description: Human-readable description of the error.
18979
- field:
18980
- type: string
18981
- description: |-
18982
- Optional pointer to the document field that caused the error.
18983
- Used by structural validation errors (`missing_required_field`,
18984
- `invalid_ref`) to indicate which field is at fault
18985
- (e.g. `_id`, `type`, `http.baseURI`).
18986
- source:
18987
- type: string
18988
- description: |-
18989
- Optional origin layer for the error — e.g. `application` when
18990
- the error came from the remote system the adaptor called,
18991
- `connector` when the adaptor itself rejected the request.
18992
- required:
18993
- - message
18994
- required:
18995
- - errors
18996
19002
  JsonPatchOperation:
18997
19003
  type: object
18998
19004
  description: A single JSON Patch operation (RFC 6902).
@@ -19494,29 +19500,34 @@ components:
19494
19500
  responses:
19495
19501
  401-unauthorized:
19496
19502
  description: |-
19497
- Unauthorized. The request lacks a valid bearer token, or the provided token
19498
- failed to authenticate.
19499
-
19500
- Note: the 401 response is produced by the auth middleware **before** the
19501
- request reaches the endpoint handler, so it does **not** follow the
19502
- standard `{errors: [...]}` envelope. Instead the body is a bare
19503
- `{message: string}` object with no `code`, no `errors` array. Callers
19504
- handling 401s should key off the HTTP status and the `message` string,
19505
- not try to destructure an `errors[]`.
19503
+ Unauthorized, in one of two shapes.
19504
+
19505
+ No valid bearer token: the auth middleware answers before the endpoint
19506
+ handler runs, with a bare `{message: string}` body — no `code`, no
19507
+ `errors` array — so key off the HTTP status and `message`.
19508
+
19509
+ An API token with a custom scope calling an operation its scope does not
19510
+ grant: the token authenticated, and the body is the standard
19511
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
19512
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
19513
+ passed both, a personal access token `GET /v1/exports/{_id}`.
19506
19514
  content:
19507
19515
  application/json:
19508
19516
  schema:
19509
- type: object
19510
- properties:
19511
- message:
19512
- type: string
19513
- description: |-
19514
- Human-readable description of the auth failure. Known values:
19515
- - `"Unauthorized"` — no `Authorization` header on the request.
19516
- - `"Bearer Authentication Failed"` — header present but token
19517
- is invalid, revoked, or expired.
19518
- required:
19519
- - message
19517
+ oneOf:
19518
+ - type: object
19519
+ description: The auth middleware's bare body for a missing or invalid token.
19520
+ properties:
19521
+ message:
19522
+ type: string
19523
+ description: |-
19524
+ Human-readable description of the auth failure. Known values:
19525
+ - `"Unauthorized"` — no `Authorization` header on the request.
19526
+ - `"Bearer Authentication Failed"` — header present but token
19527
+ is invalid, revoked, or expired.
19528
+ required:
19529
+ - message
19530
+ - $ref: '#/components/schemas/Error'
19520
19531
  examples:
19521
19532
  missing_token:
19522
19533
  summary: No Authorization header sent
@@ -19526,6 +19537,12 @@ components:
19526
19537
  summary: Bearer token invalid or revoked
19527
19538
  value:
19528
19539
  message: Bearer Authentication Failed
19540
+ scoped_token:
19541
+ summary: An API token with a custom scope reading a resource
19542
+ value:
19543
+ errors:
19544
+ - code: access_restricted
19545
+ message: You don't have the required permissions to perform the action.
19529
19546
  400-bad-request:
19530
19547
  description: |
19531
19548
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.