(批量抓取紀錄)選取記錄

information

本頁面使用機器翻譯而成。
機器翻譯免責聲明 (External link)

目錄

從游標中選取記錄

從游標中選取記錄。

URL

常規應用程式
https://sample.cybozu.com/k/v1/records/cursor.json
訪客空間的應用程式
https://sample.cybozu.com/k/guest/GUEST_SPACE_ID/v1/records/cursor.json

HTTP 方法

GET

所需存取權限

  • 查看應用程式中記錄的許可權
  • 查看要選取其值的記錄的許可權
  • 查看要選取其值的欄位的許可權

請求

參數
參數名稱 類型 必須 說明
id 字串 必須 游標ID
範例請求(如果要在網址中包含參數 )
URL

https://sample.cybozu.com/k/v1/records/cursor.json?id=9a9716fe-1394-4677-a1c7-2199a5d28215

標頭
1
2
3
{
  "X-Cybozu-API-Token": "API_TOKEN"
}

關於請求標頭,請參見 kintone REST API的通用規範

範例要求(如果要在要求內文中包含參數)
URL

https://sample.cybozu.com/k/v1/records/cursor.json

標頭
1
2
3
4
{
  "X-Cybozu-API-Token": "API_TOKEN",
  "Content-Type": "application/json"
}

關於請求標頭,請參見 kintone REST API的通用規範

內文
1
2
3
{
  "id": "9a9716fe-1394-4677-a1c7-2199a5d28215"
}

回應

屬性
屬性名稱 類型 說明
records 陣列 記錄清單
有關欄位格式,請參閱 欄位格式
next 布爾值 是否有以下記錄:
  • true:有記錄
  • false: 暫無記錄
示例回應
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "records": [
    {
      "記錄號碼": {
        "type": "RECORD_NUMBER",
        "value": "1"
      },
      "建立人": {
        "type": "CREATOR",
        "value": {
          "code": "Administrator",
          "name": "Administrator"
        }
      },
      "建立時間": {
        "type": "CREATED_TIME",
        "value": "2019-05-23T04:50:00Z"
      }
    }
  ],
  "next": false
}

示例代碼

使用 curl 的請求
1
2
3
4
5
6
curl -X GET 'https://sample.cybozu.com/k/v1/records/cursor.json' \
  -H 'X-Cybozu-API-Token: API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "9a9716fe-1394-4677-a1c7-2199a5d28215"
  }'
發送kintone REST API請求 使用API 發送請求
1
2
3
4
5
const body = {
  id: '9a9716fe-1394-4677-a1c7-2199a5d28215'
};

await kintone.api(kintone.api.url('/k/v1/records/cursor.json', true), 'GET', body);

補充

  • 記錄中數據的語言由身份驗證方法確定。

    • API 令牌身份驗證:”Administrato”顯示語言
    • 其他認證方式:執行API的用戶的顯示語言

    如果語言設置為“遵循 Web 瀏覽器設置”,則要檢索的語言將根據 請求標頭 中是否包含“Accept-Language”而更改。

    • 帶標頭:”Accept-Language”標頭中指定的語言
    • 無標頭:在通用管理的” 置區域設 (External link) “中設置 cybozu.com 語言

限制

  • 可以從遊標中檢索的記錄是在創建遊標時檢索到的記錄。
    但是,在執行此 API 時將返回該欄位的值。
  • 如果在創建遊標后更改了許可權設置,則更改的設置可能會檢索到不應滿足過濾條件的記錄。
    但是,您無法獲取您無權查看的欄位的值。
  • 如果在創建遊標后更改運行 API 的用戶的語言設置,則多語言欄位將受到影響。
  • 檢索到可從游標中檢索的所有記錄后,將自動刪除該遊標。
  • next 即使在回應中 true ,記錄在下一個請求中可能仍為空。