Editing Widgets with the API

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hey Gang,

I'm working with the Core API, and I can access almost everything I need for our admin tool. The last thing I am having issues with is changing widgets inside a presentation using the API. I can make changes using core.presentation.patch and editing the "layout" variable, but if I do it that way, I'm going to have to write something to search through the HTML to find the variable I need to change. Is this going to be the best way to accomplish this, or is there a more direct approach?
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Blake Freeman

Blake Freeman, Official Rep

  • 36,116 Points 20k badge 2x thumb
Hi Stephen,

Let me direct a developer to this topic! Someone will be back with you as soon as they can.
Photo of Alexey

Alexey, Employee

  • 550 Points 500 badge 2x thumb
Hi Stephen,

At this point the Core API is not aware of the content of the presentation (it is not parsed by the server) so the only way to edit the widgets is to edit the HTML layout they are embedded into.

We may introduce the ability to access individual widgets at some point in the future, but at this point I cannot give any kind of estimates on when that might happen.

Regards,
Alexey
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
I understand completely. It's not a huge deal for me to write something to take care of what I need it to do. I just wanted to make sure I wasn't missing something.

The existing API has been a big help already, so thanks for that, as well.
(Edited)