Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

CLI command for linking attachments

David Soldan September 6, 2011

Hello everybody,

Does the Confluence Command line Interface provide a command for setting a link on a page to a attachment??

I tried the "addAttachment" but it just move the attachment to the page.

Greetings David

2 answers

1 vote
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 6, 2011

Not sure what you are trying to do, but, if you need to change the page source in any way (like adding links etc...), you need to use storePage. You can retrieve the existing source using getPageSource.

David Soldan September 6, 2011

Would it be something like confluence.bat --action storePage --space "space" --title "title" --content "[data.png|This is a picture] ??^^

David Soldan September 6, 2011

For example i load an attachement on a page with "--loadFiles". This Attachement can be downloaded if you click on the paperclip symbol but i want that the file is linked on that page. You know what i mean?

So how would i use the storePage command in this case? The parameters --space and --title are clear but what do i use for content/file ??

David Soldan September 6, 2011

Ok that would work, but if i use the command --storePage the new content replaces the old one!

David Soldan September 6, 2011

If I use "--storepage" with adding new content, the new content replaces the old one. Is it possible to just attach the new content after the old ??

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 7, 2011

Use getPageSource to get the existing source, append whatever you want, then storePage

0 votes
LM September 7, 2011

You could try https://github.com/leonardinius/atlassian-rest-cli to script it, if you are ok to script groovy code around Confluence API.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events