SmartBear / zephyr-scale-api-v1-examples

1 stars 0 forks source link

API V1 Attachment Format #4

Closed eagleEggs closed 2 years ago

eagleEggs commented 2 years ago

Hello!

Could you assist me with the expected format required for uploading attachments? Unfortunately I'm not seeing much online about it and I'm stuck using V1 for Zephyr Scale. The following receives error 500 and I'm sure it's not expecting the file to be in this format perhaps. Also, do you think there will be updates to V1? Thanks.

`x = {'file': open('test.png', 'rb')}

session = requests.Session()
session.headers.update(
    {'Authorization': 'Bearer APIKEYHERE-REMOVED_FOR_GITHUB_POST', 'Content-Type': 'multipart/form-data'})
response = session.post(url='{}/testrun/XX-C1/attachments'.format(endpointURL),
                        data=x,
                        verify=False)

print(response)`

https://support.smartbear.com/zephyr-scale-server/api-docs/v1/

eagleEggs commented 2 years ago

This is similar to my situation but there was no response to that issue. I'm trying to upload attachment to a test in a cycle.

https://community.atlassian.com/t5/Adaptavist-questions/Can-not-upload-attachment-using-TM4J-API/qaq-p/1965909 https://community.atlassian.com/t5/Adaptavist-questions/Attaching-evidence-to-a-test-execution-API-POST/qaq-p/1239175

nayeligarciac commented 2 years ago

HI , Apologies for the delay, I am sorry you are facing this issue. Can you create a support ticket in here , so we can see this error in more detail?

Thanks, Nayeli

eagleEggs commented 2 years ago

Thanks no worries, I'll be submitting it soon - Have a good one!

eagleEggs commented 2 years ago

Actually I'm not even sure we have a Smart Bear Support ID lol... Is that required here?

Ok ticket is in - Thanks again.