Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bz0/6da681361d97d6a8a79b194687fc73b1 to your computer and use it in GitHub Desktop.
Save bz0/6da681361d97d6a8a79b194687fc73b1 to your computer and use it in GitHub Desktop.

https://developer.cybozu.io/hc/ja/articles/204693590-%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE%E4%BD%9C%E6%88%90%E3%81%A8%E8%A8%AD%E5%AE%9A%E3%81%AE%E5%A4%89%E6%9B%B4

STEP1.テスト環境にアプリを作成する

アプリを作成する

CURLコマンド

curl
-H "Content-Type:application/json"
-H "X-Cybozu-Authorization: ユーザ名:パスワード(BASE64変換)"
-d '{"name":"{アプリ名}"}'
https://{サブドメイン}.cybozu.com/k/v1/preview/app.json

参考

Base64変換ツール https://kujirahand.com/web-tools/Base64.php

Step2.アプリを設定する

フォームにフィールドを追加する

CURLコマンド

curl 
-H "Content-Type: application/json" 
-H "X-Cybozu-Authorization: ユーザ名:パスワード(BASE64変換)" 
-d '{"app":STEP1で作成したアプリ番号,"properties":{"文字列__1行_":{"code":"文字列__1行_","defaultValue":"","expression":"","hideExpression":false,"maxLength":64,"minLength":0,"label":"文字列(1行)","noLabel":false,"required":true,"type":"SINGLE_LINE_TEXT","unique":true}}}' 
https://{サブドメイン}.cybozu.com/k/v1/preview/app/form/fields.json

参考

フォームの設定の変更
https://developer.cybozu.io/hc/ja/articles/204529724#anchor_changeform_addfields

Step3.運用環境にアプリの設定を反映する

アプリの設定反映

CURLコマンド

curl
-H "Content-Type:application/json"
-H "X-Cybozu-Authorization: ユーザ名:パスワード(BASE64変換) "
-d '{"apps": [{ "app": STEP1で作成したアプリ番号 }]}'
https://{サブドメイン}.cybozu.com/k/v1/preview/app/deploy.json

参考

アプリの設定の運用環境への反映
https://developer.cybozu.io/hc/ja/articles/204699420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment