Skip to content

Latest commit

 

History

History
89 lines (56 loc) · 8.2 KB

File metadata and controls

89 lines (56 loc) · 8.2 KB

WorkspaceSettings

Overview

Available Operations

  • get - Retrieve workspace settings
  • update - Update workspace settings

get

Returns the current settings for the authenticated workspace: its read-only key/slug, display name, the enforce-enabled-models flag, and the workspace-default PII redaction plugin configuration.

Example Usage

from orq_ai_sdk import Orq
import os


with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    res = orq.workspace_settings.get()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.GetWorkspaceSettingsResponse

Errors

Error Type Status Code Content Type
models.APIDefaultError 4XX, 5XX */*

update

Partially updates workspace settings. Every field is optional; an omitted field is left unchanged. Provide display_name to rename the workspace, enforce_enabled_models to toggle model enforcement, or pii_redaction to update the workspace-default PII redaction plugin: enabled is always applied, and config replaces the stored config only when present.

Example Usage

from orq_ai_sdk import Orq
import os


with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    res = orq.workspace_settings.update()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
display_name Optional[str] ➖ New workspace display name. Omit to keep the current name.
enforce_enabled_models Optional[bool] ➖ New value for the enforce-enabled-models flag. Omit to keep the current
value.
pii_redaction Optional[models.PiiRedaction] ➖ Workspace-default PII redaction update. Omit to leave it unchanged. When
present, enabled is always applied; config omitted keeps the stored
config, config present replaces it wholesale, and config: {} clears it.
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.UpdateWorkspaceSettingsResponse

Errors

Error Type Status Code Content Type
models.APIDefaultError 4XX, 5XX */*