Last revised: March 2025
Output API
Creating Output APIs
Output API’s allow you to create a API endpoint about one of your datasets.
How to Add API Endpoints
To create an output API, make sure you’re on the Data & Users page. Select “Datasets” to begin this process.
Select a dataset and click the action for “Create custom API of dataset/version”.
Provide a clear and descriptive name for the API. This name will be essential for querying the API later on. For instance, if it's an “sales order” API, consider naming it accordingly for easy reference.
Add a detailed description. This description should clarify the purpose or nature of the API. The clarity of the description is crucial as it helps users understand the API's functionality and usage.
Enter the API endpoint URL or path in the designated field. This URL directs the application to the specific location of the API.
Specify the request type of API (GET for retrieving data or POST for sending data) from the available options.
Use the toggle to turn on the API for use.
Click Save, the modal should check for unique domains or names (among other API’s, not files).
API Tokens
API tokens are used to prevent access to the output APIs from those without the appropriate token. The API tokens page is a place where you can create or remove tokens for output API’s. Before you can test the API, you need to generate a token that authorizes access to the API.
Generating a New Token
Navigate to the Generate Tokens tab. Here, you can generate a new token by clicking on the "Generate New Token" button. The token will appear in the generated token field above the button. This token will be used to authenticate your API requests.
Copying the Token
Use the copy button next to the generated token to copy the token to your clipboard. This token will be necessary for testing the API and retrieving data securely.
Using Output APIs
Assigning tokens to APIs
Once you’ve created a token, you’ll need to assign it to the output API you created.
Select the Section: In the Data & Users page, go to the Output API tab.
Select the API: Choose the API you want to test from the list.
Select action for “Assign token to API”: Using the dropdown, you can choose which tokens to associate with your API, and save them.
Testing the API
You’re now ready to start working with the APIs:
Select the Section: In the Data & Users page, go to the Output API tab.
Select the API: Choose the API you want to test from the list.
Select ‘View API Documentation’: The details of the selected API, including the endpoint URL and request type, will be displayed.
Click ‘Test API’: By clicking this button, a request will be sent to the API endpoint. The platform will automatically include the token in the request header to authenticate the request.
View the Response: The JSON response from the API will be displayed on the right side. This response contains the data retrieved from the dataset associated with the API.
Copying the Request and Response
The AXIOS REQUEST section displays the code snippet that shows how the request is made using Axios in a Node.js environment. You can copy this request code by clicking the "COPY AXIOS REQUEST" button, and utilize the request code by adding it into other systems that accept JavaScript.
Similarly, you can copy the JSON response by clicking the "COPY JSON RESPONSE" button. This is helpful for further processing or integrating the data from the API into other systems.
Managing APIs
You can manage your APIs by activating or deactivating them, updating their configuration, or generating new tokens as required. These features give you full control over the data exposure and API functionality within your platform.
Viewing API Parameters
API Name: This is the name of the API that will be used to identify it within the platform.
API Endpoint: The URL where the API is hosted. This endpoint is generated automatically based on the dataset you choose to activate.
Method: This field is pre-set to GET, indicating that the API will retrieve data from the server.
Status: Indicates whether the API is Activated or Deactivated. An activated API is ready to be used and will be listed in the available APIs for testing.
Activate/Deactivate Toggle: Allows you to activate or deactivate the API. When activated, the API will be available for use and testing.