confluence-rest-api

How to upload a file to Atlassian Confluence page using curl

时光毁灭记忆、已成空白 提交于 2019-12-10 02:39:47
问题 I am trying to upload an .xls file to a Confluence wiki page following the guidelines given in the Remote API documentation : https://developer.atlassian.com/confdev/confluence-server-rest-api/confluence-rest-api-examples#ConfluenceRESTAPIExamples-Uploadanattachment curl -v -S -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "comment=this is my file" "http://localhost:8080/confluence/rest/api/content/3604482/child/attachment" | python -mjson.tool This is what I

Confluence REST API Authorization issue

∥☆過路亽.° 提交于 2019-12-08 06:03:53
问题 I am having issues with Atlassian Confluence REST API authentication. Please take a look at following C# code : private string USERNAME = "test"; private string PASSWORD = "test"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://xxx.atlassian.net/wiki/rest/api/content?os_authType=basic&spaceKey=DEV&Title=Development&expand=space,body.view,version,container"); request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(USERNAME +

How can I create a new page to confluence with Python

大憨熊 提交于 2019-12-07 12:43:11
问题 I am trying to create a new page into confluence using Python's xmlrpclib . I already know how to update content of an existing page, but how can I create a totally new page? I have used following script to update content: import xmlrpclib CONFLUENCE_URL='https://wiki.*ownURL*/rpc/xmlrpc' def update_confluence(user, pwd, pageid, newcontent): client = xmlrpclib.Server(CONFLUENCE_URL,verbose=0) authToken=client.confluence2.login(user,pwd) page = client.confluence2.getPage(authToken, pageid)

Create Page In Confluence Via Rest API using Java

江枫思渺然 提交于 2019-12-06 09:13:55
问题 Does anyone have any examples on how to create a page/wiki entry in Confluence using Confluence's RESTful API? I'm trying to write something in Java that can do this. Thank you in advance... 回答1: Thank you, I already checked the documentation online but I couldn't find any examples THAT USE JAVA in the Confluence REST API. That's why I posted on here. Regardless, I think I figured it out: import org.apache.commons.io.IOUtils; import org.apache.http.HttpEntity; import org.apache.http

How can I create a new page to confluence with Python

南楼画角 提交于 2019-12-05 20:28:51
I am trying to create a new page into confluence using Python's xmlrpclib . I already know how to update content of an existing page, but how can I create a totally new page? I have used following script to update content: import xmlrpclib CONFLUENCE_URL='https://wiki.*ownURL*/rpc/xmlrpc' def update_confluence(user, pwd, pageid, newcontent): client = xmlrpclib.Server(CONFLUENCE_URL,verbose=0) authToken=client.confluence2.login(user,pwd) page = client.confluence2.getPage(authToken, pageid) page['content'] = newcontent cient.confluence2.storePage(authToken, page) client.confluence2.logout

How to post Swagger API documentation to Atlassian Confluence programmatically? (Usage of Swagger Confluence tool and Confluence REST API)

霸气de小男生 提交于 2019-12-05 04:49:19
I'm trying to upload my Swagger JSON schema (myapi.json) into Atlassian Confluence using the swagger - confluence standalone tool . The standalone CLI .jar should (according to my understanding) operate like this (used this page for credentials Base64 encoding): java -jar <system path root>/swagger-confluence-cli-all-2.2-RELEASE.jar -u "http(s)://<server>:<port>/confluence/rest/api/" -b "<base64 encoded userid:password string" -a "<parent page id>" -k "<space key>" -g "true" -i "true" -s "<myschema.json>" -t "<Title for generated page>" -m "single" Output (404 Not found): 2016-08-23 15:08:12

How to upload a file to Atlassian Confluence page using curl

99封情书 提交于 2019-12-05 03:14:57
I am trying to upload an .xls file to a Confluence wiki page following the guidelines given in the Remote API documentation : https://developer.atlassian.com/confdev/confluence-server-rest-api/confluence-rest-api-examples#ConfluenceRESTAPIExamples-Uploadanattachment curl -v -S -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "comment=this is my file" "http://localhost:8080/confluence/rest/api/content/3604482/child/attachment" | python -mjson.tool This is what I am doing: curl -v -S -u username:password -X POST -H "X-Atlassian-Token: nocheck" -F "file=@/path/to

Python client error 'Connection reset by peer'

╄→гoц情女王★ 提交于 2019-11-29 08:39:52
问题 I have written a very small python client to access confluence restful api. I am using https protocol to connect with the confluence. I am running into Connection reset by peer error. Here is the full stack trace. /Users/rakesh.kumar/.virtualenvs/wpToConfluence.py/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the

Python client error 'Connection reset by peer'

↘锁芯ラ 提交于 2019-11-29 04:01:31
I have written a very small python client to access confluence restful api. I am using https protocol to connect with the confluence. I am running into Connection reset by peer error. Here is the full stack trace. /Users/rakesh.kumar/.virtualenvs/wpToConfluence.py/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to

How to create new page in Confluence using their REST API? [closed]

微笑、不失礼 提交于 2019-11-27 07:27:10
I need working example of creating new wiki page in confluence using rest api. I prefer the new page to be created under specific space and specific page. I read their api documentation and looked at few examples they had and still coming short. Here is an example they had on their site curl -u admin:admin -X POST -H 'Content-Type: application/json' -d'{"type":"page","title":"new page","space":{"key":"TST"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' http://localhost:8080/confluence/rest/api/content/ | python -mjson.tool I tried above with my space