dataSource function creates a data source object that fetches data from an external API and returns it in a format suitable for rendering in an integration config wizard. Data sources power dynamic dropdowns, object selectors, field mappers, and JSON forms.
Function signature
Parameters
An object describing the data source. See fields below.
DataSourceDefinition fields
Controls how the data source appears in the Prismatic UI.
The type of UI widget used to render the data. Must be one of the values below.
The async function that fetches data and returns it in the format required by
dataSourceType.DataSourceContext is a subset of ActionContext. It does not include instanceState, crossFlowState, executionState, integrationState, stepId, executionId, webhookUrls, or invokeFlow.Example return value for UI preview.
The key of another data source in the same component that provides additional details about the content of this data source (e.g., example field values for an
objectFieldMap).Return type
Theperform function must return a Promise<DataSourceResult<TDataSourceType>>:
The data returned by the data source. The type depends on
dataSourceType.Optional extra data available during config wizard page loading. Not passed to action steps.
Examples
- picklist
- objectSelection
- objectFieldMap
- jsonForm
Related
input— Define inputs for a data sourceconnection— Define the connection passed toperformcomponent— Register data sources in a component
