Rest/api/space/qywh?expand=permissions

not return permissions infomation, why?

Can you please provide us with some more information?

Which version of Confluence are you developing against?
Server or Cloud?

What are you expecting to receive?

If you cannot provide us with more information it’s impossible for the community to provide you with decent help.

Confluence  are 6.4.1
 Confluence Server, not cloud

I want to receiver permissions of space, and use resutapi set permissions

I’m using Atlassian Confluence REST API. I need to get Space permissions. I couldn’t find it on documentations. Who used this REST APIs? How to get it?

I expecting to receive result as follow:

[
{
“type”: “SETSPACEPERMISSIONS”,
“spacePermissions”: [
{
“type”: “SETSPACEPERMISSIONS”,
“userName”: null,
“groupName”: “confluence-administrators”
}
]
},
{
“type”: “EXPORTSPACE”,
“spacePermissions”: [
{
“type”: “EXPORTSPACE”,
“userName”: null,
“groupName”: null
},
{
“type”: “EXPORTSPACE”,
“userName”: null,
“groupName”: “confluence-users”
},

I just tested this with the latest version of Confluence Server and permissions is not an option to expand for Confluence Server.

You can check the available options by calling api/space/ and look at the expandable options.

This is what I got:

{
"id":98306,
"key":"TEST",
"name":"Test",
"type":"global",
"_links":
 {
  "webui":"/display/TEST",
  "collection":"/rest/api/space",
  "base":"http://localhost:8090",
  "context":"",
  "self":"http://localhost:8090/rest/api/space/TEST"},
  "_expandable":
  {
   "metadata":"",
   "icon":"",
   "description":"",
   "homepage":"/rest/api/content/65576"
  }
 }

So you can only use expand with the following properties:

  • metadata
  • icon
  • description
  • homepage

Please tell me how to get permissions of space?
It is important for my company, thx.

It’s not possible through the Rest API but you should be able to get them through the Java API.
But that will require you to write a P2 plugin for your Server instance.

can you give me a demo?

I use “https://bitbucket.org/serverecosystem/message” example, but i don’t access .

I user " atlas-run" cmd start this example,

http://localhost:51218/manager/rest/myrestresource/1.0/message not found

Where does “manager” come from? Shouldnt it be “confluence”?

I installed plug " https://github.com/ttorvela/space-permissions-handler/wiki ",
but not access, url is : http://wiki.ele.to:8090/confluence/rest/userpermissions/1.0/admin

First of all, the space-permissions-handler plugin should require admin permissions to poke that rest endpoint. If not, remove it immediately. Thus, we can’t access the url as we dont have admin status.
Secondly, I uploaded your github project to my dev and works absolutely fine:

<message key="default">
<value>Hello World</value>
</message>

which further means you are calling the rest endpoint wrongly.

my dev and works too, but add-ones to service, not access.
is space-permissions-handler plugin is not compatibility conflunce 6.4.1 ?

Sorry i dont understand.

I also can be normal operation and visit here, but installed on the server can not visit。
Is it because the version is not compatible?