youngmon/atlassian-qna huggingface dataset:
how to call confluence rest api using php?
Asked by Vidya Shevale:

require_once 'vendor/autoload.php';  

Unirest\\Request::auth('xxx', 'xxx');  
$headers = array( 'Accept' =\> 'application/json', 'Content-Type' =\> 'application/json' );  
$body = '  
{  
"id": "1234",  
"title": "new apge",  
"type": "page",  
"space": {  
"key": "page"  
},  
"status": "current",  
"ancestors": \[  
{  
"id": "page"  
}  
\],  
"body": {  
"view": {  
"value": "22",  
"representation": "view"  
},  
"export_view": {  
"value": "23",  
"representation": "view"  
},  
"styled_view": {  
"value": "24",  
"representation": "view"  
},  
"storage": {  
"value": "25",  
"representation": "view"  
},  
"editor2": {  
"value": "26",  
"representation": "view"  
},  
"anonymous_export_view": {  
"value": "27",  
"representation": "view"  
}  
}  
}  
';  

$response = Unirest\\Request::post( 'http://localhost:8090/confluence/rest/api/content', $headers, $body );  
var_dump($response);  

<br />

above is my code and i am getting header of the confluence in return in broken html format  

I want actual response which mentioned in confluence documentation so that I can implement further operations.  

reply me as soon as possible  
TIA  


Answers:
author: david
body: Hi [@Vidya Shevale](/t5/user/viewprofilepage/user-id/2057399) this is the code you need to use in PHP (simple HTTPRequest, no Unirest) to call Confluence with the POST **Content**operation as you specified:
> \<?php
>
> $request = new HttpRequest();  
> $request-\>setUrl('http://confluenceURL/rest/api/content');  
> $request-\>setMethod(HTTP_METH_POST);
>
> $request-\>setHeaders(array(  
> 'cache-control' =\> 'no-cache',  
> 'Content-Type' =\> 'application/json'  
> ));
>
> $request-\>setBody('{  
> "id": "1234",  
> "title": "new page",  
> "type": "page",  
> "space": {  
> "key": "page"  
> },  
> "status": "current",  
> "ancestors": \[  
> {  
> "id": "page"  
> }  
> \],  
> "body": {  
> "view": {  
> "value": "22",  
> "representation": "view"  
> },  
> "export_view": {  
> "value": "23",  
> "representation": "view"  
> },  
> "styled_view": {  
> "value": "24",  
> "representation": "view"  
> },  
> "storage": {  
> "value": "25",  
> "representation": "view"  
> },  
> "editor2": {  
> "value": "26",  
> "representation": "view"  
> },  
> "anonymous_export_view": {  
> "value": "27",  
> "representation": "view"  
> }  
> }  
> }');
>
> try {  
> $response = $request-\>send();
>
> echo $response-\>getBody();  
> } catch (HttpException $ex) {  
> echo $ex;  
> }

Be aware that you need to specify the right body format to create content, everything is detailed here: <https://docs.atlassian.com/ConfluenceServer/rest/6.12.0/#content-createContent>

Kind regards,

David
Publishing content
Asked by Selvarathi A:

Is it possible to publish the content to wikipedia?


Answers:
author: Grigory Salnikov
body: Hi, [@Selvarathi A](/t5/user/viewprofilepage/user-id/2127622) and welcome to our Community!

Can you, please, be more precise, what are you trying to accomplish?

We need to know more in order to help you.

Thank you!
Conflience API cql call and ordering
Asked by Filip Prebeg:

Hi

I'm trying to get results with a cql call by a page modification/last update order.  
I cannot find the 'order by' keyword list and what keyword to use for that

Call looks like this:  
/rest/api/content/search/?cql=type=page order by ?????  

What keyword should I use to sort by update date, and where could I find a sort list keywords?

Thanks!


Answers:
author: MoroSystems Support
body: Hello Filip,

I think that all of the answers on your questions should be find in this page and its subpages: <https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/>

Regards,  
Martin

comments: author: Filip Prebeg
body: ah ok... cool got it!

thanks a lot!


Tags: confluence-server

server
How to prevent page in Confluence Cloud from constantly refreshing
Asked by Daniel Maglovski:

Hi Community,

Need help with resolving following issue. When I try to access page in Confluence cloud, page is constantly refreshing (tried this on several browsers, Chrome, Firefox and on several workstation all with Windows 7 Pro OS). Don't know how to resolve this issue (attached is the giff that shows this).

![Confluence page refresh issue.gif](/t5/image/serverpage/image-id/34890i7536E1C23903C422/image-size/large?v=v2&px=999 "Confluence page refresh issue.gif")


Answers:
author: Manon Soubies-Camy
body: Hello [@Daniel Maglovski](/t5/user/viewprofilepage/user-id/245809),

Would you happen to have a Page tree macro inserted in that page? It may be related to that bug: [Page contain a page tree macro stay in refresh mode](https://jira.atlassian.com/browse/CONFCLOUD-62662). If not, I'd recommend to [contact Atlassian support](https://support.atlassian.com/contact/) because it really looks like a bug!

Hope this helps,

- Manon

comments: author: Daniel Maglovski
body: Hi Manon,

Thank you for this. Successfully resolved the issue with following instructions from the page that you have provided. Thank you :D

> [![mike.bowen2](https://avatar-cdn.atlassian.com/be89f678e4582bf8baf029148d2c87ef?d=mm&s=16)Mike Bowen](https://jira.atlassian.com/secure/ViewProfile.jspa?name=mike.bowen2) added a comment - 14/Sep/2018 12:06 PM
>
> Workaround is:
>
> 1. Open Confluence cloud on a mobile (In my case I have android app).
> 2. The **refresh every second** doesn't happen on the page.
> 3. Edit the page.
> 4. Scroll down to the very bottom of the page and find the broken image marker.
> 5. Delete it.
> 6. Publish the page.
> 7. Test on a browser.
>
> The problem is resolved.


author: Manon Soubies-Camy
body: Glad it helped! :)


Tags: cloud

confluence-cloud
Confluence 6.12.0 News Widget
Asked by Marc Jason Mutuc:

We are currently using the News Widget but it seems very untidy as it shows all the labels used on the "news" content. Is there anyway to make the widget hide this labels instead? We used Lyria before but decided we no longer need it.


Answers:
author: Marc Jason Mutuc
body: Also, it shows the filenames of all attachments on the page.


Tags: confluence-server

server
Confluence Performance Degrades After Transition From Rackspace to Digital Ocean
Asked by Trevor Steen:

I have a self hosted Confluence Server instance that I hosted on a Rackspace 4GB server for 2.5 years without any issue. I recently migrated to comparable server with Digital Ocean and now my performance makes Confluence almost unusable. Screenshot image uploads hang, sometimes calling macros results in an error, saving pages sometimes fails or takes 1 minute plus.

Anyone know if there is some major different in providers that would cause such a drastic difference in performance?


Answers:
author: Nic Brough -Adaptavist-
body: This does not sound quite right to me. If you were running the services on roughly equivalent servers, then the problem must be with the networking. But if it's not that, then it is probably the servers, which suggests Digital Ocean have given you vastly underpowered servers. Problem is I can't imagine them doing that.


Tags: confluence-server

server
Integration with Harvest Forecast
Asked by Stefan Ferguson:

I know Jira integrates with Harvest on time tracking, but does anyone know of a 2-way integration with Harvest Forecast on utilisation and planning?

We use Harvest + Forecast for budgeting, planning and timetracking as a single team member can have a single cost rate but several billable rates under different roles, such as midweight on some projects and senior on others.

Would love to know if anyone's found a single solution via Jira to manage team utilisation, project budgeting and velocity, time tracking etc?

Please get in touch!


Answers:
author: Oguzhan Cansever
body: I would also like to know if there are possibilities. We plan and estimate our resources in Harvest-Forecast and track efforts in Harvest.

comments: author: Stefan Ferguson
body: Hi Oguzhan,

I haven't found anything yet.

However, Tempo looks like a great solution in principle. You can use it to set up work parcels like Forecast, but track time AGAINST that work parcel, which solves the current disconnect between planned time (Harvest Forecast) and actual time (Harvest Time Tracker).

However, Tempo's functionality to track work parcels against the same individual with different roles - like a developer who could be billed as a midweight or senior depending on the project - is only available on JIRA Server, not JIRA cloud.

If it was available on Cloud it would be a game changer for my agency...


Tags: atl-int

jira
Why confluence is using mysql or postgres DBs as backend
Asked by Ijaz Ahmad:

Is there any way to run confluence with some nosql database that can be run in active active HA mode acorss the data centers , instead of mysql or postgres , because we dont need any strick consistency for a system like confluence , eventual consistency is pretty much fine for us.

thanks


Answers:
author: Nic Brough -Adaptavist-
body: Yes, but don't do it.

Atlassian systems will happily use almost any database you choose to use, as long as there is a standardised compatible JDBC driver you can install in them to provide the access they need.

At a glance, NoSQL databases would really be a good move for Atlassian, because they don't use databases as databases, only as data stores (which NoSQL is better at than real databases!). If you ignore or configure away the "not sure what has happened" problem with NoSQL dbs, then they're technically ideal.

But. You are not supported unless you're on one of the four supported databases.
'Other Macros' not appearing and 'User Macros' in administration not loading
Asked by Nick Walton:

More often than not, when I hit 'Other Macros' in editing, nothing happens - no macro window appears.

If I go to 'User Macros' under administration, the page just sits there loading.

I did have some user macros previously, but I've removed them when I was able to get to the User Macros page.

Running 6.10.1. I've tried restarting, clearing the plugin macro cache through Cache Management (unsure if this is actually related to user macros, but no change either way).

Any ideas?


Answers:
author: ABC Taylor
body: I had the same problem; **I had multiple domains for my Confluence**.

The base one is 'wiki' and I also have 'confluence'.

Try accessing your Confluence by the base/main hostname, not any other aliases you may have created. Macros are now visible.


author: Grigory Salnikov
body: Hi, [@Nick Walton](/t5/user/viewprofilepage/user-id/1667824), and welcome to our Community!

Have a look at the method presented here:

[Macros not working](https://community.atlassian.com/t5/Confluence-questions/Macros-not-working/qaq-p/113550)


Tags: confluence-server

server

user-macro
Separate template creation from space admin function
Asked by Nalini:

I need to allow users to create templates but not mess with the space permissions and space settings. How can I do this?


Answers:
author: Nic Brough -Adaptavist-
body: Templates need to be controlled by space admins.

So, the best you can do is give your users a "template development" space where they can create and test them, and a route to ask space admins to add them to the relevant spaces.

comments: author: Nalini
body: Thanks. Can I please know the reason behind the decision to restrict template creation to admins.


author: Nic Brough -Adaptavist-
body: Because users will create templates for themselves, useless for anyone else, and polluting the list with these means people can't find, or won't use the good ones.


author: Nalini
body: Makes sense. Many thanks Nic.
Confluence People Directory - not showing "Browse all"
Asked by Fudge:

Hi all!

Our Confluence site has recently stopped showing the "browse all" section when you go into People.

It shows a handful of users under "You've recently worked with," but no longer displays all the Confluence users in the system.

I don't see any admin settings that could have affected this. Does confluence stop allowing the directory feature once you get past a certain number of users? We have about 150 in there right now.

Many thanks!


Answers:
author: Fudge
body: Disregard - I found a similar post describing this bug:

<https://confluence.atlassian.com/confkb/people-directory-empty-or-not-displaying-the-proper-number-of-people-due-to-users-that-have-been-deleted-from-ldap-162431224.html?_ga=2.18016191.704324554.1539381605-1305976721.1535570943>


Tags: active-directory

cloud

confluence-cloud
Is it possible to copy a space?
Asked by Victoria Reggiardo:

I want to create a new space based on a space that is already created, is it possible to do so?


Answers:
author: Mikael Sandberg
body: Yes, you can copy a space by creating a xml backup of it, rename the space key in the xml file and then import the space. Your other option is get an app that allows your to copy the space. See [How to copy or rename a space in Confluence](https://confluence.atlassian.com/confkb/how-to-copy-or-rename-a-space-in-confluence-169578.html) for more information.

comments: author: Jonathan Smith
body: Vet out the marketplace solutions noted in [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579)'s link.

Of the couple I tried, macro space keys still need to be modified because they pointed to the source space.


author: EPS Software Engineering AG
body: Hi Victoria,

Maybe our Space Tree Creator fits your needs best. It's available for server and cloud. You can find it on the Marketplace.

Regards,  
Stephan (CEO of EPS Software Engineering AG, the vendor of the Space Tree Creator).


author: Tobias Anstett _K15t_
body: Hi Victoria,

If you are using Confluence Server you might want to check out Atlassian's free Copy Space app on the Marketplace. However if your use case is more related to use the existing space as a template you could also copy the home page and include all of its children (which is an existing functionality).

If you are running on Cloud, you'll need to search for Copy Space or Copy Page Tree in the Marketplace as there is no solution available out-of-the-box.

Best,  
Tobias


Tags: confluence-server

server
JIRA Service Desk / Confluence Knowledge Base Optimization
Asked by Brant Schroeder:

I am interested in learning more about what others are doing to ensure that articles are easy to find in their Service Desk Search. Specifically I am interested in:

* What standards have you setup for users creating KB information?
* How are you using labels?
* Are you restricting search for specific request forms to specific labels?
* Do you have any naming conventions for articles?
* How are you organizing the KB?
* Do you allow users to just search the KB without being in the service desk?


Answers:
author: Brant Schroeder
body: [@David Charlton](/t5/user/viewprofilepage/user-id/4899504) Welcome to the Community

I did implement Confluence for internal documentation. We have an internal Jira service management desk that allows all of the staff to search KBs and submit support issues to our HR, Finance, IT and Payroll teams. We also have internal documents that the units use in Confluence that only show up for the agents that they have been shared with.

We implemented a standard labeling system that helps individuals find topics in the customer portal. Each KB uses a template that all KBs must be based on. This helps with consistency and ensures that they all search well. The KBs have saved us a ton of support time and have answered thousands of questions.

If you have specific questions let me know and I can share additional information.


author: David Charlton
body: Hi Brant, it's been a few years since you posted this thread. If you moved forward with this effort, can you share your results, successes, challenges?

We are looking at tackling a similar effort to help Confluence to serve as a functional knowledge base for the internal staff of a mid-sized credit union. The current execution of Confluence leaves a lot to be desired, and we want to know whether we should invest the time in optimizing Confluence, or if a new tool may be needed. Finding that clarity has been elusive, so any information is appreciated.


author: Gregory Van Den Ham
body: For us, we use a template for KB information, they are submitted to a separate space where they are curated by the service desk team (typically the lead) and published into the KB.

Labels are keywords to us. So you're searching for phone, skype, Outlook, etc.

Our KB's are usually titled How-To: (whaterver), Quick-Tip: (whatever). They're organized by area. Application - Office365, Skype, Word, OneDrive, Hardware, OS,... etc.

We let the users search, of course in confluence. We don't mind as long as they are able to get to the information.


Tags: confluence-server

jira-service-desk

jira-service-desk-server

server
Azure AD User cannot login to Confluence Online Site
Asked by Jeremy Elias D?hling:

Hello there!

I did [this](https://docs.microsoft.com/en-us/azure/active-directory/saas-apps/atlassian-cloud-tutorial#configure-and-test-azure-ad-single-sign-on) documentation to integrate Azure AD User to Confluence Online. I did all steps mostly without problems.

Now, the user I created in Azure AD as well as in Confluence Online can't login into the Confluence Online Site via the URL. But when I select the user in the user management in Confluence Online I can click the button "Login as user", furthermore I can create pages on the site. When I try to login via the Browser I'm getting the Error 404.

I checked also the permissions for the user and for the group the user is assigned to, the user has the permissions to enter the site.

The Domain I verified for the Confluence Site is a domain from Azure, so I can't login to the Mailbox of the user to klick the activations link from confluence. Perhaps that's the problem...

Does anyone have an idea?

Thanks in Advance!


Answers:
author: Jeremy Elias D?hling
body: The solution is to activate the link in the email mailbox. I tried it with an user which is able to get e-mails, and it worked


Tags: active-directory

azure

cloud

confluence-cloud

user
Issues with Meeting Notes template in the attendees section
Asked by Jewels Mack:

In the "attendees" section of the meeting notes template, when you add an attendee and hit "enter" 2x it deletes the attendees previously entered and/or moves the attendees that you added to the bottom of the template.

Also, you can't navigate back to the top of the template with the person(s) who are below the line when you hit "enter" twice - it moves anyone listed below the cursor (when you hit enter 2x) to the bottom of the page and you have to scroll to see them ...

Has anyone else had this issue?


Answers:
author: roman
body: Hi [@Jewels Mack](/t5/user/viewprofilepage/user-id/1300963),

which Confluence version and browser are you using to reproduce this issue? Would it be possible to record a small video to see the behavior in action?

Roman.

comments: author: Jewels Mack
body: Hi Roman,

We are using Confluence v 6.8.0 and am having the issues using Google Chrome Version 69.0.3497.100 along with IE 11.0.9600.19129 and am on a company Windows 7 Dell PC.

Here is a video capture

![Step1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/35075i75AC03EDBFEE0D84/image-size/large?v=v2&px=999 "Step1.jpg")![Step2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/35076i4199D0A997113BAC/image-size/large?v=v2&px=999 "Step2.jpg")![Step3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/35077i4D1319FB6D710F88/image-size/large?v=v2&px=999 "Step3.jpg")


author: roman
body: [@Jewels Mack](/t5/user/viewprofilepage/user-id/1300963),

I couldn't reproduce the same behavior with Confluence 6.8 using Chrome 69 on Win 10. Any of your colleagues having the same issue?

Roman.


author: Jewels Mack
body: [@roman](/t5/user/viewprofilepage/user-id/853566)- actually a couple of PM's brought this to my attention, 1 of them is using Windows 10, Chrome 69, and the other (along with myself) are on Win 7 with Chrome 69 .... odd scenario if you can't reproduce....let me keep searching for an answer - I appreciate you getting back to me and if I find something I will post it here in case others are having the same issue.


author: roman
body: [@Jewels Mack](/t5/user/viewprofilepage/user-id/1300963),

sure.

If you have a chance to record a screen recoding, please post it here. It might be that I am doing something differently...

Roman.


Tags: cloud

confluence-cloud
What is the stable confluence version after 6.9.0 release?
Asked by Harish Tuccapuram:

Since 6.9.0 has few bugs i would like to upgrade confluence so wanted to know what is the stable version after that release.


Answers:
author: JP _AC Bielefeld Leader_
body: Hi Sam,

I suggest you check out jira.atlassian.com for solved issues/bugs on the CONFSERVER project. You can then identify the version where the bug that annoys you is fixed.

Best

JP

comments: author: Harish Tuccapuram
body: Thanks [@JP _AC Bielefeld Leader_](/t5/user/viewprofilepage/user-id/1135065)!


author: Nic Brough -Adaptavist-
body: The way you are thinking of "stable" is meaningless in terms of Atlassian releases. If it makes it on to the main download page (not the "early access" downloads), it is what you are thinking of as "stable".

This means your question simplifies to "what is the version after 6.9.0", to which the answer is "everything from 6.9.1 through to the latest one"

comments: author: Tobias Anstett _K15t_
body: Hi,

I usually tend to wait for a x.x.1 or x.x.2 release before using it.

However there is also a concept of Enterprise releases which bring some benefits but usually are a little bit behind the regular releases: <https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html>

Best, Tobias


Tags: confluence-server

server
Confluence will not start after upgrade from 6,11.0 to 6.12.0
Asked by Strukton Service Account GIT:

I just upgraded confluence server from 6.11.0 to 6.12.0 however it will not start up. After the installation, confluence showed a screen indicating that our database was using an unsupported driver. I changed the driver class name from

\<property name="hibernate.connection.driver_class"\>net.sourceforge.jtds.jdbc.Driver\</property\>

to

\<property name="hibernate.connection.driver_class"\>com.microsoft.sqlserver.jdbc.SQLServerDriver\</property\>

However this did not help. Confluence is started through a batch file.


Answers:
author: Brant Schroeder
body: What are you seeing in the Confluence logs as the error?

You might also want to double check this article and make sure all your settings are correct: <https://confluence.atlassian.com/confkb/migrate-from-the-jtds-driver-to-the-supported-microsoft-sql-server-driver-in-confluence-6-4-or-later-939505122.html>

comments: author: Strukton Service Account GIT
body: Hi Brant,

Sorry for the late reply but i was enjoying my weekend.

Thanks for the link, i think i need to fix the connection URL because I am getting an error that no connection with the database can be made. I will check with our ICT department which settings are required.

I will keep you posted.

Regards Piet


author: Brant Schroeder
body: If all your settings are correct it might be a firewall rule. Sounds like you are heading down the right path.


author: Strukton Service Account GIT
body: There were two problems:  
1. We needed to access the database through a different port number  
2. The database was accessed via a WIndows account, however there is no option to supply the domain; so it wasn't possible to log in. Our ICT department solved this by creating a SQL account with identical user name and password.

At the moment we are looking for a way to supply the domain in the connection url so that it's possible to log in with a Windows account.


Tags: confluence-server

server