Config
The configuration defines styles, data, columns and other properties from a spreadsheet.
Documentation
The following routes are available to interact with the spreadsheet configuration.
getConfig
Get the worksheet configuration object.
GET /api/:guid/:worksheetIndex
setConfig
Set the worksheet configuration.
| Parameter | Description |
|---|---|
config |
New definitions. |
POST /api/:guid/:worksheetIndex/config
Examples
Get the configuration
Get the configuration of the remote worksheet by the guid identifier.
const baseUrl = 'https://your-server.example.com/api';
const guid = '15eb1171-5a64-45bf-be96-f52b6125a045';
const headers = { 'Authorization': `Bearer ${token}` };
// Get the worksheet configuration
const config = await (await fetch(`${baseUrl}/${guid}/0`, { headers })).json();
console.log(config);
Update the configuration
Change the configuration of a spreadsheet.
const baseUrl = 'https://your-server.example.com/api';
const guid = '79b45919-c751-4e2b-a49a-6c1286e2fc03';
const headers = { 'Authorization': `Bearer ${token}` };
// Set config
await fetch(`${baseUrl}/${guid}/0/config`, {
method: 'POST',
headers,
body: new URLSearchParams({
'config[filters]': 'true',
}),
});