Hi guys,
Please can you provide one valid example of a PUT/POST request for inserting the jira issue filter on a wiki page.
I can create/update wiki pages using POST/POST request without any issue as long as it contains free text.
As soon as I try to insert a MACRO in my PUT/POST request, I get a 500 (internal server error).
Below you can find the example of one such request that I make:
curl --proxy <my server proxy> -u <username>:<password> --request PUT \
--url 'https://wiki.swisscom.com/rest/api/content/<page id>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"version": {
"number": 9
},
"title": "Test Draft",
"type": "page",
"status": "current",
"ancestors": [
{
"id": "<ancestor page id>"
}
],
"body": {
"storage": {
"value": "<p>Hello World!</p><p>This is a test page being created.</p><p>Lets see how this works.</p><p><ac:structured-macro ac:name=\"jira\"><ac:parameter ac:name=\"columns\">key,summary,type,created,assignee,status</ac:parameter><ac:parameter ac:name=\"server\">Swisscom JIRA</ac:parameter><ac:parameter ac:name="serverId">the server id I received on a GET request from a manually inserted macro</ac:parameter><ac:parameter ac:name=\"jqlQuery\">DAC-34371</ac:parameter> </ac:structured-macro></p>",
"representation": "storage"
}
}
}'
Note:
1. If I just do the following request (without macro) everything works as expected:
curl --proxy <my server proxy> -u <username>:<password> --request PUT \
--url 'https://wiki.swisscom.com/rest/api/content/<page id>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"version": {
"number": 9
},
"title": "Test Draft",
"type": "page",
"status": "current",
"ancestors": [
{
"id": "<ancestor page id>"
}
],
"body": {
"storage": {
"value": "<p>Hello World!</p><p>This is a test page being created.</p><p>Lets see how this works.</p>",
"representation": "storage"
}
}
}'
2. Also. that is the case with any macro that I want to insert
Therefore, I feel there is some parameter which is not being interpreted correctly in the macro request body.
Please can you help?
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.