Project

General

Profile

Script to import issues via REST API in private project

Added by Victor Sergienko about 6 years ago

I'm trying to create an issue via POST request to hostedredmine.com API in Python 3 like:

url = "https://www.hostedredmine.com/issues.json" 
key = "***" 

def createIssue(body):
    body = {'issue': body}
    data = urllib.parse.urlencode({'issue': body})
    data = data.encode('utf-8')
    request = urllib.request.Request(url)

    # adding charset parameter to the Content-Type header.
    request.add_header("Content-Type", "application/json")
    request.add_header("X-Redmine-API-Key", key)
    #request.add_header("Content-Length", len(data))

    f = urllib.request.urlopen(request, data)
    print(f.read().decode('utf-8'))

createIssue({
    'project_id': 'plando',
    'subject': 'test1',
    'notes': 'tetest',
     #'parent_issue_id': '215453',
    }
)

and getting a HTTP Error 500: Internal Server Error.

I've tried various URLs, with and without .json suffix or my project path.

Does anybody have any idea, what could it be?


Replies (51)

RE: Script to import issues via REST API in private project - Added by Gadai BPKB Mobil 7 days ago

https://siapgadaibpkb.blogspot.com/
https://siapgadaibpkb.blogspot.com/2019/09/gadai-bpkb-mobil-harga-tinggi.html
https://siapgadaibpkb.blogspot.com/2019/09/dana-tunai-jaminan-bpkb-mobil.html
https://siapgadaibpkb.blogspot.com/2019/09/pinjaman-jaminan-bpkb-mobil-bunga-rendah.html
https://siapgadaibpkb.blogspot.com/2019/09/pinjaman-dana-jaminan-bpkb-mobil.html
https://siapgadaibpkb.blogspot.com/2019/09/gadai-bpkb-mobil.html
https://kreditmobilindo.blogspot.com/
https://kreditmobilindo.blogspot.com/2019/09/take-over-kredit-mobil.html
https://kreditmobilindo.blogspot.com/2019/09/kredit-mobil-second.html
https://kreditmobilindo.blogspot.com/2019/09/kredit-mobil-bekas-jakarta.html
https://kreditmobilindo.blogspot.com/2019/09/kredit-kepemilikan-mobil.html
https://kreditmobilindo.blogspot.com/2019/09/pembiayaan-kredit-mobil-bekas-termurah.html
https://readthedocs.org/projects/gadai-bpkb-mobil-jakarta/
http://forum.detik.com/pinjaman-dana-jaminan-bpkb-mobil-cepat-langsung-cair-t2174852.html
http://www.lautanindonesia.com/forum/index.php?topic=181814.0
http://www.akonter.com/user/profile/gadaicepat/
https://www.trustpilot.com/review/jaminkanbpkb.com
https://social.microsoft.com/Profile/jaminkanbpkb
https://social.technet.microsoft.com/Profile/jaminkanbpkb
https://social.msdn.microsoft.com/profile/jaminkanbpkb/
http://ejournal.upi.edu/index.php/WapFi/comment/view/4897/0/134226
https://angel.co/company/jaminkanbpkb/
https://rhizome.org/profile/gadai-bpkb-mobil-cepat/
https://gifyu.com/jaminkanbpkb
https://www.zintro.com/profile/jaminkanbpkb
https://myanimelist.net/profile/jaminkanbpkb
https://www.deviantart.com/jaminkanbpkb

(51-51/51)