# ルックアップの参照側アプリからの一括更新について

**URL:** <https://community.cybozu.dev/t/topic/917>\
**Category:** kintone 開発相談\
**Created:** [2017 年 9 月 21 日午後 12:01 UTC](https://community.cybozu.dev/t/topic/917 "2017-09-21T12:01:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Legacy\_Account1699](https://avatars.discourse-cdn.com/v4/letter/l/71e660/32.png) [@Legacy\_Account1699](https://community.cybozu.dev/u/Legacy_Account1699)\
**Post date:** [2017 年 9 月 21 日午後 12:01 UTC](https://community.cybozu.dev/t/topic/917/1 "2017-09-21T12:01:53Z")

</div>

JavaScript初心者のAkiと申します。

「第11回 kintone REST APIを利用したレコード更新」[https://developer.cybozu.io /hc/ja/articles/204537310](https://developer.cybozu.io%20/hc/ja/articles/204537310)  
サンプルはできました。  
しかし、参照側からkintone REST APIのGETを使ったデータ取得  
およびPUTを使った更新を考えておりますが、GETで取得した  
データをどのようにPUTに渡せば良いのかわかりません。  
GETで取得したデータを加工して、PUTするような方法は  
ございますでしょうか。

---

<div class="post-metadata">

**Author:** ![Legacy\_Account1657](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@Legacy\_Account1657](https://community.cybozu.dev/u/Legacy_Account1657)\
**Post date:** [2017 年 9 月 25 日午前 11:01 UTC](https://community.cybozu.dev/t/topic/917/2 "2017-09-25T11:01:42Z")

</div>

Akiさん

GETで取得した情報を変数に入れて利用するまたは、そのまま利用する形になるかと思います。

取得した情報を元に、別のアプリを更新するだけなら、下記などでも更新ができるかと。

アプリ、レコードIDに関しては、適当なので適宜してください。

&nbsp;

var body = {“app”:3428,“id”:6};

kintone.api(‘/k/v1/record’, ‘GET’, body, function(resp) {

&nbsp; // ↓取得した情報を利用しリクエスト作成  
&nbsp; var x = resp.record.Email.value;

&nbsp; var parm = { “app”:3246,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “id”:2,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “record”:{  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“text”:{  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;“value”: x  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp;kintone.api(‘/k/v1/record’, ‘PUT’, parm, function(e){  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;console.log(e);  
&nbsp; &nbsp;});

}, function(error) {  
&nbsp; // error  
&nbsp; console.log(error);  
});

---

<div class="post-metadata">

**Author:** ![Legacy\_Account1699](https://avatars.discourse-cdn.com/v4/letter/l/71e660/32.png) [@Legacy\_Account1699](https://community.cybozu.dev/u/Legacy_Account1699)\
**Post date:** [2017 年 10 月 3 日午後 12:37 UTC](https://community.cybozu.dev/t/topic/917/3 "2017-10-03T12:37:58Z")

</div>

ありがとうございます。

「第11回 kintone REST APIを利用したレコード更新」を見直して自己解決しました。
