@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
@@ -3625,29 +3625,34 @@ components:
3625
3625
  responses:
3626
3626
  401-unauthorized:
3627
3627
  description: |-
3628
- Unauthorized. The request lacks a valid bearer token, or the provided token
3629
- failed to authenticate.
3628
+ Unauthorized, in one of two shapes.
3630
3629
 
3631
- Note: the 401 response is produced by the auth middleware **before** the
3632
- request reaches the endpoint handler, so it does **not** follow the
3633
- standard `{errors: [...]}` envelope. Instead the body is a bare
3634
- `{message: string}` object with no `code`, no `errors` array. Callers
3635
- handling 401s should key off the HTTP status and the `message` string,
3636
- not try to destructure an `errors[]`.
3630
+ No valid bearer token: the auth middleware answers before the endpoint
3631
+ handler runs, with a bare `{message: string}` body — no `code`, no
3632
+ `errors` array — so key off the HTTP status and `message`.
3633
+
3634
+ An API token with a custom scope calling an operation its scope does not
3635
+ grant: the token authenticated, and the body is the standard
3636
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
3637
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
3638
+ passed both, a personal access token `GET /v1/exports/{_id}`.
3637
3639
  content:
3638
3640
  application/json:
3639
3641
  schema:
3640
- type: object
3641
- properties:
3642
- message:
3643
- type: string
3644
- description: |-
3645
- Human-readable description of the auth failure. Known values:
3646
- - `"Unauthorized"` — no `Authorization` header on the request.
3647
- - `"Bearer Authentication Failed"` — header present but token
3648
- is invalid, revoked, or expired.
3649
- required:
3650
- - message
3642
+ oneOf:
3643
+ - type: object
3644
+ description: The auth middleware's bare body for a missing or invalid token.
3645
+ properties:
3646
+ message:
3647
+ type: string
3648
+ description: |-
3649
+ Human-readable description of the auth failure. Known values:
3650
+ - `"Unauthorized"` — no `Authorization` header on the request.
3651
+ - `"Bearer Authentication Failed"` — header present but token
3652
+ is invalid, revoked, or expired.
3653
+ required:
3654
+ - message
3655
+ - $ref: '#/components/schemas/Error'
3651
3656
  examples:
3652
3657
  missing_token:
3653
3658
  summary: No Authorization header sent
@@ -3657,6 +3662,12 @@ components:
3657
3662
  summary: Bearer token invalid or revoked
3658
3663
  value:
3659
3664
  message: Bearer Authentication Failed
3665
+ scoped_token:
3666
+ summary: An API token with a custom scope reading a resource
3667
+ value:
3668
+ errors:
3669
+ - code: access_restricted
3670
+ message: You don't have the required permissions to perform the action.
3660
3671
  parameters:
3661
3672
  FileType:
3662
3673
  name: fileType
package/dist/enduser.yml CHANGED
@@ -8589,29 +8589,34 @@ components:
8589
8589
  message: The request body failed validation.
8590
8590
  401-unauthorized:
8591
8591
  description: |-
8592
- Unauthorized. The request lacks a valid bearer token, or the provided token
8593
- failed to authenticate.
8592
+ Unauthorized, in one of two shapes.
8594
8593
 
8595
- Note: the 401 response is produced by the auth middleware **before** the
8596
- request reaches the endpoint handler, so it does **not** follow the
8597
- standard `{errors: [...]}` envelope. Instead the body is a bare
8598
- `{message: string}` object with no `code`, no `errors` array. Callers
8599
- handling 401s should key off the HTTP status and the `message` string,
8600
- not try to destructure an `errors[]`.
8594
+ No valid bearer token: the auth middleware answers before the endpoint
8595
+ handler runs, with a bare `{message: string}` body — no `code`, no
8596
+ `errors` array — so key off the HTTP status and `message`.
8597
+
8598
+ An API token with a custom scope calling an operation its scope does not
8599
+ grant: the token authenticated, and the body is the standard
8600
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
8601
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
8602
+ passed both, a personal access token `GET /v1/exports/{_id}`.
8601
8603
  content:
8602
8604
  application/json:
8603
8605
  schema:
8604
- type: object
8605
- properties:
8606
- message:
8607
- type: string
8608
- description: |-
8609
- Human-readable description of the auth failure. Known values:
8610
- - `"Unauthorized"` — no `Authorization` header on the request.
8611
- - `"Bearer Authentication Failed"` — header present but token
8612
- is invalid, revoked, or expired.
8613
- required:
8614
- - message
8606
+ oneOf:
8607
+ - type: object
8608
+ description: The auth middleware's bare body for a missing or invalid token.
8609
+ properties:
8610
+ message:
8611
+ type: string
8612
+ description: |-
8613
+ Human-readable description of the auth failure. Known values:
8614
+ - `"Unauthorized"` — no `Authorization` header on the request.
8615
+ - `"Bearer Authentication Failed"` — header present but token
8616
+ is invalid, revoked, or expired.
8617
+ required:
8618
+ - message
8619
+ - $ref: '#/components/schemas/Error'
8615
8620
  examples:
8616
8621
  missing_token:
8617
8622
  summary: No Authorization header sent
@@ -8621,6 +8626,12 @@ components:
8621
8626
  summary: Bearer token invalid or revoked
8622
8627
  value:
8623
8628
  message: Bearer Authentication Failed
8629
+ scoped_token:
8630
+ summary: An API token with a custom scope reading a resource
8631
+ value:
8632
+ errors:
8633
+ - code: access_restricted
8634
+ message: You don't have the required permissions to perform the action.
8624
8635
  403-forbidden:
8625
8636
  description: |
8626
8637
  Forbidden. The authenticated caller does not have permission to perform this operation.
@@ -567,29 +567,34 @@ components:
567
567
  responses:
568
568
  401-unauthorized:
569
569
  description: |-
570
- Unauthorized. The request lacks a valid bearer token, or the provided token
571
- failed to authenticate.
570
+ Unauthorized, in one of two shapes.
572
571
 
573
- Note: the 401 response is produced by the auth middleware **before** the
574
- request reaches the endpoint handler, so it does **not** follow the
575
- standard `{errors: [...]}` envelope. Instead the body is a bare
576
- `{message: string}` object with no `code`, no `errors` array. Callers
577
- handling 401s should key off the HTTP status and the `message` string,
578
- not try to destructure an `errors[]`.
572
+ No valid bearer token: the auth middleware answers before the endpoint
573
+ handler runs, with a bare `{message: string}` body — no `code`, no
574
+ `errors` array — so key off the HTTP status and `message`.
575
+
576
+ An API token with a custom scope calling an operation its scope does not
577
+ grant: the token authenticated, and the body is the standard
578
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
579
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
580
+ passed both, a personal access token `GET /v1/exports/{_id}`.
579
581
  content:
580
582
  application/json:
581
583
  schema:
582
- type: object
583
- properties:
584
- message:
585
- type: string
586
- description: |-
587
- Human-readable description of the auth failure. Known values:
588
- - `"Unauthorized"` — no `Authorization` header on the request.
589
- - `"Bearer Authentication Failed"` — header present but token
590
- is invalid, revoked, or expired.
591
- required:
592
- - message
584
+ oneOf:
585
+ - type: object
586
+ description: The auth middleware's bare body for a missing or invalid token.
587
+ properties:
588
+ message:
589
+ type: string
590
+ description: |-
591
+ Human-readable description of the auth failure. Known values:
592
+ - `"Unauthorized"` — no `Authorization` header on the request.
593
+ - `"Bearer Authentication Failed"` — header present but token
594
+ is invalid, revoked, or expired.
595
+ required:
596
+ - message
597
+ - $ref: '#/components/schemas/Error'
593
598
  examples:
594
599
  missing_token:
595
600
  summary: No Authorization header sent
@@ -599,6 +604,12 @@ components:
599
604
  summary: Bearer token invalid or revoked
600
605
  value:
601
606
  message: Bearer Authentication Failed
607
+ scoped_token:
608
+ summary: An API token with a custom scope reading a resource
609
+ value:
610
+ errors:
611
+ - code: access_restricted
612
+ message: You don't have the required permissions to perform the action.
602
613
  400-bad-request:
603
614
  description: |
604
615
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
@@ -575,6 +575,46 @@ components:
575
575
  description: Email address of the requesting user.
576
576
  examples:
577
577
  - jane@example.com
578
+ Error:
579
+ type: object
580
+ description: Standard error response envelope returned by integrator.io APIs.
581
+ properties:
582
+ errors:
583
+ type: array
584
+ description: List of errors that occurred while processing the request.
585
+ items:
586
+ type: object
587
+ properties:
588
+ code:
589
+ oneOf:
590
+ - type: string
591
+ - type: integer
592
+ description: |-
593
+ Machine-readable error code. Usually a string like
594
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
595
+ may be an **integer** when the error mirrors an upstream HTTP
596
+ status (e.g. `500`) — most commonly returned by connection-ping
597
+ and adaptor-proxy responses.
598
+ message:
599
+ type: string
600
+ description: Human-readable description of the error.
601
+ field:
602
+ type: string
603
+ description: |-
604
+ Optional pointer to the document field that caused the error.
605
+ Used by structural validation errors (`missing_required_field`,
606
+ `invalid_ref`) to indicate which field is at fault
607
+ (e.g. `_id`, `type`, `http.baseURI`).
608
+ source:
609
+ type: string
610
+ description: |-
611
+ Optional origin layer for the error — e.g. `application` when
612
+ the error came from the remote system the adaptor called,
613
+ `connector` when the adaptor itself rejected the request.
614
+ required:
615
+ - message
616
+ required:
617
+ - errors
578
618
  EventReportCreateRequest:
579
619
  type: object
580
620
  description: |
@@ -625,46 +665,6 @@ components:
625
665
  - type
626
666
  - startTime
627
667
  - _flowIds
628
- Error:
629
- type: object
630
- description: Standard error response envelope returned by integrator.io APIs.
631
- properties:
632
- errors:
633
- type: array
634
- description: List of errors that occurred while processing the request.
635
- items:
636
- type: object
637
- properties:
638
- code:
639
- oneOf:
640
- - type: string
641
- - type: integer
642
- description: |-
643
- Machine-readable error code. Usually a string like
644
- `invalid_ref`, `missing_required_field`, or `unauthorized`;
645
- may be an **integer** when the error mirrors an upstream HTTP
646
- status (e.g. `500`) — most commonly returned by connection-ping
647
- and adaptor-proxy responses.
648
- message:
649
- type: string
650
- description: Human-readable description of the error.
651
- field:
652
- type: string
653
- description: |-
654
- Optional pointer to the document field that caused the error.
655
- Used by structural validation errors (`missing_required_field`,
656
- `invalid_ref`) to indicate which field is at fault
657
- (e.g. `_id`, `type`, `http.baseURI`).
658
- source:
659
- type: string
660
- description: |-
661
- Optional origin layer for the error — e.g. `application` when
662
- the error came from the remote system the adaptor called,
663
- `connector` when the adaptor itself rejected the request.
664
- required:
665
- - message
666
- required:
667
- - errors
668
668
  EventReportSignedUrlResponse:
669
669
  type: object
670
670
  description: |
@@ -684,29 +684,34 @@ components:
684
684
  responses:
685
685
  401-unauthorized:
686
686
  description: |-
687
- Unauthorized. The request lacks a valid bearer token, or the provided token
688
- failed to authenticate.
687
+ Unauthorized, in one of two shapes.
688
+
689
+ No valid bearer token: the auth middleware answers before the endpoint
690
+ handler runs, with a bare `{message: string}` body — no `code`, no
691
+ `errors` array — so key off the HTTP status and `message`.
689
692
 
690
- Note: the 401 response is produced by the auth middleware **before** the
691
- request reaches the endpoint handler, so it does **not** follow the
692
- standard `{errors: [...]}` envelope. Instead the body is a bare
693
- `{message: string}` object with no `code`, no `errors` array. Callers
694
- handling 401s should key off the HTTP status and the `message` string,
695
- not try to destructure an `errors[]`.
693
+ An API token with a custom scope calling an operation its scope does not
694
+ grant: the token authenticated, and the body is the standard
695
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
696
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
697
+ passed both, a personal access token `GET /v1/exports/{_id}`.
696
698
  content:
697
699
  application/json:
698
700
  schema:
699
- type: object
700
- properties:
701
- message:
702
- type: string
703
- description: |-
704
- Human-readable description of the auth failure. Known values:
705
- - `"Unauthorized"` — no `Authorization` header on the request.
706
- - `"Bearer Authentication Failed"` — header present but token
707
- is invalid, revoked, or expired.
708
- required:
709
- - message
701
+ oneOf:
702
+ - type: object
703
+ description: The auth middleware's bare body for a missing or invalid token.
704
+ properties:
705
+ message:
706
+ type: string
707
+ description: |-
708
+ Human-readable description of the auth failure. Known values:
709
+ - `"Unauthorized"` — no `Authorization` header on the request.
710
+ - `"Bearer Authentication Failed"` — header present but token
711
+ is invalid, revoked, or expired.
712
+ required:
713
+ - message
714
+ - $ref: '#/components/schemas/Error'
710
715
  examples:
711
716
  missing_token:
712
717
  summary: No Authorization header sent
@@ -716,6 +721,12 @@ components:
716
721
  summary: Bearer token invalid or revoked
717
722
  value:
718
723
  message: Bearer Authentication Failed
724
+ scoped_token:
725
+ summary: An API token with a custom scope reading a resource
726
+ value:
727
+ errors:
728
+ - code: access_restricted
729
+ message: You don't have the required permissions to perform the action.
719
730
  400-bad-request:
720
731
  description: |
721
732
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
package/dist/export.yml CHANGED
@@ -6123,38 +6123,49 @@ components:
6123
6123
  filter:
6124
6124
  description: |-
6125
6125
  Selects which files are processed: files matching the filter criteria are exported,
6126
- and non-matching files are skipped entirely before processing begins. Filterable
6127
- fields come from each file's listing entry: the name as `fileName`, the size as
6128
- `filesize`, and the modified time as `lastModifiedTime` on FTP, SFTP and S3 or
6129
- `modifiedTime` on cloud-storage folders (`http.type: "file"`)
6130
- (e.g. ["endswith", ["string", ["extract", "fileName"]], ".csv"]). There is no
6131
- `lastmodified` key.
6126
+ and non-matching files are skipped entirely before processing begins. A rule reads
6127
+ the file's name as `filename` or its size as `filesize`, the size compared with a
6128
+ number-and-unit string such as `10-kb`
6129
+ (e.g. ["endswith", ["string", ["extract", "filename"]], ".csv"]).
6132
6130
  allOf:
6133
6131
  - $ref: '#/components/schemas/Filter'
6134
6132
  x-celigo-ai-guidance:
6135
6133
  - |-
6136
- ## AVAILABLE FILTER FIELDS
6137
-
6138
- The fields a file filter reads are on each file's listing entry, before the file is
6139
- downloaded. They are not the records' `fileMeta`, though some names match.
6140
-
6141
- ### Common Filter Fields
6142
-
6143
- These are the most commonly available fields across most file providers:
6144
-
6145
- 1. **fileName**: The name of the file (with extension)
6146
- - Example filter: Match files with specific extensions or naming patterns
6147
- - Usage: `["endswith", ["string", ["extract", "fileName"]], ".csv"]`
6148
-
6149
- 2. **filesize**: The size of the file in bytes
6150
- - Example filter: Skip files that are too large or too small
6151
- - Usage: `["lessthan", ["number", ["extract", "filesize"]], 1000000]`
6152
-
6153
- 3. **lastModifiedTime** (FTP, SFTP, S3) or **modifiedTime** (cloud-storage folders): The
6154
- last modification timestamp of the file. There is no `lastmodified` key.
6155
- - Example filter: Process only files created/modified within a specific date range
6156
- - Usage (FTP, SFTP, S3): `["greaterthan", ["epochtime", ["extract", "lastModifiedTime"]], 1672531200000]` (2023-01-01T00:00:00Z in epoch milliseconds)
6157
- - Usage (cloud-storage folders): `["greaterthan", ["epochtime", ["extract", "modifiedTime"]], 1672531200000]`
6134
+ A file filter is checked against each file's listing entry before the file is
6135
+ downloaded — never against the records' `fileMeta` — and its rules read `filename`
6136
+ or `filesize`. `filename` takes `equals`, `notequals`, `startswith`, `notstartswith`,
6137
+ `endswith`, `notendswith`, `contains` and `doesnotcontain` against a non-empty string,
6138
+ through the `string` conversion:
6139
+ `["startswith", ["string", ["extract", "filename"]], "orders-"]`.
6140
+ - |-
6141
+ `filesize` takes `greaterthan`, `greaterthanequals`, `lessthan`, `lessthanequals`,
6142
+ `equals` and `notequals` against a string of the form `<number>-<unit>`, also through
6143
+ the `string` conversion: `["lessthan", ["string", ["extract", "filesize"]], "1.5-mb"]`.
6144
+ The number is above zero and written without a leading zero, a decimal with digits on
6145
+ both sides of the point (`10`, `1.5`, `0.5`); the unit is lowercase — `b`, `kb`, `mb`,
6146
+ `gb`, `tb`, `pb`, `eb`, `zb` or `yb`. `1000`, `1kb`, `1-KB`, `0-b`, `01-kb` and `.5-mb`
6147
+ are each refused.
6148
+ - |-
6149
+ A rule outside those lists fails the export's save, and its preview, with 422
6150
+ `file_filter_validation_error` on `file.filter.expression.rules`. A rule on
6151
+ `fileName`, `fileSize`, `size`, `path`, `lastModifiedTime`, `modifiedTime` or
6152
+ `lastmodified` answers "Validation failed: type: `<field>` is not a valid enum value
6153
+ for path `type`.", where `type` is the field the rule reads, not `filter.type`: the
6154
+ field names are lowercase and there is no modified-time field. An operator outside
6155
+ the field's list (`matches`, or `STARTSWITH` in capitals) answers "`<operator>` is not
6156
+ a valid enum value for path `filename.operator`." (`filesize.operator` on a size
6157
+ rule), and a `filesize` value in another form answers "Validator failed for path
6158
+ `filesize.value` with value `<value>`".
6159
+ - |-
6160
+ Rules combine with `and`, `or` and `not`. To read one file out of a folder, filter on
6161
+ its name: `equals` for a fixed name, `startswith` when the name carries a date or run
6162
+ suffix.
6163
+ - |-
6164
+ Live-verified 2026-11-12 with previews of a Celigo Storage folder export — every
6165
+ operator, unit and refusal above, the accepted rules selecting the files they
6166
+ describe, as `filename` and `filesize` rules also did on a Google Drive folder — and
6167
+ with saves of FTP and S3 exports: every operator, and the `fileName`, modified-time,
6168
+ `matches`, capitals and `filesize`-value refusals.
6158
6169
  backupPath:
6159
6170
  type: string
6160
6171
  description: Path where backup copies of source files are stored before processing.
@@ -18334,6 +18345,46 @@ components:
18334
18345
  (`GET /v1/{flows|apis|tools}/{containerId}/{_id}/requests`). Read-only on PUT —
18335
18346
  written only by `PATCH /v1/exports/{_id}` on `/debugUntil`, at most 3600 seconds
18336
18347
  ahead (`422` `update_not_allowed` beyond that); `remove` stops capture.
18348
+ Error:
18349
+ type: object
18350
+ description: Standard error response envelope returned by integrator.io APIs.
18351
+ properties:
18352
+ errors:
18353
+ type: array
18354
+ description: List of errors that occurred while processing the request.
18355
+ items:
18356
+ type: object
18357
+ properties:
18358
+ code:
18359
+ oneOf:
18360
+ - type: string
18361
+ - type: integer
18362
+ description: |-
18363
+ Machine-readable error code. Usually a string like
18364
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
18365
+ may be an **integer** when the error mirrors an upstream HTTP
18366
+ status (e.g. `500`) — most commonly returned by connection-ping
18367
+ and adaptor-proxy responses.
18368
+ message:
18369
+ type: string
18370
+ description: Human-readable description of the error.
18371
+ field:
18372
+ type: string
18373
+ description: |-
18374
+ Optional pointer to the document field that caused the error.
18375
+ Used by structural validation errors (`missing_required_field`,
18376
+ `invalid_ref`) to indicate which field is at fault
18377
+ (e.g. `_id`, `type`, `http.baseURI`).
18378
+ source:
18379
+ type: string
18380
+ description: |-
18381
+ Optional origin layer for the error — e.g. `application` when
18382
+ the error came from the remote system the adaptor called,
18383
+ `connector` when the adaptor itself rejected the request.
18384
+ required:
18385
+ - message
18386
+ required:
18387
+ - errors
18337
18388
  Request:
18338
18389
  type: object
18339
18390
  description: |-
@@ -18600,46 +18651,6 @@ components:
18600
18651
  topic:
18601
18652
  required:
18602
18653
  - _topicId
18603
- Error:
18604
- type: object
18605
- description: Standard error response envelope returned by integrator.io APIs.
18606
- properties:
18607
- errors:
18608
- type: array
18609
- description: List of errors that occurred while processing the request.
18610
- items:
18611
- type: object
18612
- properties:
18613
- code:
18614
- oneOf:
18615
- - type: string
18616
- - type: integer
18617
- description: |-
18618
- Machine-readable error code. Usually a string like
18619
- `invalid_ref`, `missing_required_field`, or `unauthorized`;
18620
- may be an **integer** when the error mirrors an upstream HTTP
18621
- status (e.g. `500`) — most commonly returned by connection-ping
18622
- and adaptor-proxy responses.
18623
- message:
18624
- type: string
18625
- description: Human-readable description of the error.
18626
- field:
18627
- type: string
18628
- description: |-
18629
- Optional pointer to the document field that caused the error.
18630
- Used by structural validation errors (`missing_required_field`,
18631
- `invalid_ref`) to indicate which field is at fault
18632
- (e.g. `_id`, `type`, `http.baseURI`).
18633
- source:
18634
- type: string
18635
- description: |-
18636
- Optional origin layer for the error — e.g. `application` when
18637
- the error came from the remote system the adaptor called,
18638
- `connector` when the adaptor itself rejected the request.
18639
- required:
18640
- - message
18641
- required:
18642
- - errors
18643
18654
  JsonPatchOperation:
18644
18655
  type: object
18645
18656
  description: A single JSON Patch operation (RFC 6902).
@@ -19034,29 +19045,34 @@ components:
19034
19045
  responses:
19035
19046
  401-unauthorized:
19036
19047
  description: |-
19037
- Unauthorized. The request lacks a valid bearer token, or the provided token
19038
- failed to authenticate.
19039
-
19040
- Note: the 401 response is produced by the auth middleware **before** the
19041
- request reaches the endpoint handler, so it does **not** follow the
19042
- standard `{errors: [...]}` envelope. Instead the body is a bare
19043
- `{message: string}` object with no `code`, no `errors` array. Callers
19044
- handling 401s should key off the HTTP status and the `message` string,
19045
- not try to destructure an `errors[]`.
19048
+ Unauthorized, in one of two shapes.
19049
+
19050
+ No valid bearer token: the auth middleware answers before the endpoint
19051
+ handler runs, with a bare `{message: string}` body — no `code`, no
19052
+ `errors` array — so key off the HTTP status and `message`.
19053
+
19054
+ An API token with a custom scope calling an operation its scope does not
19055
+ grant: the token authenticated, and the body is the standard
19056
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
19057
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
19058
+ passed both, a personal access token `GET /v1/exports/{_id}`.
19046
19059
  content:
19047
19060
  application/json:
19048
19061
  schema:
19049
- type: object
19050
- properties:
19051
- message:
19052
- type: string
19053
- description: |-
19054
- Human-readable description of the auth failure. Known values:
19055
- - `"Unauthorized"` — no `Authorization` header on the request.
19056
- - `"Bearer Authentication Failed"` — header present but token
19057
- is invalid, revoked, or expired.
19058
- required:
19059
- - message
19062
+ oneOf:
19063
+ - type: object
19064
+ description: The auth middleware's bare body for a missing or invalid token.
19065
+ properties:
19066
+ message:
19067
+ type: string
19068
+ description: |-
19069
+ Human-readable description of the auth failure. Known values:
19070
+ - `"Unauthorized"` — no `Authorization` header on the request.
19071
+ - `"Bearer Authentication Failed"` — header present but token
19072
+ is invalid, revoked, or expired.
19073
+ required:
19074
+ - message
19075
+ - $ref: '#/components/schemas/Error'
19060
19076
  examples:
19061
19077
  missing_token:
19062
19078
  summary: No Authorization header sent
@@ -19066,6 +19082,12 @@ components:
19066
19082
  summary: Bearer token invalid or revoked
19067
19083
  value:
19068
19084
  message: Bearer Authentication Failed
19085
+ scoped_token:
19086
+ summary: An API token with a custom scope reading a resource
19087
+ value:
19088
+ errors:
19089
+ - code: access_restricted
19090
+ message: You don't have the required permissions to perform the action.
19069
19091
  400-bad-request:
19070
19092
  description: |
19071
19093
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.