Hi All,
I have a connected Jira and Confluence instance and I have a custom field which contains all the existing space names of the Confluence. This custom field serves the space admins when they request to add users to their own space. In this case they have to select the appropriate space name from this list.
Thw problem is that the space admins use to change the space names very often and it's very cumbersome to update manually the options of this custom field every time.
For first: is there a script which results all the existing space names?
And then I would set this script to a custom field (if I can..)
Thanks in advance for the help!
Rumi
Calling http://confluence.example.com/rest/prototype/1/space on a Confluence server would produce some JSON with a list of spaces:
{"expand":"space","space":[{"id":"65537","key":"ds","name":"Demonstration Space","title":"Demonstration Space","link":[{"href":"http://localhost:1990/confluence/rest/prototype/1/space/ds","rel":"self"},{"href":"http://localhost:1990/confluence/display/ds","type":"text/html","rel":"alternate"}],"description":"","lastModifiedDate":{"friendly":"Sep 16, 2008","date":"2008-09-16T13:42:44+0100"},"createdDate":{"friendly":"May 15, 2008","date":"2008-05-15T05:15:14+0100"},"wikiLink":"[ds:]","type":"space"}]}
You could then create the select field from the results
Don't click on the link -- it's only an example! Try this instead: https://confluence.atlassian.com/rest/prototype/1/space It gives XML rather than JSON, but the logic still holds up.
You'll need to login to your Confluence server and replace the hostname with yours.
Admittedly, this doesn't give you the complete answer, but hopefully nudges you in the right direction to get the information you need :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.