API Integration
Last updated
In modern application development, APIs are the lifeblood of your data flow. Since most logic and data reside on the backend, your app needs a robust way to fetch, display, and manipulate this data.
API responses are the primary source of External Data in your app. Once fetched, this data is often stored in State (like a list of products in App State) or bound directly to widgets (like a User Profile).
Crucially, Digia does not act as a proxy for your API calls.
Definition: You define the API structure (Endpoint, Headers, Body) in the Digia Dashboard. This definition is part of the JSON DSL downloaded by the app.
Execution: The Mobile App (Client) reads this definition and executes the network request directly to your server.
The request goes: Mobile Device -> Your Server.
It does NOT go: Mobile Device -> Digia Server -> Your Server.
This ensures:
Low Latency: No middleman adds delay.
Security: Your data never passes through Digia's servers during runtime.
Privacy: We don't see your users' data.
Digia supports the two most common standards:
REST: Standard HTTP methods (GET, POST, PUT, DELETE, PATCH).
GraphQL: Queries and Mutations via HTTP POST.
Defining APIs: Configure your endpoints, headers, and variables in the Dashboard.
Using APIs: Bind them to UI (FutureBuilder) or trigger them via Actions (CallRestAPI).
Last updated