youngmon/atlassian-qna huggingface dataset:
How to get Confluence User Status via Rest API
Asked by Jonathan Klapel:

I would like to be able to find out if a particular user is activated or disabled in Confluence via the REST API (or some other similar method). I can find how to get the details of users via the REST API (e.g. GET of <http://example.com/rest/api/user?username=jblogs>), but those details do not seem to return the status. Is there something I can use in the "expand" property perhaps?


Answers:
author: AnnWorley
body: If you have access to the database you can run a SQL query like:

```
select user_name, active from cwd_user where lower_user_name = 'admin';
```

The lower_user_name is the login username. The results should be something like this:![Screen Shot 2017-06-14 at 3.31.30 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/2190iF4606DCF169D803E/image-dimensions/556x371?v=v2 "Screen Shot 2017-06-14 at 3.31.30 PM.png")

The **T** means the user is active.

comments: author: Jonathan Klapel
body: Thanks for the response. This is what I ended up having to do, along with an HTTP to SQL connector in order to access it from another internal website.


author: Peter Bunde Hansen
body: How to get access to the database for confluence? I need to do it from EXCEL VBA - is that possible if the admin grants me the rights? Do I need to install something?


author: SEI Information Technology
body: What if we don't have access to the database to run queries? How can we find this user status information via API?


author: AnnWorley
body: I understand you can add **\&expand=status** for example:

\<Confluence_Base_URL\>/rest/api/user?username=username\&expand=status

Please let me know if this is what you are looking for.


author: SEI Information Technology
body: Adding \&expand=status to the end of the query string does not return anything about the user status. In fact, it doesn't return anything different than using \<Confluence_Base_URL\>/rest/api/user?username=username. We are using Confluence version 6.0.7 if that matters.


author: AnnWorley
body: I am sorry to hear that. I verified that **\&expand=status** works with Confluence 6.5.1 and does not work on Confluence 6.0.7. Based on this, I don't think there is a way to get the user status using the REST API in Confluence 6.0.x.

Here is what was returned on 6.5.1:

```
{"type":"known","status":"deactivated","username":"charlie","userKey":"2c94a4c05ffe72d7015ffe742e860001","profilePicture":{"path":"/images/icons/profilepics/default.png","width":48,"height":48,"isDefault":true},"displayName":"Charlie","_links":{"base":"http://URL:8090","context":"","self":"http://URL:8090/rest/experimental/user?key=2c94a4c05ffe72d7015ffe742e860001"}}?
```

Here is what I got on 6.0.7:

```
{"type":"known","username":"charlie","userKey":"2c94a4c05ffe56ac015ffe58f5eb0002","profilePicture":{"path":"/images/icons/profilepics/default.png","width":48,"height":48,"isDefault":true},"displayName":"Charlie of Atlassian","_links":{"base":"http://URL:8090","context":"","self":"http://URL:8090/rest/experimental/user?key=2c94a4c05ffe56ac015ffe58f5eb0002"}}
```

It looks like your options are to use the SQL queries or upgrade Confluence.
Unknown Macro error
Asked by Lori Naeger:

My content is missing because of an "unknown macro: 'zen-section'" issue. This just started happening today.

![1.png](/t5/image/serverpage/image-id/1869iB7C1A1EEC7EFC750/image-size/large?v=v2&px=999 "1.png")


Answers:
author: Fabian Lim
body: Hi Lori,

Ask your admin to ensure that you license is enabled or has a valid license. It's also possible that someone deleted the app.

Regards


Tags: macro
Confluence REST API - How to list and delete old versions of a page
Asked by jeff porter:

I would like to delete old versions of a page, can someone point me to the correct Manager class that will allow this.

I can see the "RemoveHistoricalVersionAction", but I'm not sure how to use it from my plugin.


Answers:
author: Vero Rivas
body: Hi [@jeff porter](/t5/user/viewprofilepage/user-id/1135027)

Look at this post, maybe can help you

<https://community.atlassian.com/t5/Confluence-questions/REST-API-Deleting-old-version-issue/qaq-p/1333887>

Cheers
Time to migrate from cloud to server
Asked by Kimberly Stowe:

Hello.

I'm hoping that some of you who have migrated from the cloud version of Confluence to server might be able to give me an idea of how much time to expect the migration to take. Below are the steps that I've gathered from Confluence's documentation:

Steps to perform migration: (<https://confluence.atlassian.com/confcloud/migrate-from-confluence-cloud-to-server-724765578.html>)

1. Create a site backup (<https://confluence.atlassian.com/confcloud/create-a-site-backup-724765526.html>)
2. Download Confluence
3. Install Confluence (<https://confluence.atlassian.com/doc/installing-confluence-on-windows-255362047.html>)
4. Configure Confluence
   1. Open necessary ports
5. Connect to database
6. Import data from cloud site
7. Manage users
   1. Setup LDAP (<https://confluence.atlassian.com/doc/connecting-to-an-ldap-directory-229838241.html>)

Any assistance or advise is appreciated!


Answers:
author: Nic Brough -Adaptavist-
body: Step 6 is any time between minutes and hours. You'll have to test it to find out, because the import time is a function that is broadly "complexity x volume", and we don't have any measure of either for your system.

comments: author: Kimberly Stowe
body: Thank you for your thoughts. Outside of the size of our data having a direct impact on steps 1 \& 6, step 4 is the greatest unknown. Any thoughts on how long the configuration typically takes? Barring the length of time for the backup \& import to complete, should I expect the rest of the process to take a few hours, a few days?


author: Nic Brough -Adaptavist-
body: I don't know what you're planning to "configure". You mention opening ports, which is generally a few minutes for a network team, and possibly a couple more for an admin if your servers are firewalled locally, but you haven't said what else you want to configure.

Step 3 will get you to the point where you have a working, but empty, Confluence, ready to import your data. The import from Cloud contains configuration data you've already done on Cloud.


author: Kimberly Stowe
body: I was referring to configuring Confluence. From your response, am I assume there is no (or very little) configuration?


author: Nic Brough -Adaptavist-
body: It's the same - I don't know what you're trying to "configure".

Step 3 installs Confluence (and, by the way, you need to do step 5 as part of that), and leaves you with a running, empty Confluence. That's ready for any imports or configuration you might want to do.


Tags: confluence-cloud

migration

server
How to view popular and unpopular pages on Cloud Confluence?
Asked by Federico Olmus:

Hi!

I've been looking into the documentation that you have in regards to Confluence use.

The article below seems great but the links to the plugins are broken:

<https://confluence.atlassian.com/conf54/confluence-user-s-guide/advanced-and-special-uses-of-confluence/developing-a-knowledge-base-on-confluence-wiki/additional-add-ons-for-a-knowledge-base>

I also checked: <https://confluence.atlassian.com/doc/viewing-site-statistics-123043962.html#ViewingSiteStatistics-notes>

But the information is not visible in the lower part of the document.

I need to know the most popular and least popular pages/spaces on Confluence to know how they are adding value or if it's time to remove content and keep our documentation lean and relevant.

Something similar to the basic Google Analytics dashboard but in Confluence, I've seen plugins, but they charge for this basic service...

I'd really appreciate your help.

Thanks a lot,

Federico Olmus


Answers:
author: Thomas Schlegel
body: Hi Federico,

we use the tracking plugin from Servicerocket for that:

(<https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.tracking/server/overview>)

Once it is deployed, it counts all page hits (except the ones from the last author) and gives you views to see these page hits as table or single count or last view date etc.

We are happy with that. And it is for free.

comments: author: Federico Olmus
body: Thank you, Thomas, I'll check it out.


author: Thomas Schlegel
body: You're welcome :-)


author: Stephen Deutsch
body: You might consider [Google Analytics in Confluence](https://marketplace.atlassian.com/plugins/me.davidsimpson.confluence.addon.google-analytics-for-confluence/cloud/overview)


author: Tim
body: Hi Federico,

We created an add-on that provides insights into the most popular/unpopular pages in Confluence Cloud. It includes both a high level overview of activity but also the details like who has viewed a particular page -- all integrated into the Confluence experience.

You can find more information here: [Analytics for Confluence Cloud](https://marketplace.atlassian.com/plugins/com.addonengine.analytics/cloud/overview)


author: AnnWorley
body: Please consider an external analytics tool; there are some free ones on this list:

[The 10 Smartest Web Analytics Tools](https://www.americanexpress.com/us/small-business/openforum/articles/the-10-smartest-web-analytics-tools/)

comments: author: Federico Olmus
body: Do they apply for Cloud Confluence?


author: AnnWorley
body: Closer examination of the products indicate you have to add an agent of some kind to the instance - you are right that this is restricted in Cloud. :(


Tags: popular
Jira and Confluence Upgrade to Latest Version
Asked by Navadeep M:

Hi Team,

We have our JIRA and Confluence applications hosted on-premise now.  
Current JIRA version we are using - **6.3.12**

Current Confluence version we are using - **5.6.4**

We are planning for the Migration and upgrade to latest available version.

**Current Environment** - JIRA 6.3.12, Confluence 5.6.4 , Database- PostgreSQL **8.4.20**   
**Target Environment** - Latest available version of JIRA(7.3.x) (Confluence-6.3), Database - Oracle **11g/12c**

Our plan was to procure 2 new application servers, 1 DB server on-premise and host the applications to newly procured servers.

Now our client have finalized to do this in **Google CLOUD.**

Could you please share me the steps on how we need to plan for the entire process.  
We need to take care of the Infrastructure, Database Migration and application upgrade.

Also could you please share the documentation to migrate or upgrade the applications in Google cloud. What are the services that best support for the entire process.

Kindly let me know if you need any other information in this regard.

Thanks,  
Navadeep


Answers:
author: Navadeep M
body: Hi Nic,

We have not yet started anything on google cloud. Instead of hosting the JIRA/Confluence upgrade on the on-premise servers, we got proposal to move to Google Cloud. Checked for the documentation in Atlassian, found information on the cloud environment AWS, but not **Google Cloud**.

I just wanted to check whether anyone have performed the Upgrade on Google cloud environment, so that I could gather the services supported by Google cloud for this upgrade.

Thanks,

Nav


author: Nic Brough -Adaptavist-
body: This all depends on what you are getting from "google cloud".

Can you log into the server(s) the systems are targetted at and run an installation of them?


Tags: confluence-cloud

jira

jira-administration
A system error has occurred ? our apologies!
Asked by Alexandre Fraser:

Hi All, i finish the setup for confluence on my windows 2012 r2 with mysql and when i try to fo on the first page a receive a error. Icheck the user, i check the driver, i install the jdk. And doesnt work..

![Sans titr1e.png](/t5/image/serverpage/image-id/1857i6B4446B084B51DF7/image-size/large?v=v2&px=999 "Sans titr1e.png")


Answers:
author: AnnWorley
body: I understand you checked your user and made sure the JDBC driver is in place for MySQL.

For most of the support cases I have worked on, the error "Spring Application context has not been set" was the result of the user running Confluence having insufficient privileges on the \<confluence_home\> directory, which is the path defined in the following file:**\<confluence_install\>/confluence/WEB-INF/classes/confluence-init.properties** . Please see [Confluence does not start due to Spring Application context has not been set](https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html) for other possible causes.

In one interesting case, the **confluence.cfg.xml** in the root of the home directory was corrupted by a text editor the customer was using to change some parameters. If you haven't manually edited the file, that's probably not the issue.
Can confluence system admins view restricted pages if its not shared with them?
Asked by Rashmi Belur:

Hi,

I am using confluence 5.10.8 and I dont want some of the pages viewed anyone other than small groups. I am not sure whether system admins can access those pages or not.

Does anyone clarify on that?


Answers:
author: Davin Studer
body: If you lock down the page to only certain people/groups the admin(s) will not be able to view the page by default. However, since they are an admin they can grant themselved view permission. So, if you don't want your Confluence admins to have the ability to see the content don't put it in Confluence.

comments: author: Bill Bailey
body: Exactly! You can't see it, but you can change it so you can. You just have to trust your admins. ;-)


author: karim.belhadj
body: Hi [@Davin Studer](/t5/user/viewprofilepage/user-id/781467) and [@Bill Bailey](/t5/user/viewprofilepage/user-id/502089)

Exactly! You can't see it, but you can change it so you can. You just have to trust your admins.

====\> this is right for the space admin but in my instance i see that confluence admin can see the restricted page by default without changing the restrictions . Do you confirm please ? Really i feel ST wrong.

Regards

Karim


author: Chris K
body: Same here. As a system admin, I am able to see all pages, even with restrictions. We are currently searching for a solution to restrict pages, even for system admins. Any ideas?


author: AnnWorley
body: We have this excellent document that describes who can access what:

[Confluence Admin Permission Levels Explained](https://confluence.atlassian.com/confkb/confluence-admin-permission-levels-explained-604209420.html)

"Bottom line: unless those "admin" users are members of the confluence-administrators group, they should not be able to see an individual page locked via a page restriction."

comments: author: St?phane Veraart (Devoteam)
body: Yet, as an admin you can remove the users that have restricted access and in the end remove the restriction on the page by doing so.

On the other hand, as an admin you might want to actually be able to *give* people access to restricted pages instead of having the manager/user who created the page doing that themself.

It feels inconsistent from user and admin perspective in my opinion.
Tomcat Installation in confluence
Asked by Navadeep M:

Hi Team,

We are planning to migrate and upgrade Confluence 5.6.4 version to latest version in linux environment. Ours is a standalone application.

Does the linux package for confluence installs Tomcat by default in versions 5.6.4 and in the latest version ?

If the installer includes the tomcat installation by default, could you please share the link as well for the same from atlassian documentation, if any.

Thanks,

Nav


Answers:
author: AnnWorley
body: Both the installer and archive methods include Tomcat. The installer also includes Java. You may download the latest installer from this link:

<https://www.atlassian.com/software/confluence/download>

The Confluence 5.6.4 installer can be downloaded from:

<https://www.atlassian.com/software/confluence/download-archives>

I wanted to share this document which may help plan the test environment setup for the upgrade:

[Migrating Confluence Between Servers](https://confluence.atlassian.com/display/CONF56/Migrating+Confluence+Between+Servers)


Tags: install
I need translated version of our own articles for customers
Asked by Samma?l Morgenstern:

We have customers from around the world, we would like to offer articles for confluence in 4 languages. Whats the best way to do it? Should we create different articles?


Answers:
author: Milo Grika
body: Have you tried setting up Google Translate? It works pretty slick, and the translation is probably good enough.

<https://community.atlassian.com/t5/Confluence-questions/is-there-a-way-to-display-my-content-in-a-different-language/qaq-p/343136>


author: AnnWorley
body: This document has some options:

[How can I translate Confluence page content?](https://confluence.atlassian.com/confkb/how-can-i-translate-confluence-page-content-345637421.html)


author: Hermance NDounga
body: Hey,

There is no out-of-the-box functionality to do this in Confluence.

So you have few possibilities. On Server, I would recommend using the [Visibility macro](https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.visibility/server/overview?_ga=2.212525396.136353259.1496677240-1789957120.1489062042). With this solution, on the same page, you would have the 4 translations and you can decide to show them based on username or group. Really convenient for you, because you would have to do the update only in one place + you can share the same link for all your customers and they only see wat they need.

If you use Cloud or you don't want/can't to use an add-on, the best solution would be to create 4 spaces. It's less convenient for you because you need to juggle between the 4 spaces, and you need to share 4 different URLs, but for your customers, it would be "transparent".

I would not recommend creating only one space and 4 versions of each article in different languages, because it would create noise for your customers who would access versions of the articles they don't need to, except if you would restrict some of them; but it would imply to manage permissions in addition.

Let me know if it helps ,

Hermance

comments: author: Samma?l Morgenstern
body: Thank you for your quickly response.

Now, I cannot create 4 different spaces and connect it to 1 project for custiomer service, I use the cloud version, by the way.

Shall I create 4 different projects in Service Desk? :O There has to be an easier way


Tags: translate
How do I add a user to confluence and allow them access to only one space.
Asked by Paul Chudleigh:

We are using GSuite integration and the user is an external user that does not have access to our GSuite.

I've tried manually adding them and creating a group (in atlassian group admin), adding them to that group but I can't then see that group in confluence at all in order to configure it for restricted space access.


Answers:
author: Rodney Sawyer
body: You should be able to add a group and add that user to the group...then add that group not only to the Space permissions for the space they need access to, but also to Globla Permissions with the permission "Can Use". Without that permission they will have access to the Space, but no ability to login to Confluence to see the space.


Tags: group

permission

user
SSO authentication for Confluence Server not working for version 5.3.* ?
Asked by Ajay Neharkar:

I am trying to do a plugin for SSO authentication for Confluence Server. We have used DefaultAuthenticator to logging the user in. This currently works on different versions of Confluence 5.x but does not work on version 5.3.x (like 5.3.0 and 5.3.4) .  
After investigating further, we found that Confluence authoriseAndEstablish function returns true but it does not return the expected headers back. This only happens for Confluence 5.3.x.
> 1. Expected Parameters in response header
> 2. 
>    3. X-AUSERNAME:  
>    admin
>    4. X-Confluence-Request-Time:  
>    XXX
>    5. X-Content-Type-Options:  
>    nosniff
>    6. X-Seraph-LoginReason:  
>    OK
>
> Actual
>
>    1. X-Confluence-Request-Time:  
>    XXX
>    2. X-Content-Type-Options:  
>    nosniff
>    3. X-XSS-Protection:  
>    1; mode=block
>
> From the different log file the observed difference was -
>
> *DEBUG \[atlassian.seraph.auth.DefaultAuthenticator\] getUserFromSession getUserFromSession : Session found; "\<USERNAME\>" is present*   
> *\[confluence.security.seraph.ConfluenceAuthenticatorUtils\] asConfluenceUserPrincipal Principal (name="\<USERNAME\>", class=class com.atlassian.confluence.user.ConfluenceUserImpl$$EnhancerByCGLIB$$d538ed74 is not an instance of ConfluenceUserPrincipal and cannot be used for authentication*   
> *\[atlassian.seraph.auth.DefaultAuthenticator\] getUser getUser : User not found in either Session, Cookie or Basic Auth.*   
> *DEBUG \[atlassian.seraph.filter.SecurityFilter\] doFilter doFilter : Storing the originally requested URL (atlassian.core.seraph.original.url=/login.action?os_destination=%2Findex.action)*   
> *DEBUG \[atlassian.seraph.filter.SecurityFilter\] doFilter doFilter : requiredRoles = \[\]*   
> *DEBUG \[atlassian.plugin.servlet.PluginHttpSessionWrapper\] getAttribute getAttribute('seraph_defaultauthenticator_logged_out_user') Popping ClassLoader: null .New ContextClassLoader: WebappClassLoader*   
> *context:*   
*delegate: false*  
Currently my POM has the following details for Confluence version.  
\<properties\>  
\<confluence.version\>5.0\</confluence.version\>  
\<confluence.data.version\>5.0\</confluence.data.version\>  
\<amps.version\>6.2.11\</amps.version\>  
\<plugin.testrunner.version\>1.2.3\</plugin.testrunner.version\>  
\<atlassian.spring.scanner.version\>1.2.13\</atlassian.spring.scanner.version\>  
\<!-- This key is used to keep the consistency between the key in atlassian-plugin.xml  
and the key to generate bundle. --\>  
\<atlassian.plugin.key\>${project.groupId}.${project.artifactId}\</atlassian.plugin.key\>  
\</properties\>  
We also tried changing it to Confluence 5.3.4 and running it. It gives the same error. Any help is highly appreciated.


Answers:
author: Bob Nelson
body: Hi,

Me too facing same issue for Confluence 5.3.4 and 5.3.0.

Quick response will be very helpful.  

Thanks in advance.


Tags: confluence-app

confluence-development

questions-for-confluence
Cannot access Confluence after fresh installation
Asked by Markee Pearson:

I have made a new confluence server installation (V6.1.2) with all default settings (in Linux).

Everything went well but when I go to http://localhost:8090 to continue the setup, the URL is changed to http://localhost:8090/setup/setupstart.action and then I get an error stating cannnot connect to localhost.

The confluence server is running, the port 8090 is allowed in firewall, the confluence log file says that the server is ready.

Have anyone ran into this issue? If so, how did you resolve it?


Answers:
author: AnnWorley
body: I understand you checked the log and it says the server is ready. Is that the "server startup in xx ms" in **catalina.ou** t or does the **atlassian-confluence.log** say "Confluence is ready to serve"?

Is there anything in the **atlassian-confluence.log** after "Confluence is ready to serve"? It sounds like Confluence is coming up long enough to detect that it's a new install (hence changing the URL) then it is going down somehow. If it was a loopback or other misconfiguration in Linux I would not expect you to see the setup URL in the first place.

I look forward to hearing whether there is anything else in the logs.

comments: author: AnnWorley
body: A similar issue was solved by raising the Java heap memory:

[http://localhost:8090/setup/setupstart.action does not load](https://community.atlassian.com/t5/Confluence-questions/http-localhost-8090-setup-setupstart-action-does-not-load/qaq-p/578725)