Forums

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

Looking for powershell scipt to upload file to Confluence Page.

Suryakant Keshri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2019

I have utilized below command to upload the file to confluence page. Unable to do that.

Add-ConfluenceAttachment -ApiUri <Uri> -Credential <PSCredential> [[-PageID] <Int32>] -FilePath <String> [-WhatIf] [-Confirm]

 

I think if i have to upload anything to Confluence we need below things :

1. Authenticate to confluence page 

2. Upload the content to confluence

 

Can someone share me powershell script  to do this.

 

When we say confluence page is it he URL which we see in tab :

For example :

https://xyzcomany.atlassian.net/wiki/spaces/SMP/pages/755499009/Testing

 

 

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 16, 2019

Hello Suryakant,

From my understanding, the command you were using was working, and now it is not. Is this correct

If you are on Confluence Cloud, it could be that you haven't switched over to the API token-based authentication. Instead of username and password,  you should use an email address plus the token.

For more details, have a look at Deprecation notice - Basic authentication with passwords and cookie-based authentication. It mentions Jira here but applies to all Cloud sites.

Let me know if you have any questions about that.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events