Skip to content
Set a World runtime override

Set a World runtime override

Explicitly enable or disable a runtime capability for one World.

PUT/api/v1/worlds/:worldId/integrations/:integration/capabilities/:capability

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/worlds/01995e56-e2d4-7f19-b691-7bf9af6abdc8/integrations/smallworld/capabilities/python", {
  method: "PUT",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "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#

worldIdUUIDrequired

The World ID returned by POST /worlds or GET /worlds.

integrationstringrequired

An integration key from GET /integrations or /integration-configurations.

capabilitystringrequired

python or javascript. These capabilities belong to the smallworld integration.

Request body#

enabledbooleanrequired

true enables the capability in this World; false disables it.

Responses#

Returns World configuration. Each capability has override (inherit, enabled, or disabled), workspaceEnabled, and effectiveEnabled.

200 response
{
  "worldId": "01995e56-e2d4-7f19-b691-7bf9af6abdc8",
  "integration": "smallworld",
  "enabled": true,
  "alwaysEnabled": true,
  "toolPolicies": [],
  "capabilities": [
    {
      "key": "python",
      "title": "Python",
      "description": "Run Python code.",
      "command": "python3",
      "override": "disabled",
      "workspaceEnabled": true,
      "effectiveEnabled": false
    }
  ]
}
More about this endpoint

Use integration smallworld. An explicit World override takes precedence over the workspace runtime default.