Edit

Share via


Automate variable libraries by using APIs (preview)

You can use the Microsoft Fabric REST APIs to fully automate the management of variable libraries in application lifecycle management (ALM).

If you're using the APIs as part of your lifecycle management, permissions for item reference are checked during Git update and pipeline deployment.

Note

The Fabric variable library item is currently in preview.

Prerequisites

To use the APIs, you need:

  • The same prerequisites as for the variable library item.
  • A Microsoft Entra token for the Fabric service. Use the token in the authorization header of the API call. For information about how to get a token, see Fabric API quickstart.

Variable library APIs

You can use the variable library REST APIs to perform the following functions:

The variable library REST APIs support service principals.

Examples

For some examples of how to use the APIs, see the REST documentation for each API.

For a breakdown of the definition structure of a variable library, see Variable library definition.

Considerations and limitations

Size limitations

  • There can be up to 1,000 variables and up to 1,000 value sets, as long as you meet both of these requirements:

    • The total number of cells in the alternative value sets is less than 10,000.
    • The item's size doesn't exceed 1 MB.

    These requirements are validated when you save changes.

  • The note field can have up to 2,048 characters.

  • The value-set description field can have up to 2,048 characters.

Limitations for alternative value sets

  • Alternative value sets in a variable library appear in the order in which you added them. Currently, you can't reorder them in the UI. To change the order, edit the JSON file directly.
  • The name of each value set must be unique within a variable library.
  • Variable names must be unique within a variable library. You can have two variables with the same name in a workspace if they're in different items.
  • There's always one (and only one) active value set in a variable library at a time. You can't delete a value set while it's active. To delete it, first configure another value set to be active. You can have a different active value set for each stage of a deployment pipeline.