Update runtime capability defaults
Set the workspace defaults for Python and JavaScript.
/api/v1/integrations/:integration/capabilitiesconst response = await fetch("https://api.smallworld.sh/api/v1/integrations/smallworld/capabilities", {
method: "PUT",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({
"capabilities": [
{
"key": "python",
"enabled": false
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
Use your server-side apiKey. Replace the example IDs.
Path parameters#
integrationstringrequiredAn integration key from GET /integrations or /integration-configurations.
Request body#
capabilitiesobject[]requiredOne or two distinct entries with key (python or javascript) and enabled (boolean).
Responses#
Returns workspace configuration, assigned worldIds, supported authentication schemes, tool catalog and defaults, optional runtime capabilities, and setup state. Lists are not paginated. World IDs represent assignment, even while workspace activation is off. The existing GET /integrations connection catalog keeps its original response.
{
"integration": "smallworld",
"name": "Smallworld",
"description": "Connect Notion workspaces.",
"enabled": true,
"configured": true,
"hasBeenActivated": true,
"kind": "builtin",
"removable": false,
"authScheme": "none",
"authSchemes": [
"none"
],
"worldIds": [
"01995e56-e2d4-7f19-b691-7bf9af6abdc8"
],
"tools": [],
"defaultPolicies": [],
"setupMessage": null,
"requiresSetup": true,
"toolAvailabilityNote": null,
"capabilities": [
{
"key": "python",
"title": "Python",
"description": "Run Python code.",
"command": "python3",
"enabled": false
}
]
}
More about this endpoint
Use integration smallworld. Both runtimes default to enabled. Omitted capabilities keep their saved defaults.
The batch is atomic. A World with an explicit capability override keeps that override; inherit uses the new workspace default.