JavaScript Imports
Import data from web APIs into Decipad using javascript.
Importing Data with JavaScript in a Notebook
- Begin by typing
/integrations
on an empty paragraph. - Select
Code
from the integration options. - Write your JavaScript code to fetch your data, then press
Run
to execute it. - Utilize the preview tab to adjust data types if necessary.
- Click
Insert
to add the data into your notebook.
Once your integration is added to your notebook, you can use the refresh button to update the table with the latest data.
Integration Private Keys
Private keys provide secure access control for your code by restricting unauthorized users.
- To set up a new key:
- Go to your workspace and click on "Integration Secrets". You can add a new value or remove old keys.
- Alternatively, click on "Insert Secret" in the JavaScript code editor within your integrations panel.
- To reuse your private key:
- Click on "Insert Secret" in the JavaScript code editor and select the desired secret. A line of code will be automatically added to your script.
Note: For security reasons, API secrets can only be used directly in a fetch()
statement. You can't assign them to variables or use them arbitrarily.