requestExtensionData

Updated:
Supported Platforms:
UUX
Console
Config

Make requests to your backing extension.

Like requestPlatformData, requestExtensionData makes a request through the platform's window. However, it only makes requests to your backing extension, allowing your extension to be the backend to your frontend.

Details

Type

interface RequestOptions {
  route: string;
  body?: object;
}

tecton.sources.requestExtensionData(requestOptions: RequestOptions): Promise<XMLHttpRequest>

Example

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

Arguments

UUX
Console
Config

The routing key corresponding to a route in your extension.py file.

UUX
Console
Config

A JSON-serializable object containing your request data.

UUX

Extension featureName to call if needing to call extension other than current.

Release Notes

Initial Release