You'll want to distinguish between the authentication and the paging call. The authentication is defined by your source, which you can setup as fsmf shows:
type: magritte-rest-v2
sourceMap:
my_api:
type: magritte-rest
headers:
Authorization: 'Bearer {{token}}'
url: "https://some-api.com/"
This will ensure all calls made to the API using this source have the token attached as a header.
Next you need to setup your sync, which will be responsible for making the relevant endpoint calls. The setup here depends on how your endpoint deals with pagination. In the documentation you'll find the sync examples
- Page-based API
- Offset-based API
- Next-Page link-based API
Which cover the most common paging setups.