Hello Team,
I have a page ID and would like to find the name of the space where it's located. Is there a way I can do this? Maybe using some API?
Regards
Hi @Sal ,
you can retrive all the space information associated using the following REST https://docs.atlassian.com/ConfluenceServer/rest/7.17.1/#content-getContentById
You should be able to get Space info associated :
...."space": { "title": "Space", "type": "object", "properties": { "id": { "type": "integer" }, "key": { "type": "string" }, "name": { "type": "string" }, "icon": { "type": "array", "items": { "$ref": "#/definitions/icon" } },
Hope this helps,
Fabio
@Fabio Racobaldo _Herzum_ This page has restrictions on it and I can't get details after running with page ID.
I will need the space name to remove the restrictions on the page. Any other suggestions you have?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if so, you need to perform a query at DB level like the following :
select sp.*
from content con
inner join spaces sp on I(con.SPACEID=sp.SPACEID)
where con.CONTENTTYPE = 'PAGE'
and con.CONTENTID=YOUR_PAGE_ID_HERE;
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you just need to get the Space and the linked page in human readable for one time (without Macro etc.) you just could try to open that page and look into the Audit log, cause a request for a restricted page, where you don´t have the needed rights will result in a audit log listing. In the audit log the space and respective page is linked.
hope that helps.
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.
Hi @Sal
If you have permissions to view the page you can use this URL format:
<base URL>/pages/viewpage.action?pageId=<pageid>
Hope this helps
Kind regards
Jorden
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.