フォームの設計情報を更新したり、フォームのレイアウトやフィールドの一覧を取得したりするには、次のAPIを利用してください。
- フィールド
- フォームのレイアウト
フォームの設計情報を取得する
フォームの設計情報を取得します。
URL
URLは、運用環境の設定を取得する場合と、テスト環境の設定を取得する場合とで異なります。
運用環境の設定を取得する場合
- 通常のアプリ
- https://sample.cybozu.com/k/v1/form.json
- ゲストスペースのアプリ
- https://sample.cybozu.com/k/guest/
GUEST_SPACE_ID/v1/form.json
動作テスト環境の設定を取得する場合
- 通常のアプリ
- https://sample.cybozu.com/k/v1/preview/form.json
- ゲストスペースのアプリ
- https://sample.cybozu.com/k/guest/
GUEST_SPACE_ID/v1/preview/form.json
HTTPメソッド
GET
必要なアクセス権
次のいずれかの権限が必要です。
- アプリのレコード閲覧権限
- アプリのレコード追加権限
リクエスト
パラメーター
| パラメーター名 | 型 | 必須 | 説明 |
|---|---|---|---|
| app | 数値または文字列 | 必須 | アプリのID |
リクエストの例(URLにパラメーターを含める場合)
URL
https://sample.cybozu.com/k/v1/form.json?app=4
ヘッダー
|
|
リクエストヘッダーの詳細は共通仕様を参照してください。
kintone REST APIの共通仕様
リクエストの例(リクエストボディにパラメーターを含める場合)
URL
https://sample.cybozu.com/k/v1/form.json
ヘッダー
|
|
リクエストヘッダーの詳細は共通仕様を参照してください。
kintone REST APIの共通仕様
ボディ
|
|
レスポンス
プロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties | 配列 | アプリを構成するフィールドの一覧properties[].typeごとに、フィールドの内容が異なります。詳細は別表に記載しています。 |
| properties[].type | 文字列 | フィールドのタイプ タイプによって、次の値が返ります。
|
文字列(1行)フィールドのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「SINGLE_LINE_TEXT」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].expression | 文字列 | 自動計算で設定された式 |
| properties[].hideExpression | 文字列 | 計算式を表示しないかどうか
|
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].unique | 文字列 | 値の重複を許可するかどうか
|
| properties[].minLength | 文字列 | 文字数(最小) 整数が返ります。 設定されていない場合には、「null」が返ります。 |
| properties[].maxLength | 文字列 | 文字数(最大) 整数が返ります。 設定されていない場合には、「null」が返ります。 |
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
文字列(複数行)のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「MULTI_LINE_TEXT」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
リッチエディターのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「RICH_TEXT」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
数値のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「NUMBER」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].digit | 文字列 | 桁区切りを表示するかどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].unique | 文字列 | 値の重複を許可するかどうか
|
| properties[].minValue | 文字列 | 値の制限(最小) 整数が返ります。 設定されていない場合には、「null」が返ります。 |
| properties[].maxValue | 文字列 | 値の制限(最大) 整数が返ります。 設定されていない場合には、「null」が返ります。 |
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].displayScale | 文字列 | 小数点以下の表示桁数 整数が返ります。 設定されていない場合には、「null」が返ります。 |
| properties[].unit | 文字列 | 単位記号 設定されていない場合には、「null」が返ります。 |
| properties[].unitPosition | 文字列 | 単位記号を付ける位置 次の値が返ります。
|
| properties[].code | 文字列 | フィールドコード |
計算のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「CALC」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか 「false」が返ります。 |
| properties[].expression | 文字列 | 自動計算で設定された式 |
| properties[].hideExpression | 文字列 | 計算式を表示しないかどうか
|
| properties[].format | 文字列 | フォーマット 次のいずれかの値が返ります。
|
| properties[].displayScale | 文字列 | 小数点以下の表示桁数 整数が返ります。 設定されていない場合には、「null」が返ります。 |
| properties[].unit | 文字列 | 単位記号 設定されていない場合には、「null」が返ります。 |
| properties[].unitPosition | 文字列 | 単位記号を付ける位置 次の値が返ります。
|
| properties[].code | 文字列 | フィールドコード |
ラジオボタンのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「RADIO_BUTTON」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか 「true」が返ります。 |
| properties[].options | 配列(配列) | 項目の一覧 |
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
チェックボックスのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「CHECK_BOX」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].options | 配列(配列) | 項目の一覧 |
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
複数選択のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「MULTI_SELECT」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].options | 配列(配列) | 項目の一覧 |
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
ドロップダウンのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「DROP_DOWN」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].options | 配列(配列) | 項目の一覧 |
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
ユーザー選択のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「USER_SELECT」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].code | 文字列 | フィールドコード |
組織選択のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「ORGANIZATION_SELECT」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].code | 文字列 | フィールドコード |
グループ選択のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「GROUP_SELECT」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].code | 文字列 | フィールドコード |
日付のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「DATE」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].unique | 文字列 | 値の重複を許可するかどうか
|
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].defaultExpression | 文字列 | 初期値に設定された式 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
時刻のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「TIME」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].defaultExpression | 文字列 | 初期値に設定された式 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
日時のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「DATETIME」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].unique | 文字列 | 値の重複を許可するかどうか
|
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].defaultExpression | 文字列 | 初期値に設定された式 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
添付ファイルのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「FILE」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].code | 文字列 | フィールドコード |
リンクのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「LINK」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].unique | 文字列 | 値の重複を許可するかどうか
|
| properties[].protocol | 文字列 | リンクの種類 次のいずれかの値が返ります。
|
| properties[].minLength | 文字列 | 文字数(最小) 整数が返ります。 設定されていない場合には、「null」が返ります。 |
| properties[].maxLength | 文字列 | 文字数(最大) 整数が返ります。 設定されていない場合には、「null」が返ります。 |
| properties[].defaultValue | 文字列 | 初期値 設定されていない場合には、「null」が返ります。 |
| properties[].code | 文字列 | フィールドコード |
関連レコード一覧のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「REFERENCE_TABLE」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].relatedApp | 数字 | 参照するアプリのアプリID |
| properties[].code | 文字列 | フィールドコード |
ルックアップのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ コピー元のフィールドのタイプによって、次のいずれかの値が返ります。
|
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].required | 文字列 | 必須項目にするかどうか
|
| properties[].relatedApp | 数字 | 参照するアプリのアプリID |
| properties[].code | 文字列 | フィールドコード |
テーブルのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「SUBTABLE」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].fields | 配列 | テーブル内のフィールドの一覧 |
| properties[].code | 文字列 | フィールドコード |
ラベルのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「LABEL」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
スペースのプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「SPACER」が返ります。 |
| properties[].elementId | 文字列 | 要素のID |
罫線のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「HR」が返ります。 |
レコード番号のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「RECORD_NUMBER」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].code | 文字列 | フィールドコード |
作成者のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「CREATOR」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].code | 文字列 | フィールドコード |
作成日時のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「CREATED_TIME」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].code | 文字列 | フィールドコード |
更新者のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「MODIFIER」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].code | 文字列 | フィールドコード |
更新日時のプロパティ
| プロパティ名 | 型 | 説明 |
|---|---|---|
| properties[].type | 文字列 | フィールドのタイプ 「UPDATED_TIME」が返ります。 |
| properties[].label | 文字列 | フィールド名 |
| properties[].noLabel | 文字列 | フィールド名を表示しないどうか
|
| properties[].code | 文字列 | フィールドコード |
レスポンスの例
|
|
サンプルコード
curlを使ったリクエスト
ご利用の環境によって、curlのフォーマットは異なる場合があります。
詳細は、次のページを参照してください。
curlコマンドでkintone REST APIを実行してみよう/3.API実行
|
|
kintone.api()を使ったリクエスト
kintone.api()の詳細は、次のページを参照してください。
kintone REST APIリクエストを送信する
|
|
制限事項
- 次のフィールドは取得できません。
- カテゴリー
- ステータス
- グループ
- グループフィールド内に配置された次のフィールド
- レコード番号
- 作成者
- 作成日時
- 更新者
- 更新日時
- スペース
- ラベル
- 罫線