SmartBear/zephyr-scale-api-v1-examples

API V1 Attachment Format

Closed this issue · 4 comments

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/

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

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

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

Ok ticket is in - Thanks again.