
Dashboards as code (ask us to kick the tires)
Content as code: a first look at serialized content that allows installability across connection, versioning, or code based editing for Omni dashboards
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
no I'm gonna go okay all right here we go um so guest had shared that uh she and other s's were dumping a lot of time into cloning documents from the demo environment into customer environment so I want to help him out with that um so we have I'll show you what I'm going to do here um I'm going to clone this test Dash uh so what I'm going to do is actually use a new API that I created to dump out the definition of that um so here's sort of like the full Json serialized definition of test Dash G to copy that GNA come over here G to paste it into this document this is just a file in my file system called post
body uh G to add this base model ID parameter to it and then I'm going to go over to a totally different uh organization this one it's brand new actually I just created this morning and I added the same connection the like you know Ecom data set connection to the um to this org uh you can see it here so I'm going to grab and this is just like I haven't done anything to this model yet just just uh saved it or just uh ran the scheme refresh going to grab the ID of that model I'm going to put it into this base model ID parameter uh save it going to go back over to my terminal oh wait I got a I already created
an API key uh for this oh boy what's my computer doing there it is uh for this new org so I've got this demo key I've already copied and pasted that and I'm going to go back to my terminal and I am going to to run okay so there's the API key I'm going to pass in that post body and I'm going to pass it to this v0 documents import API inpoint and it's going to give me back a bunch of metadata about what it did but the important one is this identifier so if I grab this identifier go back over we actually don't even need the identifier because this is going to actually just show up right here on the homepage uh test Dash
is now in this new org I pull it up and it's a little broken because I didn't Define a topic so let me just go to find that topic super quick let's see I'll just grab it from here okay let's try this again hey all right cool so now we have this is test this is the original test Dash oh boy I D dragged that poorly go right here so here's the original here's the new one they are identical I try to get like textiles all the orderings the same filters etc etc so should be comprehensive I'm sure I missed something here but uh I've covered quite a bit of ground in the first past here so uh should be able to hopefully speed up
J's workflow quite a bit that is all is this just I mean is this any different than the work that we would do to get version content uh the the difference is that uh I am not going to guarantee that this will not break perfect um but yeah here's what I would propose which is I would feel comfortable doing this as like a beta for a handful of customers if that is an important use case for them um and the deal would have to be that we would have to you know I expect that this API is going to change in some breaking ways and so we would just want to work closely with them to navigate those um and then you know I think
the the challenge with the serialization is just like locking in the actual structure right and that's kind of I don't think we're quite ready to do that I think we should move in that direction and and this can kind of be a baby step towards that yeah look in the short term it will always be right right like your concern would be that the that the content API essentially changes over time it evolves and your backup won't be valid anymore but if we don't talk about longterm backups and they more short-term backups it's just works yeah I think that's kind of the key caveat is like this is this is good you know if you want to it's not good as an archive good as
a copy yeah and archivally has a lot of information on it so like it's not bad as an AR it's just not complete maybe yeah I think that's right and and which is why you know I think this could be useful I don't want to prevent people from using it but I also just don't want to uh guarantee that we will maintain it in such a way that we'll make sure every document ever still works could users also then touch the spec and adjust their dashboard yep yeah this is also programmatic content generation too which is awesome also which yeah this is super cool yeah I I think uh I think we should use this for copying I think we should just be careful to
not paint ourselves into a corner saying this is our form of serialized content because I think we have better plans for that cool yeah we'll we'll start uh hopefully this uh covers the use case that just and the other have so we can just start testing it there and then sort of expand expand from there um I guess sort of like other odds and ends um would would this also allow us to move content across connection like what is the key for a piece of content is it field names it like is the connection hashed into the field names or things like that like so it is the the model definition is of course not changing but all of the pointers so can ction ID
model ID are changing so okay so content cross connection if the fields are identical yeah exactly because sort of the the contract is like hey the model underneath the definitions need to be consistent do we have a A shortterm or like a medium-term road map for how much other apis that could go alongside this so for example like sitting content in folders or or content or or or even more you know programmatic uh editing of of pieces of content too or is this sort of first first stab and then we'll see yeah I would say no we don't have a written road map like that at all other than you I think we have talked about um priorities from an API perspective this is probably
not even the highest next priority um you know I think uh things that play into the cicd story and then the query API are probably that higher um so I would probably to the extent that I continue working on the API I'd probably think more about those next uh but yeah obviously you know once you start going into to the content apis those those ones you just mentioned become uh pretty pretty obvious ones Ariel do you have any other thoughts on that one nope you already answered what I was going to say which is uh we had discussed probably query API being one of the top ones and we have talked about content apis uh as like a part yeah we will get to content
apis we we'll certainly need it for embed stories but not yet