It's all about the answers!

Ask a question

Using cURL to directly "Download file for viewing"


Alberto Teodoro (6632236) | asked Nov 09 '21, 3:40 a.m.

Hi all,

I would like to use cURL to directly download files from DOORS NG.
When I have an Artifact stored as file (e.g. docs, txt, etc ...) I would like to download it via cURL, without accessing to the DNG Dashboard and using authentication in the cURL command line: how can I do it?
Please can you post here some examples of cURL command line?

Many thanks
Alberto

One answer



permanent link
David Honey (1.5k17) | answered Nov 09 '21, 5:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You will still need to perform authentication. You can use basic form based authentication as described in https://jazz.net/forum/questions/81935/using-curl-command-line-to-monitor-performance.


Comments
Alberto Teodoro commented Nov 09 '21, 9:22 a.m.

Hi David,

thank you.

Then, after I'll be authenticated, which API for GETting the recource I have to use?
Can you put here an example in a cURL command line?

Many many thanks.
Alberto
 


David Honey commented Nov 09 '21, 9:46 a.m. | edited Nov 09 '21, 9:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Just a GET on the resource URI with appropriate Accept header, and Oslc-Core-Version: 2.0 header. DN has a copy link action to determine the URI of a requirement shown in the UI. Or you can get the URI through an OSLC query or referenced by some other known resource.


Ian Barnard commented Nov 16 '21, 4:28 a.m. | edited Nov 16 '21, 4:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If the project is configuration-managed you'll have to include the configuration URL using either header Configuration-Context or URL query oslc_config.context - making sure to correctly encode the query value.

Ralph Schoon commented Nov 16 '21, 5:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You guys sure that artifact download is part of the supported OSLC API? 

Your answer


Register or to post your answer.