Content
Wiki endoint in API
Added by Philipp Schulz 8 days ago
Hi all,
I am trying to access wiki pages via the API. I do have an API token, which should have admin permissions.
I am using Python V3.12 using the requests package to send simple HTTP requests.
I am currently running version 13.0.8 (yes, I do know that this version is very old).
I am trying to access wiki pages of all our projects via the API, but I do not see the end point for wiki pages. Is this due to the old version I am running, or is it another issue? Because I see that in the current API documentation, this path is called a stub (https://www.openproject.org/docs/api/endpoints/wiki-pages/).
What I tried to gain access to our wiki pages:
-
OUR_URL/api/v3/wiki_pages
-
OUR_URL/api/v3/wiki
-
OUR_URL/api/v3/projects/NAME OF ONE OF OUR PROJECTS/
-
OUR_URL/api/v3/projects/NAME OF ONE OF OUR PROJECTS/wiki
-
OUR_URL/api/v3/projects/NAME OF ONE OF OUR PROJECTS/wiki/OUR_WIKI_PAGE_NAME
-
OUR_URL/api/v3/projects/OUR PROJECT ID/wiki
-
OUR_URL/api/v3/projects/OUR PROJECT ID/wiki/OUR_WIKI_PAGE_NAME
I can see the work packages and other information about our projects, but just not the wiki pages.
Thanks in advance and best regards,
Philipp Schulz
Replies (1)
Hi Philipp,
I am afraid that wiki endpoint is indeed a stub. The only method to retrieve information of a wiki page via API is the GET request mentioned here:
https://www.openproject.org/docs/api/endpoints/wiki-pages/
This resturns basic information about the location of the wiki page, name and attachments. You can use OP 13.0.8. for this.
I found a related feature request which aims to add additonal functionalities to this endpoint:
Please do not hesitate to add your comments and ideas for this endpoint here.
Best,
Alexander