App schema

Each app should follow strict schema with the following structure:

NameTypeDescriptionRequiredExample
namestringName of the apptrue"MyApp"
type"crunch"Set to "crunch" if app has predefined schemafalse"crunch"
websitestringWebsite of appfalse"http://myawesomeapp.com"
versionstringApp versiontrue"1.0.0"
descriptionstringApp descriptiontrue"My awesome app"
authenticationArray<Authentication>Available authentications in apptrue[{id: "none", name: "no auth"}]
sourcesArray<Source>Available sources of data in app. Can't be empty.true[{id: "flowers", name: "Flowers"}]

Authentication

Authentication model represents type of authentication in app and has following structure:

NameTypeDescriptionRequiredExample
id"none"|"oauth"|"oauth2"|stringAuthentication idtrue"none"
namestringName of authenticationtrue"Connection Settings"
descriptionstringDescription of authenticationfalse"Give the name for connection"
fieldsArray<AuthenticationField>Authentication fieldsfalse[{optional: false, id: "accountName", name: "Title", type: "text", description: 'Give the name for connection'}]

If your app doesn't require authentication you should add authentication with id = "none". In the case you can omit fields.

Authentication field

Authentication field represents the field in account. So account that will send to API endpoints will consist of the authentication fields. Authentication field has following structure:

NameTypeDescriptionRequiredExample
idstringId of field. The id will be specified in account object.true"accountName"
namestringName of the field. Will be displayed in auth form.true"Title"
typestring (more about types)Type of the fieldtrue"text"
descriptionstringDescription of the fieldtrue"Give the name for connection"
optionalbooleanIs the field optionalfalsefalse
valuestringDefault value of the fieldfalsenull

Note that authentication field with some types requires more information to specify. For example, for highlightText type you also need to specify editorMode in authentication field.

Source

Source represents kind of data and has following structure:

NameTypeDescriptionRequiredExample
idstringId of data sourcetrue"query"
namestringName of data sourcetrue"Query"
descriptionstringDescription of data sourcefalse"PostgreSQL query"
filterArray<SourceFilter>Array of filters for the data sourcefalse[{id: "query", title: "Query", type: "highlightText", editorMode: "sql"}]

If source doesn't require any filtering you can omit filter field.

Source filter

Source filter represents filter that will be applied on source data. Source filter has following structure:

NameTypeDescriptionRequiredExample
idstringId of filtertrue"table"
titlestringTitle of filtertrue"Table"
typestring (more about types)Type of filtertrue"list"
datalistbooleanIs filter has values to select fromfalsetrue
optionalbooleanIs filter optionalfalsefalse
securedbooleanSecured filter values are not available for change by non-chart ownerfalsetrue

Some additional properties should be specified in case when filters should be displayed in special modes, for example JSON or SQL. For example, for highlightText type you also need to specify editorMode for the filter field.