WebAPI DataSource provides REST API connectivity for BeepDM, treating HTTP endpoints as queryable data sources with full CRUD support.
Core object graph in WebAPIDataSource:
WebAPIConfigurationHelper- Configuration managementWebAPIAuthenticationHelper- Auth handlingWebAPIRequestHelper- HTTP request executionWebAPIDataHelper- Data transformationWebAPICacheHelper- Response cachingWebAPIRateLimitHelper- Rate limitingWebAPISchemaHelper- Schema inferenceWebAPIErrorHelper- Error handling
- Connection lifecycle: open/close and transaction-style stubs
- HTTP execution: GET/POST/PUT/PATCH/DELETE with retry and auth
- Data operations:
GetEntity,InsertEntity,UpdateEntity,DeleteEntity, bulk update - Structure/schema: entity discovery and inferred
EntityStructurehandling - Query/scripting: query wrappers and script-oriented methods
var props = new WebAPIConnectionProperties
{
ConnectionName = "MyAPI",
DatabaseType = DataSourceType.WebService,
BaseUrl = "https://api.example.com/v1",
AuthMode = WebAPIAuthMode.Bearer,
AuthToken = "your-token",
Timeout = TimeSpan.FromSeconds(30),
RetryCount = 3,
EnableCaching = true,
CacheExpiration = TimeSpan.FromMinutes(5),
RateLimitRequestsPerSecond = 10
};
editor.ConfigEditor.AddDataConnection(props);- None
- ApiKey (header or query parameter)
- Basic (username/password)
- Bearer (token)
- OAuth2 (client credentials flow)
var ds = editor.GetDataSource("MyAPI");
ds.Openconnection();
// GET request
var customers = ds.GetEntity("Customers", new List<AppFilter>{
new AppFilter { FieldName = "Status", Operator = "=", FilterValue = "Active" }
});
// POST request
var newCustomer = new Dictionary<string, object>
{
["Name"] = "New Customer",
["Email"] = "customer@example.com"
};
ds.InsertEntity("Customers", newCustomer);DataManagementEngineStandard/WebAPI/WebAPIDataSource.*.csDataManagementEngineStandard/WebAPI/Helpers/DataManagementModelsStandard/WEPAPI/IWebAPIDataSource.cs