requestExtensionData

Updated:

Make requests to your backing extension.

Description

Makes a request to the extension's backend data service. This is the primary way for extensions to communicate with their server-side logic.

Signature

tecton.sources.requestExtensionData(requestOptions: IExtensionRequestBody): Promise<IExtensionResponse<R>>;
export interface IExtensionRequestBody {
    route: string;
    body?: Record<string, any>;
    featureName?: string;
}
export interface IExtensionResponse {
    data: any;
    status: number;
    statusText: string;
}

Usage

Make a request to create a new user via the extension backend.

tecton.sources.requestExtensionData({
    route: 'create_user',
    body: { name: "Tecton", email: "tecton@q2.com" }
}).then((IExtensionResponse) => {
    // Do something with response
}).catch((IExtensionResponse) => {
    // Fires for non 200 series responses
});

Parameters

Some parameters are only supported by specific platforms. Platform support for individual parameters will be indicated with a badge below the parameter name.

requestOptions.route
requestOptions.body
requestOptions.featureName
UUX

Release Notes

Tecton
0.16.0

Platform Support

UUX
Config
Console