I have diagram file in Gliffy format (filename.gliffy). It can be made using export or another tool.
But how can I import it on Confluence page using Rest API? I tried to do it via file attachment, but diagram didn't appear on the page (but it is quite understandable).
I need exactly automated process (Rest API), not manual import.
Thank you
Victor.
Do you have the Gliffy app for confluence as well? Without that Confluence will not be able to render the Gliffy attachment correctly. If indeed you do here's what I would do. Manually create a Gliffy diagram and save the page. Then look at the storage format that is created for this. (Page menu -> Storage Format). This will tell you the structure that you need to add into your page content to point to the Gliffy file you uploaded to the page. Then you would use this REST endpoint to update your page content to add in the storage format the structure that points to the attached Gliffy file.
URL: http(s)://{confluence base url}/rest/api/content/{pageid}
Method: PUT
Thank you, Davin. You solution helps.
I attach two files, .png and .gliffy. It is imporant to set correct comments on files - GLIFFY IMAGE and GLIFFY DIAGRAM. Gliffy diagram file must be without extension.
I couldn't find Page menu -> Storage Format, but I made GET request
/rest/api/content/354568600?expand=body.storage
on page with sample gliffy diagram to see page body, it returns macro in body:
<ac:structured-macro ac:name=\"gliffy\" ac:schema-version=\"1\" ac:macro-id=\"4c35e5ac-c7b5-41c0-847f-4e31b6734512\"><ac:parameter ac:name=\"name\">diag111</ac:parameter><ac:parameter ac:name=\"pagePin\">1</ac:parameter><ac:parameter ac:name=\"\" /></ac:structured-macro>
Further I PUT page in Confluence with macro, and all was fine, diagram draws correctly. I didn't change macro-id, but there was no errors.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is where you can see the storage format of a page. The other option would be to add in the Confluence Source Editor app. It's a free app made by Atlassian. It gives you the option to edit the page storage format while you are in edit mode.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I watched this menu, but no 'Storage format', Export to PDF came right after View Source. May be not all features are installed or problems in access rights.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, looks like you need to be a space admin to see that menu item. What you did works as well ... using the REST API to view the storage format ... it's just not as convenient.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there an API Call we can use to mass download Gliffy diagrams from Spaces instead of Pages?
Please let me know, would be really helpful to know if that's available.
Thanks,
Nachiketh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure if this is possible. I'd like to invite you to email our support team at support@gliffy.com. They may be able to provide some detail. :)
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.