@celigo/api-specs 0.2.289 → 0.2.291

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 +46 -30
  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 +71 -60
  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 +85 -68
  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 +103 -81
  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 +72 -50
  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 +1 -1
package/dist/account.yml CHANGED
@@ -596,6 +596,46 @@ components:
596
596
  description: Applications in use, sorted alphabetically by `_id`.
597
597
  items:
598
598
  $ref: '#/components/schemas/ApplicationUsage'
599
+ Error:
600
+ type: object
601
+ description: Standard error response envelope returned by integrator.io APIs.
602
+ properties:
603
+ errors:
604
+ type: array
605
+ description: List of errors that occurred while processing the request.
606
+ items:
607
+ type: object
608
+ properties:
609
+ code:
610
+ oneOf:
611
+ - type: string
612
+ - type: integer
613
+ description: |-
614
+ Machine-readable error code. Usually a string like
615
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
616
+ may be an **integer** when the error mirrors an upstream HTTP
617
+ status (e.g. `500`) — most commonly returned by connection-ping
618
+ and adaptor-proxy responses.
619
+ message:
620
+ type: string
621
+ description: Human-readable description of the error.
622
+ field:
623
+ type: string
624
+ description: |-
625
+ Optional pointer to the document field that caused the error.
626
+ Used by structural validation errors (`missing_required_field`,
627
+ `invalid_ref`) to indicate which field is at fault
628
+ (e.g. `_id`, `type`, `http.baseURI`).
629
+ source:
630
+ type: string
631
+ description: |-
632
+ Optional origin layer for the error — e.g. `application` when
633
+ the error came from the remote system the adaptor called,
634
+ `connector` when the adaptor itself rejected the request.
635
+ required:
636
+ - message
637
+ required:
638
+ - errors
599
639
  SharedAccount:
600
640
  type: object
601
641
  description: |-
@@ -721,46 +761,6 @@ components:
721
761
  examples:
722
762
  - '2025-11-15T12:00:00.000Z'
723
763
  description: Timestamp when this share record was created.
724
- Error:
725
- type: object
726
- description: Standard error response envelope returned by integrator.io APIs.
727
- properties:
728
- errors:
729
- type: array
730
- description: List of errors that occurred while processing the request.
731
- items:
732
- type: object
733
- properties:
734
- code:
735
- oneOf:
736
- - type: string
737
- - type: integer
738
- description: |-
739
- Machine-readable error code. Usually a string like
740
- `invalid_ref`, `missing_required_field`, or `unauthorized`;
741
- may be an **integer** when the error mirrors an upstream HTTP
742
- status (e.g. `500`) — most commonly returned by connection-ping
743
- and adaptor-proxy responses.
744
- message:
745
- type: string
746
- description: Human-readable description of the error.
747
- field:
748
- type: string
749
- description: |-
750
- Optional pointer to the document field that caused the error.
751
- Used by structural validation errors (`missing_required_field`,
752
- `invalid_ref`) to indicate which field is at fault
753
- (e.g. `_id`, `type`, `http.baseURI`).
754
- source:
755
- type: string
756
- description: |-
757
- Optional origin layer for the error — e.g. `application` when
758
- the error came from the remote system the adaptor called,
759
- `connector` when the adaptor itself rejected the request.
760
- required:
761
- - message
762
- required:
763
- - errors
764
764
  StackShare:
765
765
  type: object
766
766
  description: |-
@@ -957,29 +957,34 @@ components:
957
957
  responses:
958
958
  401-unauthorized:
959
959
  description: |-
960
- Unauthorized. The request lacks a valid bearer token, or the provided token
961
- failed to authenticate.
960
+ Unauthorized, in one of two shapes.
962
961
 
963
- Note: the 401 response is produced by the auth middleware **before** the
964
- request reaches the endpoint handler, so it does **not** follow the
965
- standard `{errors: [...]}` envelope. Instead the body is a bare
966
- `{message: string}` object with no `code`, no `errors` array. Callers
967
- handling 401s should key off the HTTP status and the `message` string,
968
- not try to destructure an `errors[]`.
962
+ No valid bearer token: the auth middleware answers before the endpoint
963
+ handler runs, with a bare `{message: string}` body — no `code`, no
964
+ `errors` array — so key off the HTTP status and `message`.
965
+
966
+ An API token with a custom scope calling an operation its scope does not
967
+ grant: the token authenticated, and the body is the standard
968
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
969
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
970
+ passed both, a personal access token `GET /v1/exports/{_id}`.
969
971
  content:
970
972
  application/json:
971
973
  schema:
972
- type: object
973
- properties:
974
- message:
975
- type: string
976
- description: |-
977
- Human-readable description of the auth failure. Known values:
978
- - `"Unauthorized"` — no `Authorization` header on the request.
979
- - `"Bearer Authentication Failed"` — header present but token
980
- is invalid, revoked, or expired.
981
- required:
982
- - message
974
+ oneOf:
975
+ - type: object
976
+ description: The auth middleware's bare body for a missing or invalid token.
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
987
+ - $ref: '#/components/schemas/Error'
983
988
  examples:
984
989
  missing_token:
985
990
  summary: No Authorization header sent
@@ -989,5 +994,11 @@ components:
989
994
  summary: Bearer token invalid or revoked
990
995
  value:
991
996
  message: Bearer Authentication Failed
997
+ scoped_token:
998
+ summary: An API token with a custom scope reading a resource
999
+ value:
1000
+ errors:
1001
+ - code: access_restricted
1002
+ message: You don't have the required permissions to perform the action.
992
1003
  x-enable-proxy: true
993
1004
  x-internal: false
package/dist/agent.yml CHANGED
@@ -945,29 +945,34 @@ components:
945
945
  responses:
946
946
  401-unauthorized:
947
947
  description: |-
948
- Unauthorized. The request lacks a valid bearer token, or the provided token
949
- failed to authenticate.
948
+ Unauthorized, in one of two shapes.
950
949
 
951
- Note: the 401 response is produced by the auth middleware **before** the
952
- request reaches the endpoint handler, so it does **not** follow the
953
- standard `{errors: [...]}` envelope. Instead the body is a bare
954
- `{message: string}` object with no `code`, no `errors` array. Callers
955
- handling 401s should key off the HTTP status and the `message` string,
956
- not try to destructure an `errors[]`.
950
+ No valid bearer token: the auth middleware answers before the endpoint
951
+ handler runs, with a bare `{message: string}` body — no `code`, no
952
+ `errors` array — so key off the HTTP status and `message`.
953
+
954
+ An API token with a custom scope calling an operation its scope does not
955
+ grant: the token authenticated, and the body is the standard
956
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
957
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
958
+ passed both, a personal access token `GET /v1/exports/{_id}`.
957
959
  content:
958
960
  application/json:
959
961
  schema:
960
- type: object
961
- properties:
962
- message:
963
- type: string
964
- description: |-
965
- Human-readable description of the auth failure. Known values:
966
- - `"Unauthorized"` — no `Authorization` header on the request.
967
- - `"Bearer Authentication Failed"` — header present but token
968
- is invalid, revoked, or expired.
969
- required:
970
- - message
962
+ oneOf:
963
+ - type: object
964
+ description: The auth middleware's bare body for a missing or invalid token.
965
+ properties:
966
+ message:
967
+ type: string
968
+ description: |-
969
+ Human-readable description of the auth failure. Known values:
970
+ - `"Unauthorized"` — no `Authorization` header on the request.
971
+ - `"Bearer Authentication Failed"` — header present but token
972
+ is invalid, revoked, or expired.
973
+ required:
974
+ - message
975
+ - $ref: '#/components/schemas/Error'
971
976
  examples:
972
977
  missing_token:
973
978
  summary: No Authorization header sent
@@ -977,6 +982,12 @@ components:
977
982
  summary: Bearer token invalid or revoked
978
983
  value:
979
984
  message: Bearer Authentication Failed
985
+ scoped_token:
986
+ summary: An API token with a custom scope reading a resource
987
+ value:
988
+ errors:
989
+ - code: access_restricted
990
+ message: You don't have the required permissions to perform the action.
980
991
  400-bad-request:
981
992
  description: |
982
993
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -977,29 +977,34 @@ components:
977
977
  responses:
978
978
  401-unauthorized:
979
979
  description: |-
980
- Unauthorized. The request lacks a valid bearer token, or the provided token
981
- failed to authenticate.
980
+ Unauthorized, in one of two shapes.
982
981
 
983
- Note: the 401 response is produced by the auth middleware **before** the
984
- request reaches the endpoint handler, so it does **not** follow the
985
- standard `{errors: [...]}` envelope. Instead the body is a bare
986
- `{message: string}` object with no `code`, no `errors` array. Callers
987
- handling 401s should key off the HTTP status and the `message` string,
988
- not try to destructure an `errors[]`.
982
+ No valid bearer token: the auth middleware answers before the endpoint
983
+ handler runs, with a bare `{message: string}` body — no `code`, no
984
+ `errors` array — so key off the HTTP status and `message`.
985
+
986
+ An API token with a custom scope calling an operation its scope does not
987
+ grant: the token authenticated, and the body is the standard
988
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
989
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
990
+ passed both, a personal access token `GET /v1/exports/{_id}`.
989
991
  content:
990
992
  application/json:
991
993
  schema:
992
- type: object
993
- properties:
994
- message:
995
- type: string
996
- description: |-
997
- Human-readable description of the auth failure. Known values:
998
- - `"Unauthorized"` — no `Authorization` header on the request.
999
- - `"Bearer Authentication Failed"` — header present but token
1000
- is invalid, revoked, or expired.
1001
- required:
1002
- - message
994
+ oneOf:
995
+ - type: object
996
+ description: The auth middleware's bare body for a missing or invalid token.
997
+ properties:
998
+ message:
999
+ type: string
1000
+ description: |-
1001
+ Human-readable description of the auth failure. Known values:
1002
+ - `"Unauthorized"` — no `Authorization` header on the request.
1003
+ - `"Bearer Authentication Failed"` — header present but token
1004
+ is invalid, revoked, or expired.
1005
+ required:
1006
+ - message
1007
+ - $ref: '#/components/schemas/Error'
1003
1008
  examples:
1004
1009
  missing_token:
1005
1010
  summary: No Authorization header sent
@@ -1009,6 +1014,12 @@ components:
1009
1014
  summary: Bearer token invalid or revoked
1010
1015
  value:
1011
1016
  message: Bearer Authentication Failed
1017
+ scoped_token:
1018
+ summary: An API token with a custom scope reading a resource
1019
+ value:
1020
+ errors:
1021
+ - code: access_restricted
1022
+ message: You don't have the required permissions to perform the action.
1012
1023
  403-forbidden:
1013
1024
  description: |
1014
1025
  Forbidden. The authenticated caller does not have permission to perform this operation.
package/dist/ai-agent.yml CHANGED
@@ -1359,13 +1359,12 @@ components:
1359
1359
  uniqueItems: true
1360
1360
  default: []
1361
1361
  description: |-
1362
- Knowledge bases the agent retrieves from, for every provider. An agent with none attached
1363
- returns `[]`, except one whose last POST or PUT predates this field and one after a PATCH
1364
- `remove`: both omit the key. On PUT a non-empty array becomes the stored list (duplicate
1365
- ids collapse to their first occurrence), while omitting the list, `null`, and `[]` keep a
1366
- stored list and write `[]` where the key is absent; clear a stored list with
1367
- `PATCH /v1/imports/{_id}` — `replace` with `[]` or `remove` on
1368
- `/aiAgent/attachedKnowledgeBaseIds`.
1362
+ Knowledge bases the agent retrieves from, for every provider. A PUT stores exactly the list
1363
+ its body carries: an array becomes the stored list (duplicate ids collapse to their first
1364
+ occurrence, `[]` detaches every knowledge base), and a body without the field, or with
1365
+ `null`, removes it. A stored empty list reads back as `[]` — what an agent created without
1366
+ the field gets — and the key is omitted where the list was never written (an agent created
1367
+ before this field existed) or was removed, by such a PUT or by a PATCH `remove`.
1369
1368
  items:
1370
1369
  type: string
1371
1370
  format: objectId
@@ -1377,9 +1376,15 @@ components:
1377
1376
  with 422 `attached_knowledge_base_invalid` naming the ids, and more than 50 distinct
1378
1377
  ids fails with 422 `invalid_field` on `aiAgent.attachedKnowledgeBaseIds`.
1379
1378
  - |-
1380
- Sending `[]` on PUT does not detach anything; use PATCH `replace` with `[]` or
1381
- `remove` on the whole path. PATCH `add` at `/aiAgent/attachedKnowledgeBaseIds/-`
1382
- does not append — it fails with 422 — so send the complete list with `replace`.
1379
+ A PUT that leaves the field out detaches every knowledge base, exactly like `[]` or
1380
+ `null`: when a PUT changes anything else on the agent, send the list back as it was
1381
+ read.
1382
+ - |-
1383
+ To change the list alone use `PATCH /v1/imports/{_id}`: `replace` on
1384
+ `/aiAgent/attachedKnowledgeBaseIds` with the complete list (`[]` detaches all), or `add`
1385
+ at `/aiAgent/attachedKnowledgeBaseIds/-` to append one id — an id already attached
1386
+ changes nothing. `remove` at an array index fails with 422 ("Remove at array index is
1387
+ not supported"), so detach one id by replacing the list without it.
1383
1388
  openai:
1384
1389
  type: object
1385
1390
  description: |
@@ -7294,29 +7299,34 @@ components:
7294
7299
  message: The request body failed validation.
7295
7300
  401-unauthorized:
7296
7301
  description: |-
7297
- Unauthorized. The request lacks a valid bearer token, or the provided token
7298
- failed to authenticate.
7299
-
7300
- Note: the 401 response is produced by the auth middleware **before** the
7301
- request reaches the endpoint handler, so it does **not** follow the
7302
- standard `{errors: [...]}` envelope. Instead the body is a bare
7303
- `{message: string}` object with no `code`, no `errors` array. Callers
7304
- handling 401s should key off the HTTP status and the `message` string,
7305
- not try to destructure an `errors[]`.
7302
+ Unauthorized, in one of two shapes.
7303
+
7304
+ No valid bearer token: the auth middleware answers before the endpoint
7305
+ handler runs, with a bare `{message: string}` body — no `code`, no
7306
+ `errors` array — so key off the HTTP status and `message`.
7307
+
7308
+ An API token with a custom scope calling an operation its scope does not
7309
+ grant: the token authenticated, and the body is the standard
7310
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
7311
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
7312
+ passed both, a personal access token `GET /v1/exports/{_id}`.
7306
7313
  content:
7307
7314
  application/json:
7308
7315
  schema:
7309
- type: object
7310
- properties:
7311
- message:
7312
- type: string
7313
- description: |-
7314
- Human-readable description of the auth failure. Known values:
7315
- - `"Unauthorized"` — no `Authorization` header on the request.
7316
- - `"Bearer Authentication Failed"` — header present but token
7317
- is invalid, revoked, or expired.
7318
- required:
7319
- - message
7316
+ oneOf:
7317
+ - type: object
7318
+ description: The auth middleware's bare body for a missing or invalid token.
7319
+ properties:
7320
+ message:
7321
+ type: string
7322
+ description: |-
7323
+ Human-readable description of the auth failure. Known values:
7324
+ - `"Unauthorized"` — no `Authorization` header on the request.
7325
+ - `"Bearer Authentication Failed"` — header present but token
7326
+ is invalid, revoked, or expired.
7327
+ required:
7328
+ - message
7329
+ - $ref: '#/components/schemas/Error'
7320
7330
  examples:
7321
7331
  missing_token:
7322
7332
  summary: No Authorization header sent
@@ -7326,6 +7336,12 @@ components:
7326
7336
  summary: Bearer token invalid or revoked
7327
7337
  value:
7328
7338
  message: Bearer Authentication Failed
7339
+ scoped_token:
7340
+ summary: An API token with a custom scope reading a resource
7341
+ value:
7342
+ errors:
7343
+ - code: access_restricted
7344
+ message: You don't have the required permissions to perform the action.
7329
7345
  422-unprocessable-entity:
7330
7346
  description: |
7331
7347
  Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
package/dist/alert.yml CHANGED
@@ -1302,29 +1302,34 @@ components:
1302
1302
  message: The request body failed validation.
1303
1303
  401-unauthorized:
1304
1304
  description: |-
1305
- Unauthorized. The request lacks a valid bearer token, or the provided token
1306
- failed to authenticate.
1305
+ Unauthorized, in one of two shapes.
1307
1306
 
1308
- Note: the 401 response is produced by the auth middleware **before** the
1309
- request reaches the endpoint handler, so it does **not** follow the
1310
- standard `{errors: [...]}` envelope. Instead the body is a bare
1311
- `{message: string}` object with no `code`, no `errors` array. Callers
1312
- handling 401s should key off the HTTP status and the `message` string,
1313
- not try to destructure an `errors[]`.
1307
+ No valid bearer token: the auth middleware answers before the endpoint
1308
+ handler runs, with a bare `{message: string}` body — no `code`, no
1309
+ `errors` array — so key off the HTTP status and `message`.
1310
+
1311
+ An API token with a custom scope calling an operation its scope does not
1312
+ grant: the token authenticated, and the body is the standard
1313
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1314
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1315
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1314
1316
  content:
1315
1317
  application/json:
1316
1318
  schema:
1317
- type: object
1318
- properties:
1319
- message:
1320
- type: string
1321
- description: |-
1322
- Human-readable description of the auth failure. Known values:
1323
- - `"Unauthorized"` — no `Authorization` header on the request.
1324
- - `"Bearer Authentication Failed"` — header present but token
1325
- is invalid, revoked, or expired.
1326
- required:
1327
- - message
1319
+ oneOf:
1320
+ - type: object
1321
+ description: The auth middleware's bare body for a missing or invalid token.
1322
+ properties:
1323
+ message:
1324
+ type: string
1325
+ description: |-
1326
+ Human-readable description of the auth failure. Known values:
1327
+ - `"Unauthorized"` — no `Authorization` header on the request.
1328
+ - `"Bearer Authentication Failed"` — header present but token
1329
+ is invalid, revoked, or expired.
1330
+ required:
1331
+ - message
1332
+ - $ref: '#/components/schemas/Error'
1328
1333
  examples:
1329
1334
  missing_token:
1330
1335
  summary: No Authorization header sent
@@ -1334,6 +1339,12 @@ components:
1334
1339
  summary: Bearer token invalid or revoked
1335
1340
  value:
1336
1341
  message: Bearer Authentication Failed
1342
+ scoped_token:
1343
+ summary: An API token with a custom scope reading a resource
1344
+ value:
1345
+ errors:
1346
+ - code: access_restricted
1347
+ message: You don't have the required permissions to perform the action.
1337
1348
  403-forbidden:
1338
1349
  description: |
1339
1350
  Forbidden. The authenticated caller does not have permission to perform this operation.
package/dist/api.yml CHANGED
@@ -14635,29 +14635,34 @@ components:
14635
14635
  message: The request body failed validation.
14636
14636
  401-unauthorized:
14637
14637
  description: |-
14638
- Unauthorized. The request lacks a valid bearer token, or the provided token
14639
- failed to authenticate.
14640
-
14641
- Note: the 401 response is produced by the auth middleware **before** the
14642
- request reaches the endpoint handler, so it does **not** follow the
14643
- standard `{errors: [...]}` envelope. Instead the body is a bare
14644
- `{message: string}` object with no `code`, no `errors` array. Callers
14645
- handling 401s should key off the HTTP status and the `message` string,
14646
- not try to destructure an `errors[]`.
14638
+ Unauthorized, in one of two shapes.
14639
+
14640
+ No valid bearer token: the auth middleware answers before the endpoint
14641
+ handler runs, with a bare `{message: string}` body — no `code`, no
14642
+ `errors` array — so key off the HTTP status and `message`.
14643
+
14644
+ An API token with a custom scope calling an operation its scope does not
14645
+ grant: the token authenticated, and the body is the standard
14646
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
14647
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
14648
+ passed both, a personal access token `GET /v1/exports/{_id}`.
14647
14649
  content:
14648
14650
  application/json:
14649
14651
  schema:
14650
- type: object
14651
- properties:
14652
- message:
14653
- type: string
14654
- description: |-
14655
- Human-readable description of the auth failure. Known values:
14656
- - `"Unauthorized"` — no `Authorization` header on the request.
14657
- - `"Bearer Authentication Failed"` — header present but token
14658
- is invalid, revoked, or expired.
14659
- required:
14660
- - message
14652
+ oneOf:
14653
+ - type: object
14654
+ description: The auth middleware's bare body for a missing or invalid token.
14655
+ properties:
14656
+ message:
14657
+ type: string
14658
+ description: |-
14659
+ Human-readable description of the auth failure. Known values:
14660
+ - `"Unauthorized"` — no `Authorization` header on the request.
14661
+ - `"Bearer Authentication Failed"` — header present but token
14662
+ is invalid, revoked, or expired.
14663
+ required:
14664
+ - message
14665
+ - $ref: '#/components/schemas/Error'
14661
14666
  examples:
14662
14667
  missing_token:
14663
14668
  summary: No Authorization header sent
@@ -14667,6 +14672,12 @@ components:
14667
14672
  summary: Bearer token invalid or revoked
14668
14673
  value:
14669
14674
  message: Bearer Authentication Failed
14675
+ scoped_token:
14676
+ summary: An API token with a custom scope reading a resource
14677
+ value:
14678
+ errors:
14679
+ - code: access_restricted
14680
+ message: You don't have the required permissions to perform the action.
14670
14681
  422-unprocessable-entity:
14671
14682
  description: |
14672
14683
  Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
package/dist/apim.yml CHANGED
@@ -1198,29 +1198,34 @@ components:
1198
1198
  responses:
1199
1199
  401-unauthorized:
1200
1200
  description: |-
1201
- Unauthorized. The request lacks a valid bearer token, or the provided token
1202
- failed to authenticate.
1201
+ Unauthorized, in one of two shapes.
1203
1202
 
1204
- Note: the 401 response is produced by the auth middleware **before** the
1205
- request reaches the endpoint handler, so it does **not** follow the
1206
- standard `{errors: [...]}` envelope. Instead the body is a bare
1207
- `{message: string}` object with no `code`, no `errors` array. Callers
1208
- handling 401s should key off the HTTP status and the `message` string,
1209
- not try to destructure an `errors[]`.
1203
+ No valid bearer token: the auth middleware answers before the endpoint
1204
+ handler runs, with a bare `{message: string}` body — no `code`, no
1205
+ `errors` array — so key off the HTTP status and `message`.
1206
+
1207
+ An API token with a custom scope calling an operation its scope does not
1208
+ grant: the token authenticated, and the body is the standard
1209
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1210
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1211
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1210
1212
  content:
1211
1213
  application/json:
1212
1214
  schema:
1213
- type: object
1214
- properties:
1215
- message:
1216
- type: string
1217
- description: |-
1218
- Human-readable description of the auth failure. Known values:
1219
- - `"Unauthorized"` — no `Authorization` header on the request.
1220
- - `"Bearer Authentication Failed"` — header present but token
1221
- is invalid, revoked, or expired.
1222
- required:
1223
- - message
1215
+ oneOf:
1216
+ - type: object
1217
+ description: The auth middleware's bare body for a missing or invalid token.
1218
+ properties:
1219
+ message:
1220
+ type: string
1221
+ description: |-
1222
+ Human-readable description of the auth failure. Known values:
1223
+ - `"Unauthorized"` — no `Authorization` header on the request.
1224
+ - `"Bearer Authentication Failed"` — header present but token
1225
+ is invalid, revoked, or expired.
1226
+ required:
1227
+ - message
1228
+ - $ref: '#/components/schemas/Error'
1224
1229
  examples:
1225
1230
  missing_token:
1226
1231
  summary: No Authorization header sent
@@ -1230,6 +1235,12 @@ components:
1230
1235
  summary: Bearer token invalid or revoked
1231
1236
  value:
1232
1237
  message: Bearer Authentication Failed
1238
+ scoped_token:
1239
+ summary: An API token with a custom scope reading a resource
1240
+ value:
1241
+ errors:
1242
+ - code: access_restricted
1243
+ message: You don't have the required permissions to perform the action.
1233
1244
  403-forbidden:
1234
1245
  description: |
1235
1246
  Forbidden. The authenticated caller does not have permission to perform this operation.