Skip to content

Latest commit

 

History

History
331 lines (212 loc) · 17.6 KB

File metadata and controls

331 lines (212 loc) · 17.6 KB

WorkspaceSecurity

Overview

Available Operations

list_domains

Lists domain-verification records for the workspace.

Example Usage

from orq_ai_sdk import Orq
import os


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

    res = orq.workspace_security.list_domains(workspace_key="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
workspace_key str ✔️ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.ListDomainsResponse

Errors

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

create_domain

Creates a domain-verification challenge and returns the TXT record to add to DNS.

Example Usage

from orq_ai_sdk import Orq
import os


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

    res = orq.workspace_security.create_domain(workspace_key="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
workspace_key str ✔️ N/A
domain Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.CreateDomainResponse

Errors

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

delete_domain

Permanently removes a domain-verification record.

Example Usage

from orq_ai_sdk import Orq
import os


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

    orq.workspace_security.delete_domain(workspace_key="<value>", domain_id="<id>")

    # Use the SDK ...

Parameters

Parameter Type Required Description
workspace_key str ✔️ N/A
domain_id str ✔️ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Errors

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

verify_domain

Checks DNS for the expected TXT record and marks the domain as verified when it matches.

Example Usage

from orq_ai_sdk import Orq
import os


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

    res = orq.workspace_security.verify_domain(workspace_key="<value>", domain_id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
workspace_key str ✔️ N/A
domain_id str ✔️ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.VerifyDomainResponse

Errors

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

get_ip_allowlist

Returns the workspace IP allowlist and the current caller IP when available.

Example Usage

from orq_ai_sdk import Orq
import os


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

    res = orq.workspace_security.get_ip_allowlist(workspace_key="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
workspace_key str ✔️ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.GetIPAllowlistResponse

Errors

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

update_ip_allowlist

Updates the workspace-level allowlist switch. Every listed range applies while the allowlist is enabled.

Example Usage

from orq_ai_sdk import Orq
import os


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

    res = orq.workspace_security.update_ip_allowlist(workspace_key="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
workspace_key str ✔️ N/A
enabled Optional[bool] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.UpdateIPAllowlistResponse

Errors

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

add_ip_range

Adds an IPv4 or IPv6 CIDR range to the workspace allowlist.

Example Usage

from orq_ai_sdk import Orq
import os


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

    res = orq.workspace_security.add_ip_range(workspace_key="<value>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
workspace_key str ✔️ N/A
cidr Optional[str] ➖ N/A
description Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.AddIPRangeResponse

Errors

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

delete_ip_range

Permanently removes a CIDR range from the workspace allowlist.

Example Usage

from orq_ai_sdk import Orq
import os


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

    orq.workspace_security.delete_ip_range(workspace_key="<value>", range_id="<id>")

    # Use the SDK ...

Parameters

Parameter Type Required Description
workspace_key str ✔️ N/A
range_id str ✔️ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Errors

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