Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Token not work properly in my script

Wei Zhou
September 14, 2018

Hi There:

I am currently working on a tool to create a abbrivation database, and one of the source is the wiki pages in atlassian.com, I tried the create a token to access the wiki pages through scripts, but it will return page not found (attached), even I followed the instruction to use curl command like "url https://irdeto.atlassian.net/wiki/spaces/SCM/pages/911442221/CPMU+Overview --user wei.zhou@irdeto. com:MY-TOKEN" it still get the same result, but if I login manully, iI can access the wiki page. could you please advise is there any configuration I was missing?

Best Regards
Weipage_not_found.png

2 answers

0 votes
Stephen Deutsch
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 Champions.
April 4, 2016
0 votes
Aleks Yenin (Polontech)
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 Champions.
April 4, 2016

Hi Tejas,

Invoke-RestMethod -Uri ("http://localhost:8080/confluence/rest/api/content/3604482") -Method Put 
-Headers 'Content-Type: application/json' $Credentials
 -Body '{"id":"3604482","type":"page","title":"new page","space":{"key":"Space you need to move to"},"body":{"storage":{"value":"<p>This is the updated text for the new page</p>","representation":"storage"}},"version":{"number":2}}'

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events