Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Token not work properly in my script

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

1 answer

1 accepted

0 votes
Answer accepted
Shawn C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 18, 2018

Hi Wei, 

The API Tokens that you can generate at ID.atlassian.com can only be used for REST API Access to your Atlassian Cloud Instances; you cannot use it to directly access Confluence. 

If you need to pull the content of your Confluence pages into another program, you'll need to use a Different URL; try using: 

curl -X GET 
'https://INSTANCE.atlassian.net/wiki/rest/api/content/<PAGEID>?expand=body.storage'
--user emailaddress:TOKEN

 For your particular page, try: 

'https://irdeto.atlassian.net/wiki/rest/api/content/911442221?expand=body.storage'

Please note that pulling content via the REST API does not return a 'pretty' output and instead the JSON that makes up the page. 


-Shawn

Hi Shawn:

 

Thanks a lot for your reply!

I just tried your suggestions and it works for me, json format is good enough, really appreciated!

 

 

Best Regards

Wei

Hi Shawn:

 

Do you also know where I can find the definitions if the rest apis? (e.g. schema, parameters) becuase I found there still some part is missing from the body, it can be seen on the webui but not in json response. I found the rest api is quit useful for my project, so if I can get more information about it could be really helpful.

Thanks in advance!

 

Best Regards

Wei

Shawn C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 19, 2018

Hi Wei, 

We publish a Doc that covers our Confluence API Endpoints and some of the parameters that can be expanded upon in the calls. 

Cheers, 

Shawn

Hi Shawn:

 

That quite helpful and exactly what I need, thanks a lot!

 

Best Regards

Wei

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events