Workspace Settings
Each workspace has a set of settings associated with it. They configure workspace-wide options for all members. This includes metadata and content formatting options, your Prettier config, and the configuration of your dashboard views. The API enables you to retrieve and configure these settings.
Retrieve Workspace Settings
Retrieves workspace settings.
ID of the workspace settings
JSON-stringified Prettier configuration
ID of the column in the table view
Width of the column in the table view
Pattern for auto-generating canonical link for content pieces
Enabled content piece metadata fields
Enabled inline formatting options
Enabled block content types
Enabled embeds
curl --request GET \
--url "https://api.vrite.io/workspace-settings" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Accept: application/json'
const client = createClient({
token: "<API_TOKEN>"
});
const result = await client.workspaceSettings.get();
{
"id": "93b51ca88b6f80085ddb7b4c",
"prettierConfig": "string",
"dashboardViews": {
"table": [
{
"id": "string",
"width": 0
}
]
},
"metadata": {
"canonicalLinkPattern": "string",
"enabledFields": [
"slug"
]
},
"marks": [
"bold"
],
"blocks": [
"heading1"
],
"embeds": [
"codepen"
]
}
Update Workspace Settings
Updates workspace settings using the provided data.
JSON-stringified Prettier configuration
ID of the column in the table view
Width of the column in the table view
Pattern for auto-generating canonical link for content pieces
Enabled content piece metadata fields
Enabled inline formatting options
Enabled block content types
Enabled embeds
curl --request PUT \
--url "https://api.vrite.io/workspace-settings" \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Accept: application/json'
const client = createClient({
token: "<API_TOKEN>",
});
const result = await client.workspaceSettings.update({
// Optional
prettierConfig: "{}",
// Optional
dashboardViews: {
// Optional
table: [
{
id: "string",
width: 0,
},
],
},
// Optional
metadata: {
// Optional
canonicalLinkPattern: "string",
// Optional
enabledFields: ["slug"],
},
// Optional
marks: ["bold"],
// Optional
blocks: ["heading1"],
// Optional
embeds: ["codepen"],
});