At the Moment, my Task is to automate some processes in our Company. One of them is to automaticilly creating pages on our Knowledgebase from Attlassian Confluence.
Normally I'm a .Net developer and I'm not familiar with REST
API's. So I've read the documentation and that gave me the following line to create a new page:
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/
My Problem is, that I don't know, how to do this in C#.
I don't have a code example because I've done this via PowerShell and the ConfluencePS module. However, much of it can be done leveraging the .Net Framework.
In case it's useful to you, I suggest you familiarize yourself with the following - some of it depending on your .Net Framework version (e.g., 4.5+):
And, a word of warning! When dealing with the Confluence RESTful API documentation make certain the documentation is for your specific Confluence version. Sounds obvious but it can be difficult to line the two up correctly.