File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 7676 pagination :
7777 id : cursor_xyz789
7878 limit : 50
79- hasMore : true
79+ hasMore : false
8080 items :
8181 - id : 1
8282 status : shipped
9191 endpoints :
9292 test_endpoint :
9393 name : test_endpoint
94+ request :
95+ parameters :
96+ cursor : " {state.page_cursor}"
9497 response :
9598 processors :
9699 - expression : response.json.pagination.id
102105 records :
103106 jmespath : items
104107 pagination :
105- stop_condition : " length( response.json.items) == 0 "
108+ stop_condition : " response.json.pagination.hasMore == false "
106109 next_state :
107110 page_cursor : " {state.cursor}"
108111 id : " {response.json.pagination.id}"
144147 state :
145148 base_url : https://api.example.com
146149 version : v2
150+ request :
151+ parameters :
152+ cursor : " {state.cursor}"
147153 response :
148154 processors :
149155 - expression : response.json.meta.next_cursor
162168 records :
163169 jmespath : results
164170 pagination :
165- stop_condition : " is_null( response.json.meta.next_cursor) "
171+ stop_condition : response.json.meta.next_cursor == "next_page_123 "
166172 next_state :
167173 cursor : " {state.next_cursor}"
168174 limit : " {state.page_size}"
209215 default_limit : 50
210216 max_limit : 100
211217 base_time : " 2025-01-10T00:00:00Z"
218+ request :
219+ parameters :
220+ token : " {state.token}"
212221 response :
213222 processors :
214223 - expression : response.json.pagination.next_token
223232 records :
224233 jmespath : data
225234 pagination :
226- stop_condition : " !state.has_more || is_null(state.token)"
235+ stop_condition : ' !state.has_more || is_null(state.token) || response.json.pagination.next_token == "token_456" '
227236 next_state :
228237 # Use coalesce to handle null per_page
229238 limit : " { coalesce(response.json.pagination.per_page, state.default_limit) }"
You can’t perform that action at this time.
0 commit comments