is there documentation for entity schemas? for exa...
# gooddata-cn
e
is there documentation for entity schemas? for example, I'm trying to create a visualization via API, and I don't know what a valid visualization object looks like. the API reference only defines things down to "content," and then it says it's free-form
i
Hi Erik, I am afraid that we don’t have such examples available right now. Usual approach is to create some “testing” objects in UI and then retrieve them via GET call. I believe that generic response of such call is mentioned in our APIary, if that helps a bit.
e
i didn't think to check there, thanks, but it still stops at "content." I'm working off of one of the python sdk examples (github), and it includes json template files for visualizations (and metrics and attributes). The vis template is this:
Copy code
{
  "data": {
    "id": "",
    "type": "visualizationObject",
    "attributes": {
      "title": "",
      "description": "",
      "content": {
        "buckets": [],
        "filters": [],
        "sorts": [],
        "properties": {},
        "visualizationUrl": "",
        "version": "2"
      }
    }
  }
}
first followup question, is this scheme still valid for CN 3.6+?
i
Thank you for the additional details. Looks good to me, but let me double-check this internally, please.
e
sure, thanks
hi @Ivana Gasparekova, were you able to confirm the structure / any details? I've since created several visualizations via GUI, extracted the metadata for all and ran it through a schema generator. So I have a better idea of which properties are more free-form and which are expecting certain values. Do you have any info regarding minimum content requirements for bucket contents to be valid (or filters or sorts for that matter)?