Overview
Data API block allows developers to create REST, GraphQL, gRPC, and OData APIs without writing any code. Developers define the APIs required through YAML for 90% of the cases. If there are specific cases where more control is needed, they can extend the service with few lines of JavaScript or WASM.
Data API block does not generate any code. It creates required API endpoints at run-time based on the YAML files and configuration. Read more about our views on Model-Driven Development (MDD). This makes it faster to develop and easier to deploy.
Key Concepts
Datastore
Datastore is a logical grouping of enums, embeddables and entities. Every datastore is tied to a database.
Enums
Enums allow developers to define list of values. Entities can have one more fields with data type as enum.
Embeddables
Embeddables are like entities, but do not have real tables or collection. They work like entities for validations and computed fields but cannot exist without entities. They are useful to create validated nested structures as JSON objects in relational table or as nested document in NoSQL collections.
Traits
Traits are way to group together common features that entities should have, like common fields with validations. Developers apply traits to entities with the inherits
definition.
Types
Data types are the categories of data values that can be stored, processed, and retrieved by a programming language. Common data types include numbers (integers, floats, complex), characters (single characters, strings), booleans (true/false), dates, times, and null/undefined values.
Having a universal type system allows for each integration between various services across technology stacks, programming language, and system boundaries.
Entities
Entities are foundational blocks of building datastores and APIs. Each entity is mapped to a table in a relation database and to a collection in a Document database.
Stateflows
In kis.ai, we introduce a powerful feature called stateflows, which function similarly to state machines. Stateflows are assigned to fields within an application, defining the finite set of values a field can hold and the specific order in which these values can be transitioned.