Hi,
I am trying to update confluence page through curl command, but facing below issue.
Please assist me else let me know how to update html iframe tag using curl command.
Thanks
Code:
curl -u user:passwd -X PUT -H 'Content-Type: application/json' -d'{"body": {"storage": {"representation": "storage", "value": "<ac:structured-macro ac:name=\"html\" ac:schema-version=\"1\" ac:macro-id=\"9b345ba9-a013-4984-9eb3-d4c3f89d3986\"><ac:plain-text-body><iframe width=\"100%\" height=\"225px\" style=\"border: none\" src=https://test.in:28185/CR/CR1777871></iframe></ac:plain-text-body></ac:structured-macro><ac:structured-macro ac:name=\"html\" ac:schema-version=\"1\" ac:macro-id=\"95a008e2-1831-4405-8a32-73ddffa89495\"><ac:plain-text-body><iframe width=\"100%\" height=\"225px\" style=\"border: none\" src=https://test.in:28185/CR/CR1777870></iframe></ac:plain-text-body></ac:structured-macro>"}},"space": {"key": "KEY_NAME"}, "title": "TEST1", "version": {"number": 8}, "type": "page", "id":"168016254"}' https://confluence.in/rest/api/content/168016254
Error:
{"statusCode":400,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"Error parsing xhtml: Unexpected character 'h' (code 104) in start tag Expected a quote\n at [row,col {unknown-source}]: [1,511]"}
@Alok Singh Has you tried to update the above bodyContent via an external json file? I guess your above json having some invalid format.
Try it with a json file and you don't need to escape it like the direct json string for curl
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.