@celigo/api-specs 0.2.216 → 0.2.217
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.
- package/dist/export.yml +68 -40
- package/dist/tool.yml +68 -40
- package/package.json +1 -1
- package/schemas.json +2 -2
package/dist/export.yml
CHANGED
|
@@ -4763,9 +4763,10 @@ components:
|
|
|
4763
4763
|
json:
|
|
4764
4764
|
type: object
|
|
4765
4765
|
description: |-
|
|
4766
|
-
Parsing settings for JSON files. Configure when type is "json". resourcePath
|
|
4767
|
-
|
|
4768
|
-
the
|
|
4766
|
+
Parsing settings for JSON files. Configure when type is "json". resourcePath selects the
|
|
4767
|
+
record elements inside the document — the wildcard form (`*`, `rows[*]`) iterates an
|
|
4768
|
+
array, while a path that stops at the array (or an empty path on a root array) yields
|
|
4769
|
+
the whole array as one record; malformed JSON fails the entire file's processing.
|
|
4769
4770
|
|
|
4770
4771
|
Required when type is json.
|
|
4771
4772
|
x-celigo-ai-guidance:
|
|
@@ -4807,8 +4808,12 @@ components:
|
|
|
4807
4808
|
]
|
|
4808
4809
|
```
|
|
4809
4810
|
- Records are directly at the root as an array
|
|
4810
|
-
-
|
|
4811
|
-
-
|
|
4811
|
+
- Set resourcePath to `*` (or `[*]`) so each element becomes a record
|
|
4812
|
+
- An empty resourcePath returns the entire array as ONE record — a large file then
|
|
4813
|
+
fails with `record_size_exceeded` instead of being split. The export form appends
|
|
4814
|
+
the wildcard itself when the attached sample file is 10 MB or smaller (why a blank
|
|
4815
|
+
path often works in the UI — a larger sample gets no wildcard and the blank path
|
|
4816
|
+
stands); a document sent through the API carries exactly the path it names
|
|
4812
4817
|
|
|
4813
4818
|
### Container Object Pattern
|
|
4814
4819
|
```json
|
|
@@ -4824,7 +4829,8 @@ components:
|
|
|
4824
4829
|
}
|
|
4825
4830
|
```
|
|
4826
4831
|
- Records are in an array inside a container object
|
|
4827
|
-
- Requires resourcePath (e.g., "data")
|
|
4832
|
+
- Requires resourcePath with the element wildcard (e.g., "data[*]" or "data.*");
|
|
4833
|
+
"data" alone selects the array itself and yields it as one record
|
|
4828
4834
|
- Common in API responses with metadata
|
|
4829
4835
|
|
|
4830
4836
|
### Nested Container Pattern
|
|
@@ -4843,13 +4849,20 @@ components:
|
|
|
4843
4849
|
}
|
|
4844
4850
|
```
|
|
4845
4851
|
- Records are deeply nested in the hierarchy
|
|
4846
|
-
- Requires dot notation in
|
|
4852
|
+
- Requires dot notation ending in the element wildcard (e.g., "response.results[*]")
|
|
4847
4853
|
- Common in complex API responses
|
|
4848
4854
|
- |-
|
|
4849
4855
|
## ERROR PREVENTION
|
|
4850
4856
|
|
|
4851
4857
|
- **Invalid Path**: Incorrectly specified resourcePath results in zero records found
|
|
4852
|
-
- **
|
|
4858
|
+
- **Array as one record**: a path that stops at the array (or an empty path on a root
|
|
4859
|
+
array) yields the whole array as a single record; it fails `record_size_exceeded`
|
|
4860
|
+
("The size of a single record should not exceed 26214400 bytes. This may happen
|
|
4861
|
+
because the Resource path is not set correctly") once the file passes 25 MiB — the
|
|
4862
|
+
fix is the element wildcard (`*` / `path[*]`). A preSavePage hook cannot split the
|
|
4863
|
+
record instead: the rejection happens while the file is parsed, before any page of
|
|
4864
|
+
records exists for a hook to receive (an export with such a hook fails identically,
|
|
4865
|
+
with zero pages generated)
|
|
4853
4866
|
- **Empty Results**: If path resolves to null or non-existent field, no error is thrown but no records are processed
|
|
4854
4867
|
- **Parsing Failures**: Malformed JSON will cause the entire file processing to fail
|
|
4855
4868
|
- |-
|
|
@@ -4863,11 +4876,19 @@ components:
|
|
|
4863
4876
|
resourcePath:
|
|
4864
4877
|
type: string
|
|
4865
4878
|
description: |-
|
|
4866
|
-
Dot-notation path
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4879
|
+
Dot-notation path that selects the record elements within the JSON document, ending
|
|
4880
|
+
in the element wildcard — `*` when the file's root is the record array,
|
|
4881
|
+
`response.data.customers[*]` (or `.customers.*`) when the array sits under a key. A
|
|
4882
|
+
path that stops at the array — `response.data.customers`, or an empty path on a root
|
|
4883
|
+
array — yields the whole array as a single record, which fails `record_size_exceeded`
|
|
4884
|
+
once it exceeds 26,214,400 bytes. The export form appends the wildcard when the
|
|
4885
|
+
attached sample file is 10 MB or smaller, so a path left blank in the UI often works
|
|
4886
|
+
where the same document sent through the API — or a form with a larger sample — does
|
|
4887
|
+
not. Array indexing and `$`-rooted JSONPath (`$[*]`,
|
|
4888
|
+
`$.rows`) are not supported; a path that resolves to nothing produces zero records
|
|
4889
|
+
without raising an error. This is the file parser's path only — the path to records
|
|
4890
|
+
in an HTTP API response is the separate `http.response.resourcePath`, with its own
|
|
4891
|
+
rules (a bare dot path such as `results.customers` selects the record array there).
|
|
4871
4892
|
x-celigo-ai-guidance:
|
|
4872
4893
|
- |-
|
|
4873
4894
|
Specifies the path to the array of records within the JSON structure.
|
|
@@ -4876,18 +4897,18 @@ components:
|
|
|
4876
4897
|
- |-
|
|
4877
4898
|
## BEHAVIOR
|
|
4878
4899
|
|
|
4879
|
-
- **Purpose**:
|
|
4880
|
-
- **Format**: Dot notation
|
|
4881
|
-
- **When Empty**:
|
|
4882
|
-
- **Result**:
|
|
4900
|
+
- **Purpose**: Selects the elements that become records within the JSON structure
|
|
4901
|
+
- **Format**: Dot notation to navigate nested objects, ending in the element wildcard (e.g., "data.records[*]")
|
|
4902
|
+
- **When Empty**: The whole document is one record — a root object is that one record; a root array is NOT split (use `*` to split it)
|
|
4903
|
+
- **Result**: Each element the wildcard selects is processed as one record; a path that stops at the array yields the array as one record
|
|
4883
4904
|
- |-
|
|
4884
4905
|
## PATH NOTATION GUIDELINES
|
|
4885
4906
|
|
|
4886
4907
|
### Basic Path Patterns
|
|
4887
4908
|
|
|
4888
|
-
- **Root Level Array**:
|
|
4889
|
-
- **Single Level Nesting**:
|
|
4890
|
-
- **Multi-Level Nesting**:
|
|
4909
|
+
- **Root Level Array**: `*` (or `[*]`) when records are a direct array at root
|
|
4910
|
+
- **Single Level Nesting**: The property name plus the wildcard (e.g., "data[*]", "results[*]", "items.*")
|
|
4911
|
+
- **Multi-Level Nesting**: Dot notation plus the wildcard (e.g., "response.data.items[*]")
|
|
4891
4912
|
|
|
4892
4913
|
### Path Construction Rules
|
|
4893
4914
|
|
|
@@ -4896,13 +4917,14 @@ components:
|
|
|
4896
4917
|
- Each segment must be a valid property name in the JSON
|
|
4897
4918
|
|
|
4898
4919
|
2. **Target Requirements**:
|
|
4899
|
-
- The path
|
|
4900
|
-
-
|
|
4901
|
-
-
|
|
4920
|
+
- The parser yields whatever the path selects as the record(s): to get one record per array element, the path MUST end in the element wildcard (`[*]` or `.*`)
|
|
4921
|
+
- A path that stops at the array ("data") selects the array itself and yields ONE record holding every element
|
|
4922
|
+
- A path that selects a single object ("response", "response.data") yields that object as one record — the shape for a file that IS one record
|
|
4923
|
+
- The wildcard iterates whatever it is applied to: on an OBJECT (`*` on a root object, "response.*") it yields one record per member value, not the object — apply it to arrays
|
|
4902
4924
|
|
|
4903
4925
|
3. **Limitations**:
|
|
4904
4926
|
- Array indexing is not supported in the path (e.g., "data[0]")
|
|
4905
|
-
-
|
|
4927
|
+
- `$`-rooted JSONPath is not supported ("$[*]", "$.data[*]" match nothing and yield zero records)
|
|
4906
4928
|
- Regular expressions are not supported
|
|
4907
4929
|
- |-
|
|
4908
4930
|
## DETERMINATION STRATEGY FOR AI AGENTS
|
|
@@ -4918,20 +4940,21 @@ components:
|
|
|
4918
4940
|
|
|
4919
4941
|
| Source Type | Common Paths | Example |
|
|
4920
4942
|
|-------------|--------------|---------|
|
|
4921
|
-
|
|
|
4922
|
-
|
|
|
4923
|
-
|
|
|
4924
|
-
|
|
|
4925
|
-
|
|
|
4943
|
+
| Root array file | "*" | "*" |
|
|
4944
|
+
| REST APIs | "data[*]", "results[*]", "items[*]" | "data[*]" |
|
|
4945
|
+
| Complex APIs | "response.data[*]", "data.items[*]" | "response.data[*]" |
|
|
4946
|
+
| Database Exports | "rows[*]", "records[*]", "exports[*]" | "rows[*]" |
|
|
4947
|
+
| CRM Systems | "contacts[*]", "accounts[*]", "opportunities[*]" | "contacts[*]" |
|
|
4948
|
+
| Analytics APIs | "data.rows[*]", "response.data.rows[*]" | "data.rows[*]" |
|
|
4926
4949
|
|
|
4927
4950
|
3. **Verification Approach**:
|
|
4928
|
-
-
|
|
4929
|
-
- Each element
|
|
4951
|
+
- Preview the export: the parse stage must show one record per array element — a single record that is itself an array means the path stopped at the array
|
|
4952
|
+
- Each element should represent one complete record
|
|
4930
4953
|
- The array should not be a property array (like tags or categories)
|
|
4931
4954
|
- |-
|
|
4932
4955
|
## IMPLEMENTATION EXAMPLES
|
|
4933
4956
|
|
|
4934
|
-
### Root Array
|
|
4957
|
+
### Root Array
|
|
4935
4958
|
|
|
4936
4959
|
JSON Structure:
|
|
4937
4960
|
```json
|
|
@@ -4943,9 +4966,11 @@ components:
|
|
|
4943
4966
|
|
|
4944
4967
|
Configuration:
|
|
4945
4968
|
```json
|
|
4946
|
-
"resourcePath": ""
|
|
4969
|
+
"resourcePath": "*"
|
|
4947
4970
|
```
|
|
4948
4971
|
|
|
4972
|
+
An empty path (or omitting it) returns this array as ONE record rather than two.
|
|
4973
|
+
|
|
4949
4974
|
### Single-Level Nesting
|
|
4950
4975
|
|
|
4951
4976
|
JSON Structure:
|
|
@@ -4961,7 +4986,7 @@ components:
|
|
|
4961
4986
|
|
|
4962
4987
|
Configuration:
|
|
4963
4988
|
```json
|
|
4964
|
-
"resourcePath": "orders"
|
|
4989
|
+
"resourcePath": "orders[*]"
|
|
4965
4990
|
```
|
|
4966
4991
|
|
|
4967
4992
|
### Multi-Level Nesting
|
|
@@ -4983,7 +5008,7 @@ components:
|
|
|
4983
5008
|
|
|
4984
5009
|
Configuration:
|
|
4985
5010
|
```json
|
|
4986
|
-
"resourcePath": "response.data.customers"
|
|
5011
|
+
"resourcePath": "response.data.customers[*]"
|
|
4987
5012
|
```
|
|
4988
5013
|
- |-
|
|
4989
5014
|
## TROUBLESHOOTING INDICATORS
|
|
@@ -4991,6 +5016,8 @@ components:
|
|
|
4991
5016
|
If you encounter these issues, review the resourcePath setting:
|
|
4992
5017
|
|
|
4993
5018
|
- Export completes successfully but processes 0 records
|
|
5019
|
+
- `record_size_exceeded` — "The size of a single record should not exceed 26214400 bytes. This may happen because the Resource path is not set correctly": the path stopped at the array, so the whole file is one record; append the element wildcard (`*` for a root array, `path[*]` for a nested one) — a preSavePage hook cannot help: the record is rejected while the file is parsed, before any page exists for a hook to receive
|
|
5020
|
+
- A preview whose single record is itself an array of the expected objects (same cause, small file)
|
|
4994
5021
|
- "Cannot read property 'forEach' of undefined" errors
|
|
4995
5022
|
- "Expected array but got object/string/number" errors
|
|
4996
5023
|
- Records appear flattened or with unexpected structure
|
|
@@ -5002,10 +5029,11 @@ components:
|
|
|
5002
5029
|
- Document the expected JSON structure alongside the configuration
|
|
5003
5030
|
- For APIs with changing response structures, implement validation checks
|
|
5004
5031
|
examples:
|
|
5005
|
-
-
|
|
5006
|
-
-
|
|
5007
|
-
-
|
|
5008
|
-
-
|
|
5032
|
+
- '*'
|
|
5033
|
+
- data.orders[*]
|
|
5034
|
+
- response.results[*]
|
|
5035
|
+
- items[*]
|
|
5036
|
+
- data.customers.records.*
|
|
5009
5037
|
xlsx:
|
|
5010
5038
|
type: object
|
|
5011
5039
|
description: |-
|
|
@@ -9413,7 +9441,7 @@ components:
|
|
|
9413
9441
|
PathToRecords:
|
|
9414
9442
|
type: string
|
|
9415
9443
|
maxLength: 250
|
|
9416
|
-
description: Path to the array of records inside each document or item fetched from the source; each array element is emitted as an individual record, which keeps records within the 5 MB page-size limit even when the source document exceeds it. Accepts dot notation (e.g. `data.orders`) or JSONPath for values starting with `$`, including unions (`$['orders','invoices'][*]`) and filter expressions (`$.items[?(@.qty>3)]`); a path that resolves to nothing emits zero records for that document or item. When omitted, each document or item is emitted as one record, exactly as before
|
|
9444
|
+
description: Path to the array of records inside each document or item fetched from the source; each array element is emitted as an individual record, which keeps records within the 5 MB page-size limit even when the source document exceeds it. Accepts dot notation (e.g. `data.orders`) or JSONPath for values starting with `$`, including unions (`$['orders','invoices'][*]`) and filter expressions (`$.items[?(@.qty>3)]`); a path that resolves to nothing emits zero records for that document or item. When omitted, each document or item is emitted as one record, exactly as before. HTTP exports configure the same capability through `http.response.resourcePath` with these same path rules; file-based exports configure it through `file.json`/`file.xml` `resourcePath`, where the JSON file parser follows its own rule — the path yields whatever it selects as the record, so it must end in the element wildcard (`*` for a root array, `data.orders[*]` under a key) to emit one record per element, and `$`-rooted JSONPath is not supported there.
|
|
9417
9445
|
examples:
|
|
9418
9446
|
- lineItems
|
|
9419
9447
|
- order.lineItems
|
package/dist/tool.yml
CHANGED
|
@@ -30658,9 +30658,10 @@ components:
|
|
|
30658
30658
|
json:
|
|
30659
30659
|
type: object
|
|
30660
30660
|
description: |-
|
|
30661
|
-
Parsing settings for JSON files. Configure when type is "json". resourcePath
|
|
30662
|
-
|
|
30663
|
-
the
|
|
30661
|
+
Parsing settings for JSON files. Configure when type is "json". resourcePath selects the
|
|
30662
|
+
record elements inside the document — the wildcard form (`*`, `rows[*]`) iterates an
|
|
30663
|
+
array, while a path that stops at the array (or an empty path on a root array) yields
|
|
30664
|
+
the whole array as one record; malformed JSON fails the entire file's processing.
|
|
30664
30665
|
|
|
30665
30666
|
Required when type is json.
|
|
30666
30667
|
x-celigo-ai-guidance:
|
|
@@ -30702,8 +30703,12 @@ components:
|
|
|
30702
30703
|
]
|
|
30703
30704
|
```
|
|
30704
30705
|
- Records are directly at the root as an array
|
|
30705
|
-
-
|
|
30706
|
-
-
|
|
30706
|
+
- Set resourcePath to `*` (or `[*]`) so each element becomes a record
|
|
30707
|
+
- An empty resourcePath returns the entire array as ONE record — a large file then
|
|
30708
|
+
fails with `record_size_exceeded` instead of being split. The export form appends
|
|
30709
|
+
the wildcard itself when the attached sample file is 10 MB or smaller (why a blank
|
|
30710
|
+
path often works in the UI — a larger sample gets no wildcard and the blank path
|
|
30711
|
+
stands); a document sent through the API carries exactly the path it names
|
|
30707
30712
|
|
|
30708
30713
|
### Container Object Pattern
|
|
30709
30714
|
```json
|
|
@@ -30719,7 +30724,8 @@ components:
|
|
|
30719
30724
|
}
|
|
30720
30725
|
```
|
|
30721
30726
|
- Records are in an array inside a container object
|
|
30722
|
-
- Requires resourcePath (e.g., "data")
|
|
30727
|
+
- Requires resourcePath with the element wildcard (e.g., "data[*]" or "data.*");
|
|
30728
|
+
"data" alone selects the array itself and yields it as one record
|
|
30723
30729
|
- Common in API responses with metadata
|
|
30724
30730
|
|
|
30725
30731
|
### Nested Container Pattern
|
|
@@ -30738,13 +30744,20 @@ components:
|
|
|
30738
30744
|
}
|
|
30739
30745
|
```
|
|
30740
30746
|
- Records are deeply nested in the hierarchy
|
|
30741
|
-
- Requires dot notation in
|
|
30747
|
+
- Requires dot notation ending in the element wildcard (e.g., "response.results[*]")
|
|
30742
30748
|
- Common in complex API responses
|
|
30743
30749
|
- |-
|
|
30744
30750
|
## ERROR PREVENTION
|
|
30745
30751
|
|
|
30746
30752
|
- **Invalid Path**: Incorrectly specified resourcePath results in zero records found
|
|
30747
|
-
- **
|
|
30753
|
+
- **Array as one record**: a path that stops at the array (or an empty path on a root
|
|
30754
|
+
array) yields the whole array as a single record; it fails `record_size_exceeded`
|
|
30755
|
+
("The size of a single record should not exceed 26214400 bytes. This may happen
|
|
30756
|
+
because the Resource path is not set correctly") once the file passes 25 MiB — the
|
|
30757
|
+
fix is the element wildcard (`*` / `path[*]`). A preSavePage hook cannot split the
|
|
30758
|
+
record instead: the rejection happens while the file is parsed, before any page of
|
|
30759
|
+
records exists for a hook to receive (an export with such a hook fails identically,
|
|
30760
|
+
with zero pages generated)
|
|
30748
30761
|
- **Empty Results**: If path resolves to null or non-existent field, no error is thrown but no records are processed
|
|
30749
30762
|
- **Parsing Failures**: Malformed JSON will cause the entire file processing to fail
|
|
30750
30763
|
- |-
|
|
@@ -30758,11 +30771,19 @@ components:
|
|
|
30758
30771
|
resourcePath:
|
|
30759
30772
|
type: string
|
|
30760
30773
|
description: |-
|
|
30761
|
-
Dot-notation path
|
|
30762
|
-
|
|
30763
|
-
|
|
30764
|
-
|
|
30765
|
-
|
|
30774
|
+
Dot-notation path that selects the record elements within the JSON document, ending
|
|
30775
|
+
in the element wildcard — `*` when the file's root is the record array,
|
|
30776
|
+
`response.data.customers[*]` (or `.customers.*`) when the array sits under a key. A
|
|
30777
|
+
path that stops at the array — `response.data.customers`, or an empty path on a root
|
|
30778
|
+
array — yields the whole array as a single record, which fails `record_size_exceeded`
|
|
30779
|
+
once it exceeds 26,214,400 bytes. The export form appends the wildcard when the
|
|
30780
|
+
attached sample file is 10 MB or smaller, so a path left blank in the UI often works
|
|
30781
|
+
where the same document sent through the API — or a form with a larger sample — does
|
|
30782
|
+
not. Array indexing and `$`-rooted JSONPath (`$[*]`,
|
|
30783
|
+
`$.rows`) are not supported; a path that resolves to nothing produces zero records
|
|
30784
|
+
without raising an error. This is the file parser's path only — the path to records
|
|
30785
|
+
in an HTTP API response is the separate `http.response.resourcePath`, with its own
|
|
30786
|
+
rules (a bare dot path such as `results.customers` selects the record array there).
|
|
30766
30787
|
x-celigo-ai-guidance:
|
|
30767
30788
|
- |-
|
|
30768
30789
|
Specifies the path to the array of records within the JSON structure.
|
|
@@ -30771,18 +30792,18 @@ components:
|
|
|
30771
30792
|
- |-
|
|
30772
30793
|
## BEHAVIOR
|
|
30773
30794
|
|
|
30774
|
-
- **Purpose**:
|
|
30775
|
-
- **Format**: Dot notation
|
|
30776
|
-
- **When Empty**:
|
|
30777
|
-
- **Result**:
|
|
30795
|
+
- **Purpose**: Selects the elements that become records within the JSON structure
|
|
30796
|
+
- **Format**: Dot notation to navigate nested objects, ending in the element wildcard (e.g., "data.records[*]")
|
|
30797
|
+
- **When Empty**: The whole document is one record — a root object is that one record; a root array is NOT split (use `*` to split it)
|
|
30798
|
+
- **Result**: Each element the wildcard selects is processed as one record; a path that stops at the array yields the array as one record
|
|
30778
30799
|
- |-
|
|
30779
30800
|
## PATH NOTATION GUIDELINES
|
|
30780
30801
|
|
|
30781
30802
|
### Basic Path Patterns
|
|
30782
30803
|
|
|
30783
|
-
- **Root Level Array**:
|
|
30784
|
-
- **Single Level Nesting**:
|
|
30785
|
-
- **Multi-Level Nesting**:
|
|
30804
|
+
- **Root Level Array**: `*` (or `[*]`) when records are a direct array at root
|
|
30805
|
+
- **Single Level Nesting**: The property name plus the wildcard (e.g., "data[*]", "results[*]", "items.*")
|
|
30806
|
+
- **Multi-Level Nesting**: Dot notation plus the wildcard (e.g., "response.data.items[*]")
|
|
30786
30807
|
|
|
30787
30808
|
### Path Construction Rules
|
|
30788
30809
|
|
|
@@ -30791,13 +30812,14 @@ components:
|
|
|
30791
30812
|
- Each segment must be a valid property name in the JSON
|
|
30792
30813
|
|
|
30793
30814
|
2. **Target Requirements**:
|
|
30794
|
-
- The path
|
|
30795
|
-
-
|
|
30796
|
-
-
|
|
30815
|
+
- The parser yields whatever the path selects as the record(s): to get one record per array element, the path MUST end in the element wildcard (`[*]` or `.*`)
|
|
30816
|
+
- A path that stops at the array ("data") selects the array itself and yields ONE record holding every element
|
|
30817
|
+
- A path that selects a single object ("response", "response.data") yields that object as one record — the shape for a file that IS one record
|
|
30818
|
+
- The wildcard iterates whatever it is applied to: on an OBJECT (`*` on a root object, "response.*") it yields one record per member value, not the object — apply it to arrays
|
|
30797
30819
|
|
|
30798
30820
|
3. **Limitations**:
|
|
30799
30821
|
- Array indexing is not supported in the path (e.g., "data[0]")
|
|
30800
|
-
-
|
|
30822
|
+
- `$`-rooted JSONPath is not supported ("$[*]", "$.data[*]" match nothing and yield zero records)
|
|
30801
30823
|
- Regular expressions are not supported
|
|
30802
30824
|
- |-
|
|
30803
30825
|
## DETERMINATION STRATEGY FOR AI AGENTS
|
|
@@ -30813,20 +30835,21 @@ components:
|
|
|
30813
30835
|
|
|
30814
30836
|
| Source Type | Common Paths | Example |
|
|
30815
30837
|
|-------------|--------------|---------|
|
|
30816
|
-
|
|
|
30817
|
-
|
|
|
30818
|
-
|
|
|
30819
|
-
|
|
|
30820
|
-
|
|
|
30838
|
+
| Root array file | "*" | "*" |
|
|
30839
|
+
| REST APIs | "data[*]", "results[*]", "items[*]" | "data[*]" |
|
|
30840
|
+
| Complex APIs | "response.data[*]", "data.items[*]" | "response.data[*]" |
|
|
30841
|
+
| Database Exports | "rows[*]", "records[*]", "exports[*]" | "rows[*]" |
|
|
30842
|
+
| CRM Systems | "contacts[*]", "accounts[*]", "opportunities[*]" | "contacts[*]" |
|
|
30843
|
+
| Analytics APIs | "data.rows[*]", "response.data.rows[*]" | "data.rows[*]" |
|
|
30821
30844
|
|
|
30822
30845
|
3. **Verification Approach**:
|
|
30823
|
-
-
|
|
30824
|
-
- Each element
|
|
30846
|
+
- Preview the export: the parse stage must show one record per array element — a single record that is itself an array means the path stopped at the array
|
|
30847
|
+
- Each element should represent one complete record
|
|
30825
30848
|
- The array should not be a property array (like tags or categories)
|
|
30826
30849
|
- |-
|
|
30827
30850
|
## IMPLEMENTATION EXAMPLES
|
|
30828
30851
|
|
|
30829
|
-
### Root Array
|
|
30852
|
+
### Root Array
|
|
30830
30853
|
|
|
30831
30854
|
JSON Structure:
|
|
30832
30855
|
```json
|
|
@@ -30838,9 +30861,11 @@ components:
|
|
|
30838
30861
|
|
|
30839
30862
|
Configuration:
|
|
30840
30863
|
```json
|
|
30841
|
-
"resourcePath": ""
|
|
30864
|
+
"resourcePath": "*"
|
|
30842
30865
|
```
|
|
30843
30866
|
|
|
30867
|
+
An empty path (or omitting it) returns this array as ONE record rather than two.
|
|
30868
|
+
|
|
30844
30869
|
### Single-Level Nesting
|
|
30845
30870
|
|
|
30846
30871
|
JSON Structure:
|
|
@@ -30856,7 +30881,7 @@ components:
|
|
|
30856
30881
|
|
|
30857
30882
|
Configuration:
|
|
30858
30883
|
```json
|
|
30859
|
-
"resourcePath": "orders"
|
|
30884
|
+
"resourcePath": "orders[*]"
|
|
30860
30885
|
```
|
|
30861
30886
|
|
|
30862
30887
|
### Multi-Level Nesting
|
|
@@ -30878,7 +30903,7 @@ components:
|
|
|
30878
30903
|
|
|
30879
30904
|
Configuration:
|
|
30880
30905
|
```json
|
|
30881
|
-
"resourcePath": "response.data.customers"
|
|
30906
|
+
"resourcePath": "response.data.customers[*]"
|
|
30882
30907
|
```
|
|
30883
30908
|
- |-
|
|
30884
30909
|
## TROUBLESHOOTING INDICATORS
|
|
@@ -30886,6 +30911,8 @@ components:
|
|
|
30886
30911
|
If you encounter these issues, review the resourcePath setting:
|
|
30887
30912
|
|
|
30888
30913
|
- Export completes successfully but processes 0 records
|
|
30914
|
+
- `record_size_exceeded` — "The size of a single record should not exceed 26214400 bytes. This may happen because the Resource path is not set correctly": the path stopped at the array, so the whole file is one record; append the element wildcard (`*` for a root array, `path[*]` for a nested one) — a preSavePage hook cannot help: the record is rejected while the file is parsed, before any page exists for a hook to receive
|
|
30915
|
+
- A preview whose single record is itself an array of the expected objects (same cause, small file)
|
|
30889
30916
|
- "Cannot read property 'forEach' of undefined" errors
|
|
30890
30917
|
- "Expected array but got object/string/number" errors
|
|
30891
30918
|
- Records appear flattened or with unexpected structure
|
|
@@ -30897,10 +30924,11 @@ components:
|
|
|
30897
30924
|
- Document the expected JSON structure alongside the configuration
|
|
30898
30925
|
- For APIs with changing response structures, implement validation checks
|
|
30899
30926
|
examples:
|
|
30900
|
-
-
|
|
30901
|
-
-
|
|
30902
|
-
-
|
|
30903
|
-
-
|
|
30927
|
+
- '*'
|
|
30928
|
+
- data.orders[*]
|
|
30929
|
+
- response.results[*]
|
|
30930
|
+
- items[*]
|
|
30931
|
+
- data.customers.records.*
|
|
30904
30932
|
xlsx:
|
|
30905
30933
|
type: object
|
|
30906
30934
|
description: |-
|
|
@@ -35308,7 +35336,7 @@ components:
|
|
|
35308
35336
|
PathToRecords:
|
|
35309
35337
|
type: string
|
|
35310
35338
|
maxLength: 250
|
|
35311
|
-
description: Path to the array of records inside each document or item fetched from the source; each array element is emitted as an individual record, which keeps records within the 5 MB page-size limit even when the source document exceeds it. Accepts dot notation (e.g. `data.orders`) or JSONPath for values starting with `$`, including unions (`$['orders','invoices'][*]`) and filter expressions (`$.items[?(@.qty>3)]`); a path that resolves to nothing emits zero records for that document or item. When omitted, each document or item is emitted as one record, exactly as before
|
|
35339
|
+
description: Path to the array of records inside each document or item fetched from the source; each array element is emitted as an individual record, which keeps records within the 5 MB page-size limit even when the source document exceeds it. Accepts dot notation (e.g. `data.orders`) or JSONPath for values starting with `$`, including unions (`$['orders','invoices'][*]`) and filter expressions (`$.items[?(@.qty>3)]`); a path that resolves to nothing emits zero records for that document or item. When omitted, each document or item is emitted as one record, exactly as before. HTTP exports configure the same capability through `http.response.resourcePath` with these same path rules; file-based exports configure it through `file.json`/`file.xml` `resourcePath`, where the JSON file parser follows its own rule — the path yields whatever it selects as the record, so it must end in the element wildcard (`*` for a root array, `data.orders[*]` under a key) to emit one record per element, and `$`-rooted JSONPath is not supported there.
|
|
35312
35340
|
examples:
|
|
35313
35341
|
- lineItems
|
|
35314
35342
|
- order.lineItems
|
package/package.json
CHANGED