獲取kintone REST API的Schema資訊
本頁面使用機器翻譯而成。
機器翻譯免責聲明
獲取kintone REST API的Schema資訊
獲取指定kintone REST API的Schema資訊。
Schema資訊不適用於以下 API:
- 獲取kintone REST API清單API
- 獲取kintone REST API的Schema資訊(此API)
URL
https://sample.cybozu.com/k/v1/apis/API_ID.json
路徑參數
| 參數名稱 | 說明 |
|---|---|
| API 的 ID | 用於獲取Schema資訊的 API 的 ID ID是 apis獲取kintone REST API清單的金鑰名稱獲取kintone REST API清單 例如,獲取單條記錄API ( /k/v1/record.json [GET]),鍵名稱為「record/get」,URL 路徑為「https://sample.cybozu.com/k/v1/apis/record/get.json」。 |
HTTP 方法
GET
所需存取權限
無
不需要驗證資訊。
請求
參數
無
示例請求
URL
https://sample.cybozu.com/k/v1/apis/record/get.json
標頭
無
回應
即使禁用「空間」,「用戶」或「訪客空間」功能,您仍將獲得所有 API 的清單。
| 屬性名稱 | 值類型 | 內容 |
|---|---|---|
| id | 字串 | kintone REST API通用規範 |
| baseUrl | 字串 | 用於執行 API 的基本 URL |
| path | 字串 | API 路徑baseUrl和path是 API 的 URL。 |
| httpMethod | 字串 | 用於執行 API 的 HTTP 方法 |
| request | 物件 | API 請求的Schema資訊 它以 JSON Schema表示。 |
| response | 物件 | API 回應Schema資訊 它以 JSON Schema表示。 |
| schemas | 物件 | API 中常用的 Schema 資訊清單 屬性名稱是表示Schema資訊的字串。 選擇JSON Schema的 $ref |
示例回應
|
|
關於 JSON Schema
上述請求、回應和架構中使用的 JSONSchema基於草稿 v4。
它使用core和validation,而不是hyper schema。
-
core definitions and terminology draft-zyp-json-schema-04
-
interactive and non interactive validation draft-fge-json-schema-validation-00
類型和格式
除了JSON Schema中定義的格式外,還定義了以下格式來表示kintone的參數限制。
kintone將來可能會添加自己的格式。
| type | format | 說明 |
|---|---|---|
| string | long | -9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807 範圍內的整數類型 |
| string | locale | 「」、「en」、「ja」或「zh」的字符串 |
| string | boolean | 「true」或「false」字符串 |
| string | 電子郵件格式字串 | |
| string | number | 實實型 |
| string | query | kintone查詢表示法 有關查詢格式的詳細資訊,請參閱以下頁面: kintone API的查詢編寫基礎 |
| string | date-time | ISO 格式的日期和時間字串 |
| string | timezone | 指示時區的字串 |
獲取檔 API 的架構
上傳檔案API
JSON Schema請求物件包含kintone內部類型資訊。
實際請求應以 multipart/form-data 格式發送。
下載檔案API
JSON Schema回應物件返回空。
實際請求下載檔案。
示例代碼
使用 curl 的請求
根據您的環境,curl 的格式可能會有所不同。
有關說明,請參閱以下頁面。
使用curl命令執行kintone REST API/3.執行API
|
|
使用kintone.api()發送請求
有關詳細的kintone.api(),請參閱以下頁面。
發送kintone REST API請求
|
|