Forum Discussion

mgxirsh's avatar
mgxirsh
Frequent Visitor
2 years ago

accessing images

Hello,

How can I programmatically access an image stored on your cloud?

I need to process your XML export which contains links to images.

e.g. https://cloudfront.tm4j.smartbear.com/tenant/abc/project/123/xyz.png 

Do you have an API for this? Something like a simple get request (authorized with an api token).

 

What I’ve tried so far, is a Get request with a cookie called ‘jwt’ set (the value is taken from the session when I log into Attlassian). But this is not long term solution.

 

I saw a similar question here, but with no replies https://community.smartbear.com/t5/Zephyr-Scale-Questions/Is-there-API-to-download-attachments-from-test-amp-steps/m-p/260153

 

Thanks!

  • womullan's avatar
    womullan
    Occasional Contributor

    Your link to submit a message worked - I just could not create an account on support ..  thanks

     

  • womullan's avatar
    womullan
    Occasional Contributor

    After frustrating back and forth about private APIs (coudfront is prvate apparently). I got the simlpe answer whihc could have been given immediatly - YOU CAN NOT DO THIS. 

    From support "Additionally, Zephyr Scale Cloud currently does not offer a public endpoint to handle attachments. Images can only be added or downloaded through the UI. Unfortunately, it is not possible to add or download images via the REST API at this time. It is expected to be available within the next few quarters."

     

    So the API is incomplete (to say the least). 

  • MisterB's avatar
    MisterB
    Champion Level 3

    Hi,

     

    I see that no one's replied to your request - this is a user community forum.  You will probably get the answer you need if you contact the SmartBear support team here: SmartBear Support

     

    But to help you get started...

     

    There is an API - links are here (note: they are version dependent)

    Zephyr Scale for Jira Cloud API - if you're using the Cloud version of ZS

    Zephyr Scale Server API (v1) - if you're on the Server/Data version of ZS

     

    There is also a secure token for API requests under your profile:

     

     

     

     

     

  • womullan's avatar
    womullan
    Occasional Contributor

    The  API token mentioned above does not work for the images on cloud front - it simply says JWT not fount in headers or cookies . It does worj for all the zephyr calls - does cloudfront have a different AUTH requirement ? Like its putting another JWT dynamically in a cookie which does not work when programtically accessing the system?

  • MisterB's avatar
    MisterB
    Champion Level 3

    I don't know why that would be but will try to help.  Do you get an error message you can share?

    Copying D0UG who may be able to help also

  • MisterB's avatar
    MisterB
    Champion Level 3

    Thanks for letting us now the outcome of your conversation.  I sense a little frustration :P