API Post a New Card with multiple Parameters

Comments

2 comments

  • Avatar
    Anish Venkat

    Hello Colin,

    When you use a dictionary in Python, it replaces the key value pair when the key used is same. Although, you can use lists to append new values.

    We recommend using a list of tuples along with urllib.urlencode which is part of Python’s standard library. No standard library does recursive url-encoding in a predictable way.

    from urllib import urlencode

    d1 = [("card[name]", "Name"),

    ("card[description]", "Description"),

    ("card[card_type_name]", "Suggestion"),

    ("card[properties][][name]", "Status"),

    ("card[properties][][value]", "New"),

    ("card[properties][][name]", "Email"),

    ("card[properties][][value]", "Email")]

    print(urlencode(d1))

    Please reach out to us as support@thoughtworks.com in case you have any questions.

    Regards,

    Anish

    0
    Comment actions Permalink
  • Avatar
    Colin Kelso

    That makes sense, thanks!

    0
    Comment actions Permalink

Please sign in to leave a comment.