getRecipe

Retrieves a specific data prep recipe by ID.

Syntax 

import { LightningElement, api, wire } from "lwc"; import { getRecipe } from "lightning/analyticsWaveApi"; export default class GetRecipe extends LightningElement { @api recipeId; // or fetch the ID @wire(getRecipe, { id: "$recipeId", format: "R3", }) onGetRecipe({ data, error }) { if (error) { console.log(`getRecipe(${recipeId}) ERROR:`, error); } else if (data) { console.log(`getRecipe(${recipeId}) RESPONSE:`, data); } } }

Data Prep Recipe API Resource 

GET /wave/recipes/${id}

getRecipe uses this Data Prep Recipe API resource.

Parameters 

Parameter NameTypeDescriptionRequired?
idStringThe ID of the recipe.Yes
formatStringSpecifies the format of the returned recipe:
  • R2 (Data Prep Classic)
  • R3 (Data Prep)
The default is R3.

Returns 

The Summer '25 guide is now live

Looking for the Component Reference? Go to https://developer.salesforce.com/docs/component-library/.