0

我需要在 monday.com 上的组中添加多个文本值。我怎样才能做到这一点?以下代码适用于单列插入

curl -X POST \
  https://api.monday.com/v2/ \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: eyJhbGciOiJIUzI1NiJ9.eyJ0aWQiOjE4NDcyNDg1LCJ1aWQiOjk2MDE3NDUsImlhZCI6IjIwMTktMDc' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
   "query" :"mutation {create_item (board_id: 279985058, group_id: \"incoming_request\", item_name: \"Apple\", column_values:\"{\\\"text\\\":\\\"jihin\\\"}\") {id}}"
}
'
4

1 回答 1

0

我得到了解决方案,使用列 id 插入值

curl -X POST \
  https://api.monday.com/v2/ \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: eyJhbGciOiJIUzI1NiJ9.NDcyNDg1LCJ1aWQiOjk2MDE3NDUsImlhZCI6IjIwMTktMDc' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
   "query" :"mutation {create_item (board_id: 279985058, group_id: \"incoming_request\", item_name: \"Apple\", column_values:\"{\\\"text_column_id\\\":\\\"jihin\\\"}\") {id}}"
}'

使用它来获取列 ID

curl -X POST \
  https://api.monday.com/v2/ \
  -H 'Authorization: eyJhbGciOiJIUzI1NiJ9.eyJ0aWQiOjE4NDcyNDg1LCJ1a.x_rgVRieSHvzbidQbFw9v8qmnIREubYpundTmbfQDKU' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 551e9ec4-d442-4310-88a9-c19f16407e90' \
  -H 'cache-control: no-cache' \
  -d '{
   "query" :"{boards (ids: 279985058) { columns { id title type } }}"
}
'
于 2019-08-08T08:48:21.433 回答