Skip to content

Others

This section covers methods not covered by the other sections.

MethodDescription
getConfigGet spreadsheet config.

Jspreadsheet getConfig(): Promise<Spreadsheet>

GET /api/:guid
deleteDelete spreadsheet.

Jspreadsheet delete(): Promise<void>

DELETE /api/:guid
import { Client } from "@intrasheets/client";
// Create a new client
const client = new Client({
// API Server
baseUrl: "http://localhost:8009/api",
// Your authentication token
token: "eyJhbGciOiJIUzUxMiIsInR5cCJ9.eyJkb21haW4iOiJsb2NhbGhvc3Q6ODAPQSJ9.Xr2Ir2-zEc_tqV5y6i",
});
// Spreadsheet Guid
const guid = '15eb1171-5a64-45bf-be96-f52b6125a045';
// Get the spreadsheet instance
const spreadsheet = client.getSpreadsheet(guid);
// Set spreadsheet config
spreadsheet.getConfig().then((config) => {
console.log(config);
});
Terminal window
curl -X GET "http://localhost:8009/api/15eb1171-5a64-45bf-be96-f52b6125a045" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCJ9.eyJkb21haW4iOiJsb2NhbGhvc3Q6ODAPQSJ9.Xr2Ir2-zEc_tqV5y6i"

You can get the configuration of the online spreadsheets using the following route:

// Get the configuration properties of the spreadsheet
https://jspreadsheet.com/api/15eb1171-5a64-45bf-be96-f52b6125a045
import { Client } from "@intrasheets/client";
// Create a new client
const client = new Client({
// API Server
baseUrl: "http://localhost:8009/api",
// Your authentication token
token: "eyJhbGciOiJIUzUxMiIsInR5cCJ9.eyJkb21haW4iOiJsb2NhbGhvc3Q6ODAPQSJ9.Xr2Ir2-zEc_tqV5y6i",
});
// Spreadsheet Guid
const guid = '15eb1171-5a64-45bf-be96-f52b6125a045';
// Get the spreadsheet instance
const spreadsheet = client.getSpreadsheet(guid);
// Delete spreadsheet
spreadsheet.delete().then(() => {
console.log("deleted");
});
Terminal window
curl -X DELETE "http://localhost:8009/api/15eb1171-5a64-45bf-be96-f52b6125a045" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCJ9.eyJkb21haW4iOiJsb2NhbGhvc3Q6ODAPQSJ9.Xr2Ir2-zEc_tqV5y6i"