Cannot Update wiki page via the api if embedded into a directory
Summary
I am unable to update a wiki page using the api unless it is attached to the root directory.
Steps to reproduce
I make a request using the slug as specified in the documentation. If the page is attached to the root directory it works fine:
$curl -X GET \
https://gitlab.com/api/v4/projects/$PROJECT_ID/wikis/ \
-H 'PRIVATE-TOKEN:'"$API_TOKEN"
[{"format":"markdown","slug":"home/test2","title":"test2"},{"format":"markdown","slug":"test1","title":"test1"}]%
$curl -X PUT \
https://gitlab.com/api/v4/projects/$PROJECT_ID/wikis/test1 \
-H 'PRIVATE-TOKEN:'"$API_TOKEN" \
-F 'content=Hello World' \
-F title=test1
{"format":"markdown","slug":"test1","title":"test1","content":"Hello World"}%
However, anything outside of this does not:
curl -X PUT \
https://gitlab.com/api/v4/projects/$PROJECT_ID/wikis/home/test2 \
-H 'PRIVATE-TOKEN:'"$API_TOKEN" \
-F 'content=Hello World' \
-F title=test2
{"error":"404 Not Found"}%
Edited by Benjamin