500 internal server error with POST issues

500 internal server error with POST issues

Anonymous
Not applicable
1,145 Views
2 Replies
Message 1 of 3

500 internal server error with POST issues

Anonymous
Not applicable

when I'm trying to create an issue on BIM360, server returns 500.

the script is below.

import requests

url = 'https://developer.api.autodesk.com/issues/v1/containers/<container_id>/quality-issues'
headers = {"Authorization": "Bearer " + <access_token>, "Content-Type": "application/vnd.api+json"}
body = '{"data": {"type": "quality_issues", "attributes": {"title": "test", "status": "open", "ng_issue_type_id": "9eadb99d-368b-4041-8c28-e528168291a9", "ng_issue_subtype_id": "9cf16915-2123-4a01-b891-0453f9b74f39", "due_date": "2020-09-31T05:00:30.001000"}}}'

response = requests.post(url=url, headers=headers, data=body)

 

what am I doing wrong with this code?

I know that it worked with curl.

 

thank you 

0 Likes
1,146 Views
2 Replies
Replies (2)
Message 2 of 3

steve.alberts
Participant
Participant

Did you ever manage to resolve this? I am running into the same problem and I can't figure out what is wrong, even the example they give in the docs gives 500

0 Likes
Message 3 of 3

mikako_harada
Alumni
Alumni

Hi Steve, 

 

Looks like this is the same question as another one. Could you take a look at it?  I just replied to your thread:  

https://forums.autodesk.com/t5/bim-360-api-forum/posting-issues-to-bim-360-returns-500-error/m-p/105...

 


Mikako Harada
Developer Technical Services
0 Likes