HomeGuidesRecipesAPI EndpointsRelease NotesCommunity
Log In
Guides

Working Within a Data Fabric

Data Fabrics contain the data you will work with throughout the following guides.

❗️

Header Requirements

As of Layar 1.7 API requests require Data Fabric IDs in the header of the request.

Finding Data Fabric IDs

In order to find your available data fabrics, you can utilize the /connect/people/dataFabrics endpoint in order to find all Data Fabrics you have access to. Below is an example response you will get from this endpoint.

('{"dataFabrics":[{"id":21,"name":"Fabric1 '
 'Fabric","role":"ROLE_DATA_FABRIC_OWNER","nodes":[{"id":12,"name":"User '
 'Data","hostName":"YOUR_ENVIRONMENT","userData":true}]}')

In the example above the Data Fabric ID would be 12.

🚧

String or Integer?

When using the ID in your header, you will always use it as a string not an integer.

You can also find your Data Fabric ID by locating a document of interest in Layar and viewing the URL, which contains the Data Fabric ID.

Header

Now that you have a Data Fabric ID, let's go over what the Header should look like. You need to include the X-Vyasa-Data-Fabric parameter to all headers. Example of this below.

header = {'Accept': 'application/json',
              'Content-Type': 'application/json',
              'Authorization': f'Bearer {token}',
              'X-Vyasa-Client': 'layar',
              'X-Vyasa-Data-Providers': 'YOUR_PROVIDER',
              'X-Vyasa-Data-Fabric': '22'
              }