Build an external dashboard with OS data
How it works
Using the Formli API, you can dynamically pull response data to create dashboards with tools like Retool.
Setup Guide
Export Response View as API request
Authorization
To access the response data, you need to generate an API token. You can access and rotate API keys via the Integrations page.
- Go to Settings of the workspace.
- Open Integrations tab
- Scroll down to API tokens section
- Click on Generate API Token button
- Copy the key. Once it's generated, the key cannot be accessed again.
- You can find the list of previously generated tokens in this section. You can generate multiple tokens for the workspace.
If you need to update the token or no longer require it, you have the option to revoke it:
Export Response View as API request
You can export responses via an Responses API endpoint
- Go to
Responses
and open the response view that you need to export. - Click on the
Export
button - You can find the code to use in your API request in cURL and Fetch format.
Request:
To retrieve response items, you need to make a GET request to the following endpoint:
https://app.formli.com/api/v1/response_views/{response_view_uuid}/items
Request Headers
Include the following headers in your request:
- Authorization: Bearer {token}
- Workspace-Id: {workspace_id}
Example Request
GET /api/v1/response_views/{response_view_uuid}/items HTTP/1.1
Host: app.formli.com
Authorization: Bearer {token}
Workspace-Id: {workspace_id}
Replace {response_view_uuid}
, {token}
, and {workspace_id}
with your specific response UUID, authentication token, and workspace ID respectively.
Response
A successful request will return a JSON object containing the response items. The structure of the JSON object is as follows:
{
"data": [
[
{
"columnId": 27140,
"uuid": "rvc665e2",
"name": "Form Name",
"value": "API Test"
},
{
"columnId": 27142,
"uuid": "rvc2ddz4o",
"name": "Responded At",
"value": "06/24/24"
},
{
"columnId": 27148,
"uuid": "rvzgv6w15",
"name": "Full name",
"value": "Alex"
}
],
[
{
"columnId": 27140,
"uuid": "rv7w665e2",
"name": "Form Name",
"value": "API Test"
},
{
"columnId": 27142,
"uuid": "rvc2ddz4o",
"name": "Responded At",
"value": "06/24/24"
},
{
"columnId": 27148,
"uuid": "rvcxv6w15",
"name": "Full name",
"value": "Sam"
}
],
],
"meta": {
"pages": 1,
"count": null
}
}
Data Fields
data: An array of response items. Each response item is an array of objects representing individual fields.
- columnId: The ID of the column.
- uuid: The unique identifier for the field.
- name: The name of the field.
- value: The value of the field.
meta: Metadata about the response.
- pages: The number of pages in the response.
- count: The total number of items (can be null).
Error Responses
If there is an error with your request, you may receive one of the following HTTP status codes:
- 401 Unauthorized: This error occurs if your authorization token is invalid or missing.
- 404 Not Found: This error occurs if the specified
response_view_uuid
orworkspace_uuid
does not exist or if there is an error in your endpoint address.