The issue with pagination in the endpoint with the name "Get Records"

I checked your API endpoint: https://developer.kintone.io/hc/en-us/articles/360019245194

And fields “limit” and “offset” in this endpoint not work. Can you help with it?

Hi Dima! Welcome to the community forum.
I’ve edited out your subdomain from the question - there’s no need to reveal it.

Could you send us the detail of the request you sent?
What tools did you use to send the request, and how were the parameters set to the request. This will help us look into your issue quicker.

Hi! I use Postman to send a request. And my request looks as:
curl --location --request GET ‘https://****.kintone.com/k/v1/records.json?limit=1’ \
–header ‘x-cybozu-authorization: *******’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
“app”: 1
}’

I expect to get one item because I have a limit - 1, but I get all of the records, the same situation with offset, it not works

 

Hello Dima,

 

There seems to be an error in the way the request is executed.
When we checked the request you provided, we found that limit was specified in the request header.
Since app is specified in the request body, if you also include limit in the body as shown below, you will retrieve only one item.

curl --location --request GET 'https:// ****.kintone.com/k/v1/records.json' \
--header 'X-Cybozu-Authorization: *******' \
--header 'Content-Type: application/json' \
--data-raw '{
"app":1,
"query":"limit 1"
}'

(Space is required between “limit” and “1”.)

In addition, if you specify limit in the request header, you can also specify app in the header as follows to retrieve only one item.

curl --location --request GET 'https:// ****.kintone.com/k/v1/records.json?app=3711&query=limit%201' \
--header 'X-Cybozu-Authorization: *******'

(You don’t need to specify the Content-Type.
The limit must be specified in the query, and %20 is the value encoded with one-byte spaces.)

 

Hopefully, this helps.