PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, November 6, 2022

[FIXED] How to add multiple text values in single API call in monday.com

 November 06, 2022     curl, monday.com     No comments   

Issue

I need to add multiple text values to my group on monday.com. How can I achieve that? The below code is working fine for single-column insertion

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}}"
}
'

Solution

I got the solution, use column id to insert values

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}}"
}'

Use this to get column ids

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 } }}"
}
'


Answered By - byteC0de
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing