Agent Management

For usage information and examples, see Dataiku Agent Management.

class dataikuapi.agentmanagement.agent.Agent(client, platform_id, agent_id)

A monitored Agent Management agent.

Do not create this directly, use dataikuapi.agentmanagement.platform.Platform.get_agent().

property id
get_status()

Returns status information about this agent.

Return type:

dataikuapi.agentmanagement.agent.AgentStatus

get_settings()

Returns the settings of this agent.

Return type:

dataikuapi.agentmanagement.agent.AgentSettings

list_alert_configurations(as_type='listitems')

Lists alert configurations owned on this agent, not configurations from other levels.

Parameters:

as_type (str) – “listitems”/”listitem” returns list items; “objects”/”object” returns handles of dataikuapi.agentmanagement.alerting.AlertConfiguration

Returns:

a list - see as_type for more information

Return type:

list

new_alert_configuration(type='metric', name=None)

Initializes a new alert configuration builder owned by this agent.

Configure the returned builder, then call its create() method to submit it.

Parameters:
  • type (str) – metric or agent_review

  • name (str) – optional display name

Return type:

MetricAlertConfigurationBuilder or AgentReviewAlertConfigurationBuilder

get_alert_configuration(configuration_id)

Returns a handle to an alert configuration owned on this agent.

Parameters:

configuration_id (str) – configuration ID

Return type:

dataikuapi.agentmanagement.alerting.AlertConfiguration

list_applicable_alert_configurations()

Lists global, platform, matching scope, and agent alert configurations applicable to this agent.

Configurations apply independently, without overriding one another. Disabled and incomplete configurations are included; edit each configuration where it was defined.

Each result contains configuration, its resolved loc, and latestEvaluation when available, even if no alert has opened. Unavailable evaluations do not imply recovery. Evaluation results may include shared breachProgress and policy-specific diagnostics, identified by type. Timestamps are in milliseconds since the Unix epoch.

Return type:

list of dataikuapi.agentmanagement.alerting.AlertConfigurationListItem

evaluate_alerts(mode='DUE')

Queues alert evaluation through the scheduler for this agent, whether or not periodic evaluation is enabled. Evaluation errors are logged asynchronously.

Parameters:

mode (str) – DUE processes pending metric buckets within the catch-up limit. FORCE_LATEST recomputes the latest completed eligible bucket and corrects its alerts. FORCE_CATCH_UP does the same for the last N buckets, where N is the configured catch-up depth. Both read additional supporting history when consecutive breaches require it. Affected alerts remain in history as invalidated. Replacements have new IDs, even when recomputed values are unchanged, and do not inherit acknowledgements; these remain on the original alerts. Missing target observations prevent correction of the requested range. Missing older supporting observations also prevent correction when too few consecutive breaches remain to establish the observed severity. Agent-review alerts evaluate the latest eligible review run in every mode.

Returns:

number of agents included in the queued request

Return type:

int

delete()

Deletes the agent.

start_disable(allow_destructive=False)

Starts disabling this agent on its remote platform.

Parameters:

allow_destructive (bool) – accept an irreversible disable operation, including permanent deletion of remote resources (default: False). Without this consent, the server rejects destructive operations.

This method returns before the operation completes. Call wait_for_result() on the returned operation to wait.

Returns:

the Agent Management operation tracking the activation change

Return type:

dataikuapi.agentmanagement.operations.Operation

start_enable()

Starts enabling this agent on its remote platform.

This method returns before the operation completes. Call wait_for_result() on the returned operation to wait.

Returns:

the Agent Management operation tracking the activation change

Return type:

dataikuapi.agentmanagement.operations.Operation

setup_monitoring(run_first_fetch=True, include_in_uptime_tests=True, **kwargs)

Enables monitoring for this agent and provisions its monitoring resources.

For multiple agents, prefer a single call to dataikuapi.agentmanagement.platform.Platform.setup_monitoring() to set them up in one pass. Administration rights are required on this agent.

Parameters:
  • run_first_fetch (boolean) – whether to launch the initial data fetch (default: True)

  • include_in_uptime_tests (boolean) – whether to include this agent in supported uptime tests (default: True)

  • project_key (str) – optional project in which to provision monitoring resources

  • connection_name (str) – optional connection for managed monitoring datasets

  • partitioning (str) – optional time partitioning, NONE or DAY

Returns:

setup results containing configuredAgentIds and warnings; check warnings if the agent could not be configured

Return type:

dict

get_available_metric_ids()

Lists metric identifiers supported by this agent and their query compatibility.

Each dictionary contains id, supportsBuckets and supportsTimeSeries, as documented by dataikuapi.AgentManagementClient.get_available_metric_ids(). Includes configured business KPIs. Supported metrics may have no stored data yet.

Return type:

list of dict

get_metric_time_series(metrics, from_time=None, to_time=None, latest_only=False)

Returns stored time-series values for this agent.

metrics uses the qualified identifiers and compact tabular response documented by dataikuapi.AgentManagementClient.get_metric_time_series(). The agent is selected through the global endpoint. Set latest_only=True and omit both timestamps to get the latest available values.

Parameters:
  • metrics (list) – qualified metric identifiers

  • from_time (int or datetime) – inclusive lower bound, as epoch milliseconds or a timezone-aware datetime; required unless latest_only=True

  • to_time (int or datetime) – optional exclusive upper bound, as epoch milliseconds or a timezone-aware datetime

  • latest_only (boolean) – return at most the latest row of each logical series

Return type:

list of dict

get_metric_buckets(metrics, bucket, from_time=None, to_time=None)

Returns bucketed metrics for this agent.

metrics uses the qualified identifiers, bucket compatibility rules and compact tabular response documented by dataikuapi.AgentManagementClient.get_metric_buckets(). The agent is selected through the global endpoint. Use series() for the unified table, raw_data() for the grouped response, single_series(metric_id) for bucket tuples, and values_at_time(time) for values in the bucket containing an epoch millisecond timestamp or aware datetime.

Parameters:
  • metrics (list) – qualified metric identifiers

  • bucket (str) – HOUR, DAY, WEEK or MONTH

  • from_time (int or datetime) – required inclusive lower bound, as epoch milliseconds or a timezone-aware datetime

  • to_time (int or datetime) – optional exclusive upper bound, as epoch milliseconds or a timezone-aware datetime

Return type:

dataikuapi.agentmanagement.metrics.AgentBucketedMetricsFetchResults

get_uptime_results(from_time=None, to_time=None)

Returns the agent uptime test results.

Both bounds use ISO-8601 strings with a UTC offset, for example 2026-10-30T00:00:00Z.

Parameters:
  • from_time (str) – optional inclusive lower time bound

  • to_time (str) – optional exclusive upper time bound

Return type:

list of dict

start_fetch_logs()

Starts fetching execution logs for the agent.

Usage example:

agent = client.get_agent("my-platform", "my-agent")
operation = agent.start_fetch_logs()
log_fetch_result = operation.wait_for_result()

This method returns before the operation completes. Call wait_for_result() on the returned operation to wait.

Returns:

the Agent Management operation tracking the log fetch

Return type:

dataikuapi.agentmanagement.operations.Operation

start_fetch_platform_operational_metrics()

Starts fetching platform operational metrics for the agent.

Usage example:

agent = client.get_agent("my-platform", "my-agent")
operation = agent.start_fetch_platform_operational_metrics()
metrics_fetch_result = operation.wait_for_result()

This method returns before the operation completes. Call wait_for_result() on the returned operation to wait.

Returns:

the Agent Management operation tracking the platform operational metrics fetch

Return type:

dataikuapi.agentmanagement.operations.Operation

create_external_agent(project_key, name)

Creates a DSS external agent backed by this monitored agent.

Parameters:
  • project_key (str) – project in which to create the external agent

  • name (str) – name of the external agent

Returns:

a reference to the created DSS object

Return type:

dict

list_operations(as_type='listitems', current_only=False, operation_types=None, statuses=None, triggers=None, from_timestamp=None, to_timestamp=None, limit=None)

Lists operations launched for this agent.

Parameters:
  • as_type (str) – “listitems”/”listitem” returns OperationListItem entries; “objects”/”object” returns Operation handles

  • current_only (boolean) – whether to return only queued or running operations

  • operation_types (list) – operation types

  • statuses (list) – operation statuses

  • triggers (list) – operation triggers

  • from_timestamp (int) – optional inclusive lower timestamp bound, in milliseconds since the Unix epoch

  • to_timestamp (int) – optional exclusive upper timestamp bound, in milliseconds since the Unix epoch

  • limit (int) – maximum number of returned operations, defaults to 1000, up to 10000

Returns:

operations and a has_more flag indicating whether additional operations matched

Return type:

dataikuapi.agentmanagement.operations.OperationSearchResult

get_operation(operation_id)

Returns a handle to an operation for this agent.

Parameters:

operation_id (str) – identifier of the operation

Return type:

dataikuapi.agentmanagement.operations.Operation

get_risk_assessment()

Returns the risk assessment of this agent.

Return type:

dataikuapi.agentmanagement.risk.RiskAssessment

set_risk_assessment_signed_off(signed_off)

Sets whether the current risk assessment is validated.

Parameters:

signed_off (boolean) – True to validate the assessment, False to remove its validation

Returns:

the updated risk assessment

Return type:

dataikuapi.agentmanagement.risk.RiskAssessment

class dataikuapi.agentmanagement.agent.AgentFilter

Agent filter accepted by search, metric retrieval and bulk action methods.

Values within each list criterion, including scopes, are combined with OR. Different criteria are combined with AND.

NO_TAGS = '__NO_TAGS__'
DISCOVERY_FOUND = 'FOUND'
DISCOVERY_NOT_FOUND = 'NOT_FOUND'
DISCOVERY_MANUALLY_ADDED = 'MANUALLY_ADDED'
RISK_SIGNED_OFF = 'SIGNED_OFF'
RISK_NOT_SIGNED_OFF = 'NOT_SIGNED_OFF'
STATE_DISCOVERED = 'DISCOVERED'
STATE_MANAGED = 'MANAGED'
STATE_IGNORED = 'IGNORED'
STATE_ARCHIVED = 'ARCHIVED'
with_text_filter(text_filter)
with_agent_ids(*agent_ids)
with_scope_ids(*scope_ids)
with_platform_types(*platform_types)
with_platform_ids(*platform_ids)
with_discovery_statuses(*discovery_statuses)
with_risk_sign_offs(*risk_sign_offs)
with_tags(*tags)
with_states(*states)
with_favorites(favorites=True)

Filters on the authenticated user’s favorite agents.

Use a personal API key to access the same favorites as in DSS. A non-personal API key does not use the favorites of its creator or impersonated user.

Parameters:

favorites (bool) – True for favorites, False for non-favorites, None to remove this criterion

Return type:

AgentFilter

class dataikuapi.agentmanagement.agent.AgentListItem(client, data)

An agent listing entry returned by the client’s or platform’s list_agents method.

property id

The listing entry’s id.

property platform_id

The listing entry’s platform id.

property name

The listing entry’s name.

property display_name

The listing entry’s display name.

property tags

The listing entry’s tags.

property type

The agent type.

property state

The agent state.

property description

The agent description.

to_agent()

Return a Agent handle without making an API call.

class dataikuapi.agentmanagement.agent.AgentSettings(client, platform_id, agent_id, settings)

The settings of a monitored agent.

Do not create this directly, use dataikuapi.agentmanagement.agent.Agent.get_settings().

get_raw()

Returns the raw settings of this agent.

Only an agent administrator can change configuration["agentOwner"]. Use {"user": "login"}, {"group": "name"}, or None to remove the owner, then call save(). Ownership grants implicit administration rights without changing explicit permissions.

settings = agent.get_settings()
settings.get_raw()["configuration"]["agentOwner"] = {"group": "agent-operators"}
settings.save()
Return type:

dict

save()

Saves the settings of this agent, checking fetchedRevision read by get_settings.

Remove fetchedRevision from get_raw() or set it to None to save without a revision check.

After transferring ownership, the caller retains only their remaining permissions. If they lose read access, saving succeeds and get_raw() contains only the server’s confirmation message.

Returns:

the saved settings

Return type:

dataikuapi.agentmanagement.agent.AgentSettings

class dataikuapi.agentmanagement.agent.AgentStatus(client, platform_id, agent_id, light, heavy)

The status of a monitored agent.

Do not create this directly, use dataikuapi.agentmanagement.agent.Agent.get_status().

get_light()

Gets the ‘light’ (summary) status of this agent.

Return type:

dict

get_heavy()

Gets the ‘heavy’ (full) status of this agent.

Return type:

dict

property platform_activation_state

Returns UNKNOWN, ENABLED or DISABLED according to the last known state on the remote platform.

Return type:

str

class dataikuapi.agentmanagement.alerting.AgentReviewAlertConfigurationBuilder(client, collection_path, name=None)

Builds an agent review alert configuration for creation on an agent only.

The review must be linked to that agent. Its project and ID are fixed after creation and encoded as agent_review.<project_key>.<agent_review_id> in subjectId. No metric thresholds or time buckets are used. By default, one completed failed run opens a critical alert.

Usage example:

alert_configuration = (agent.new_alert_configuration(type="agent_review", name="Review failures")
                 .with_agent_review("PROJECT", "review-id")
                 .with_consecutive_failed_runs(2)
                 .create())

Obtain this builder through agent.new_alert_configuration(type="agent_review").

with_agent_review(project_key, agent_review_id)

Selects the agent review linked to this agent.

Parameters:
  • project_key (str) – project containing the linked agent review

  • agent_review_id (str) – agent review ID

Return type:

AgentReviewAlertConfigurationBuilder

with_consecutive_failed_runs(count=1)

Requires consecutive completed failed runs before opening an alert.

Each distinct run counts once, including runs completed before configuration creation. Re-evaluating unchanged runs does not advance progress; one healthy run recovers immediately. Missing or unlinked reviews and read errors trigger alerts without waiting for this count.

Parameters:

count (int) – consecutive failed runs required, from 1 to 10 (default: 1)

Return type:

AgentReviewAlertConfigurationBuilder

create()

Creates the alert configuration on this builder’s owner.

Return type:

AlertConfiguration

with_auto_close(mode='IMMEDIATE_UPON_BACK_TO_NORMAL', healthy_buckets=None, recovery_threshold=None)

Configures automatic closure independently of the trigger.

Parameters:
  • mode (str) – IMMEDIATE_UPON_BACK_TO_NORMAL, SUSTAINED_BACK_TO_NORMAL, BACK_TO_NORMAL_WITH_HYSTERESIS, or NONE. Agent reviews support immediate or manual closure only.

  • healthy_buckets (int) – consecutive healthy buckets required for sustained closure (default: 3)

  • recovery_threshold (float) – threshold strictly on the healthy side of all fixed trigger thresholds

Return type:

AlertConfigurationBuilder

with_enabled(enabled)

Controls whether this configuration is evaluated.

Parameters:

enabled (boolean) – whether the configuration is enabled (default: True)

Returns:

this builder

Return type:

AlertConfigurationBuilder

with_required_acknowledgement(required=True)

Requires human acknowledgement before automatic closure, in addition to the closure condition.

Parameters:

required (bool) – whether acknowledgement is required (default: False on new configurations)

Return type:

AlertConfigurationBuilder

class dataikuapi.agentmanagement.alerting.Alert(client, alert_id)

An Agent Management triggered alert.

Do not create this directly, use dataikuapi.AgentManagementClient.get_triggered_alert().

property id
get_details()

Returns the triggered alert details, including its opening evidence and actor.

loc identifies the evaluated target and, for configuration-based alerts, the configuration origin and ID and evaluation subject (subjectId: a metric or agent review). observedStatus is HEALTHY, WARNING, CRITICAL, or UNKNOWN; unknownReason explains unavailable evaluations. These describe the current observed outcome for an open occurrence, or the final outcome for a closed occurrence. The occurrence’s severity retains its last breach severity, independently of recovery or unavailable data.

When opening evidence is present, openingEvidence.type identifies its shape: TIME_BUCKETED_METRIC includes observation and windowStartInclusive/windowEndExclusive; AGENT_REVIEW includes agentReviewResult instead. Both include the captured configuration fields, detection result and observation source. AI-generated alerts have no opening evidence.

Return type:

dict

get_history(limit=None)

Returns the most recent triggered alert history events in chronological order.

Each event’s state contains observedStatus, unknownReason, occurrenceSeverity, and occurrenceState immediately after the event. Observation-driven events also include historical evidence. Its type is TIME_BUCKETED_METRIC or AGENT_REVIEW, with the same fields as the opening evidence described in get_details(). Events without an evaluation have no evidence.

Use TriggeredAlertHistoryResult.has_more to determine whether older events were omitted.

Parameters:

limit (int) – optional maximum number of events to return; the server enforces its own upper bound

Return type:

dataikuapi.agentmanagement.alerting.TriggeredAlertHistoryResult

acknowledge()

Acknowledges the triggered alert and returns its current details.

Repeating this call returns the existing acknowledgement without changing it.

Return type:

dict

close()

Manually closes this alert without changing its observed state or acknowledgement.

For metric and agent review alerts, if the problem persists or its observation is unavailable, a current healthy observation is required before the configuration can open another alert for this agent. For AI alerts, this stops evaluation of the current occurrence.

Return type:

dict

class dataikuapi.agentmanagement.alerting.AlertConfiguration(client, collection_path, configuration_id)

An alert configuration owned by global settings, an platform, or an agent.

Obtain this handle through the owner’s get_alert_configuration method.

property id
get_settings()

Returns editable settings, including the metric or agent review, evaluation settings, and recovery policy.

Modify AlertConfigurationSettings.get_raw(), then call AlertConfigurationSettings.save().

Return type:

AlertConfigurationSettings

delete()

Deletes this configuration and reconciles its alerts without affecting other configurations.

class dataikuapi.agentmanagement.alerting.AlertConfigurationBuilder(client, collection_path, name=None)

Shared settings for metric and agent review alert builders.

Obtain a builder through the owner’s new_alert_configuration method. Configurations are enabled and close automatically on recovery by default.

create()

Creates the alert configuration on this builder’s owner.

Return type:

AlertConfiguration

with_required_acknowledgement(required=True)

Requires human acknowledgement before automatic closure, in addition to the closure condition.

Parameters:

required (bool) – whether acknowledgement is required (default: False on new configurations)

Return type:

AlertConfigurationBuilder

with_auto_close(mode='IMMEDIATE_UPON_BACK_TO_NORMAL', healthy_buckets=None, recovery_threshold=None)

Configures automatic closure independently of the trigger.

Parameters:
  • mode (str) – IMMEDIATE_UPON_BACK_TO_NORMAL, SUSTAINED_BACK_TO_NORMAL, BACK_TO_NORMAL_WITH_HYSTERESIS, or NONE. Agent reviews support immediate or manual closure only.

  • healthy_buckets (int) – consecutive healthy buckets required for sustained closure (default: 3)

  • recovery_threshold (float) – threshold strictly on the healthy side of all fixed trigger thresholds

Return type:

AlertConfigurationBuilder

with_enabled(enabled)

Controls whether this configuration is evaluated.

Parameters:

enabled (boolean) – whether the configuration is enabled (default: True)

Returns:

this builder

Return type:

AlertConfigurationBuilder

class dataikuapi.agentmanagement.alerting.AlertConfigurationListItem(client, data, collection_path=None)

An alert configuration listing entry returned by list_alert_configurations or list_applicable_alert_configurations.

Applicable entries retain their nested configuration, loc, and latestEvaluation data.

property configuration

The configuration definition, whether listed directly or as an applicable entry.

property id

The listing entry’s id.

property name

The listing entry’s name.

property enabled

The listing entry’s enabled.

property type

The evaluation type: TIME_BUCKETED_METRIC or AGENT_REVIEW.

property loc

The resolved location for an applicable entry, or None for a direct listing.

property latest_evaluation

The latest evaluation for an applicable entry, or None when unavailable.

to_alert_configuration()

Return a AlertConfiguration handle without making an API call.

Raises:

ValueError – if the origin has no public configuration endpoint (for example, a scope)

class dataikuapi.agentmanagement.alerting.AlertConfigurationSettings(configuration, settings)

Editable settings of an alert configuration.

Obtain these through AlertConfiguration.get_settings().

get_raw()

Returns the mutable configuration settings. Changes are persisted by save().

Return type:

dict

property raw

The mutable configuration settings, also available through get_raw().

save()

Saves the complete configuration settings and refreshes them from the server response.

The ID and metric or agent review reference must remain unchanged. Incomplete evaluation settings may be saved. To change the metric or agent review, create a new configuration. A concurrent edit since these settings were read causes the save to fail.

Returns:

these settings with their saved data

Return type:

AlertConfigurationSettings

class dataikuapi.agentmanagement.alerting.MetricAlertConfigurationBuilder(client, collection_path, name=None)

Builds a metric alert configuration for creation globally, on an platform, or on an agent.

The metric is fixed after creation. Thresholds and the time-bucket granularity may be completed later. Evaluation requires a time bucket and at least one threshold. By default, a single breach opens an alert.

Usage example:

alert_configuration = (agent.new_alert_configuration(type="metric", name="Daily cost")
                 .with_metric("consumption.cost.total")
                 .with_time_bucket()
                 .with_thresholds(warning=10, critical=20)
                 .create())

Obtain this builder through the owner’s new_alert_configuration(type="metric") method.

with_metric(metric_id)

Selects the metric to evaluate.

Parameters:

metric_id (str) – ID of the metric

Return type:

MetricAlertConfigurationBuilder

with_time_bucket(granularity='DAY', include_current_bucket=False)

Selects a time bucket for Operational, Usage, Cost, Uptime, or Business KPI metrics.

Parameters:
  • granularity (str) – HOUR, DAY, WEEK, or MONTH

  • include_current_bucket (bool) – evaluate available data before the current bucket ends (default: False)

Return type:

MetricAlertConfigurationBuilder

with_thresholds(warning=None, critical=None, breach_direction='AT_OR_ABOVE')

Selects fixed-threshold detection. Either threshold may be left unset, but evaluation requires at least one.

Parameters:
  • warning (float) – warning threshold

  • critical (float) – critical threshold

  • breach_direction (str) – AT_OR_ABOVE or AT_OR_BELOW

Return type:

MetricAlertConfigurationBuilder

with_multi_bucket_aggregate_thresholds(warning=None, critical=None, buckets=3, aggregation=None, breach_direction='AT_OR_ABOVE')

Applies fixed thresholds to an aggregate over the last completed buckets, rather than to each bucket separately.

The metric determines the calculation: totals are added, means and ratios use their contributing populations, identities are counted distinctly, and percentiles use source observations across the period. For consumption.cost.total, buckets=3 and critical=20 compare the total estimated cost over three completed buckets with 20 in the configured currency.

aggregation is available only for business KPIs. A mean or percentile without contributing values is unavailable, and failed reads cannot clear an existing alert. Stored platform percentiles support one bucket only. Either threshold may be left unset, but evaluation requires at least one.

Parameters:
  • warning (float) – warning threshold in the metric’s unit; omit to disable warnings

  • critical (float) – critical threshold in the metric’s unit; omit to disable critical alerts

  • buckets (int) – number of completed calendar buckets in the aggregate (default: 3); server limits depend on the granularity

  • aggregation (str) – business KPI calculation, AVG or P95; when omitted, the server uses AVG for business KPIs. Omit for built-in metrics, which determine their own calculation

  • breach_direction (str) – AT_OR_ABOVE or AT_OR_BELOW

Return type:

MetricAlertConfigurationBuilder

with_historical_change(warning=None, critical=None, baseline_buckets=7, recent_buckets=3, aggregation=None, change_direction='EITHER')

Alerts on percentage changes in a metric compared with its earlier history, rather than a fixed value.

The selected metric determines the calculation on both periods. Totals are compared as raw totals, even when the periods have different lengths. For example, 700 in the baseline and 300 in the recent period represent a decrease of about 57.14%, regardless of their respective bucket counts. Percentages describe relative changes, not percentage points.

aggregation is available only for business KPIs. Missing observations remain unavailable rather than zero. Stored platform percentiles require one bucket in each period. A change from a valid zero baseline to a non-zero value in the selected direction qualifies every enabled severity.

Parameters:
  • warning (float) – positive percentage change for a warning (for example, 10 for 10%); omit to disable warnings

  • critical (float) – positive percentage change for a critical alert; omit to disable critical alerts

  • baseline_buckets (int) – number of earlier buckets used as the reference (default: 7)

  • recent_buckets (int) – number of completed buckets immediately after the reference period to compare (default: 3)

  • aggregation (str) – business KPI calculation, AVG or P95; when omitted, the server uses AVG for business KPIs. Omit for built-in metrics, which determine their own calculation

  • change_direction (str) – alert on INCREASE, DECREASE or EITHER direction (default: EITHER)

Return type:

MetricAlertConfigurationBuilder

with_sustained_thresholds(warning=None, critical=None, warning_breaches=3, critical_breaches=3, breach_direction='AT_OR_ABOVE')

Requires threshold breaches in consecutive completed buckets before opening or escalating an alert. Warning and critical counts are independent. Improvement remains immediate; recovery follows the closure mode.

Parameters:
  • warning (float) – warning threshold in the metric’s unit; omit to disable warnings

  • critical (float) – critical threshold in the metric’s unit; omit to disable critical alerts

  • warning_breaches (int) – consecutive warning breaches required (default: 3)

  • critical_breaches (int) – consecutive critical breaches required (default: 3)

  • breach_direction (str) – AT_OR_ABOVE or AT_OR_BELOW

Return type:

MetricAlertConfigurationBuilder

create()

Creates the alert configuration on this builder’s owner.

Return type:

AlertConfiguration

with_auto_close(mode='IMMEDIATE_UPON_BACK_TO_NORMAL', healthy_buckets=None, recovery_threshold=None)

Configures automatic closure independently of the trigger.

Parameters:
  • mode (str) – IMMEDIATE_UPON_BACK_TO_NORMAL, SUSTAINED_BACK_TO_NORMAL, BACK_TO_NORMAL_WITH_HYSTERESIS, or NONE. Agent reviews support immediate or manual closure only.

  • healthy_buckets (int) – consecutive healthy buckets required for sustained closure (default: 3)

  • recovery_threshold (float) – threshold strictly on the healthy side of all fixed trigger thresholds

Return type:

AlertConfigurationBuilder

with_enabled(enabled)

Controls whether this configuration is evaluated.

Parameters:

enabled (boolean) – whether the configuration is enabled (default: True)

Returns:

this builder

Return type:

AlertConfigurationBuilder

with_required_acknowledgement(required=True)

Requires human acknowledgement before automatic closure, in addition to the closure condition.

Parameters:

required (bool) – whether acknowledgement is required (default: False on new configurations)

Return type:

AlertConfigurationBuilder

class dataikuapi.agentmanagement.alerting.TriggeredAlertHistoryResult(response)

A bounded triggered-alert history result.

Use has_more to determine whether older events were omitted. Do not create this directly; use dataikuapi.agentmanagement.alerting.Alert.get_history().

class dataikuapi.agentmanagement.alerting.TriggeredAlertSearchResult(client, response, as_objects)

A bounded triggered-alert search result.

Use has_more to determine whether more alerts matched and narrower filters are needed. Do not create this directly; use dataikuapi.AgentManagementClient.search_triggered_alerts().

class dataikuapi.agentmanagement.cobuild.CobuildConversation(client, conversation_id)

A handle to a Cobuild conversation in Agent Management.

Create a conversation with dataikuapi.agentmanagement_client.AgentManagementClient.new_cobuild_conversation(). All exchanges made through this handle are accumulated in messages.

For example:

conversation = client.new_cobuild_conversation()
response = conversation.send_message("List the agents in my estate")
print(response.message)

Send messages in CobuildConversationMode.PLAN mode to draft or revise a plan, then call approve_plan() to execute it. Call detach_plan() before leaving plan mode with a draft, or entering plan mode while an active plan is attached.

property messages

All user messages and assistant responses exchanged through this handle, in order.

Return type:

list of CobuildUserMessage or CobuildAssistantResponse

send_message(message, allow_edit=False, conversation_mode=CobuildConversationMode.BUILD, intelligence_level=None)

Send a message and wait for the assistant’s response.

Parameters:
  • message (str) – the message to send

  • allow_edit (bool) – allow Cobuild to create and edit Agent Management objects for this turn. Missing tool permissions are returned as an error response.

  • conversation_mode (CobuildConversationMode) – BUILD (the default) for normal or plan-execution messages, or PLAN to draft or revise a plan

  • intelligence_level (str) – optional LIGHT, MEDIUM, HIGH, or VERY_HIGH. None defaults to MEDIUM.

Return type:

CobuildAssistantResponse

approve_plan(allow_edit=False, intelligence_level=None)

Approve the current draft plan and wait for its execution response.

Parameters:
  • allow_edit (bool) – allow Cobuild to create and edit Agent Management objects for this turn. Pass it again on subsequent turns if execution pauses.

  • intelligence_level (str) – optional LIGHT, MEDIUM, HIGH, or VERY_HIGH. None defaults to MEDIUM.

Return type:

CobuildAssistantResponse

detach_plan()

Detach the current draft, active, or completed plan and return to build mode.

answer_confirmation(choice, options=None)

Answer a pending confirmation request and wait for the next response.

Call this when CobuildAssistantResponse.is_confirmation_request is true. Inspect CobuildAssistantResponse.objects_to_delete and CobuildAssistantResponse.deletion_impacts before approving.

Parameters:
  • choice (str) – APPROVE to proceed or CANCEL to abort

  • options (list) – optional per-object deletion options, as in dataikuapi.dss.cobuild.DSSCobuildConversation.answer_confirmation()

Return type:

CobuildAssistantResponse

answer_question(answers=None, rejected=False, used_custom_answer=False)

Answer a pending question request and wait for the next response.

Call this when CobuildAssistantResponse.is_question_request is true.

Parameters:
  • answers (list[str]) – selected or free-text answers. Defaults to [].

  • rejected (bool) – decline answering the question; use an empty answer list

  • used_custom_answer (bool) – whether an answer came from custom free-text input

Return type:

CobuildAssistantResponse

class dataikuapi.agentmanagement.metrics.AgentBucketedMetricsFetchResults(results, platform_name, agent_id)

Bucketed metrics for a single agent, with grouped and unified accessors.

raw_data()

Return the original grouped dictionaries, or an empty list if no agent data was returned.

series()

Return a unified {columns, rows} table with requested columns and missing values as None.

single_series(metric_id)

Return (start, end, value) tuples, including None; unrequested metrics raise KeyError.

values_at_time(time)

Return values for start <= time < end, or {} if no bucket contains the instant.

Accepts integer epoch milliseconds or a timezone-aware datetime, just like BucketedMetricsFetchResults.agent_values_at_time().

class dataikuapi.agentmanagement.metrics.BucketedMetricsFetchResults(raw_data, metrics)

Bucketed metrics for multiple agents, retaining the original grouped series.

Unified tables contain all requested metric columns in request order, with None for missing values. Rows are joined on exact (start, end) boundaries and sorted chronologically. Agents returned with empty series are retained; agents absent from the response are unknown.

agents()

Return represented agents as (platform_name, agent_id) tuples in response order.

raw_agent_data(platform_name, agent_id)

Return the original grouped dictionaries, including metadata and UTC-aware datetimes.

Raises:

KeyError – if the agent is absent from the response

agent_series(platform_name, agent_id)

Return a unified {columns, rows} table for the agent.

Columns are start, end and every requested metric. Only bucket boundaries present in the response produce rows. An agent with empty data has an empty rows list. :raises KeyError: if the agent is absent from the response

agent_single_series(platform_name, agent_id, metric_id)

Return chronological (start, end, value) tuples, including missing values.

Raises:

KeyError – if the agent is unknown or the metric was not requested

agent_values_at_time(platform_name, agent_id, time)

Return all requested metric values in the bucket containing time, or {}.

Buckets include their start and exclude their end. time must be integer epoch milliseconds or a timezone-aware datetime. Missing metric values are None. :raises KeyError: if the agent is absent from the response :raises ValueError: if a datetime is timezone-naive :raises TypeError: if time has an unsupported type

class dataikuapi.agentmanagement.operations.Operation(client, platform_id, operation_id, agent_id=None)

An Agent Management asynchronous operation.

Do not create this directly. Start an asynchronous Agent Management action or use dataikuapi.agentmanagement.platform.Platform.get_operation() or dataikuapi.agentmanagement.agent.Agent.get_operation().

property id
get_status()

Returns status information about this operation.

Return type:

dataikuapi.agentmanagement.operations.OperationStatus

get_result()

Returns the completed operation result, or None for operations without a result.

Return type:

dict or None

wait_for_completion(no_fail=False)

Waits for this operation to reach a terminal state.

Parameters:

no_fail (boolean) – if False, raises an exception when the operation fails or is aborted

Returns:

the terminal operation status

Return type:

dataikuapi.agentmanagement.operations.OperationStatus

wait_for_result()

Waits for this operation to complete successfully and returns its result.

Returns:

the completed operation result, or None for operations without a result

Return type:

dict or None

abort()

Requests cancellation of the operation.

class dataikuapi.agentmanagement.operations.OperationListItem(client, data)

A Operation listing entry with local accessors and conversion to a resource handle.

property id

The listing entry’s id.

property platform_id

The listing entry’s platform id.

property agent_id

The listing entry’s agent id.

property status

The listing entry’s status.

property type

The listing entry’s type.

to_operation()

Return a Operation handle without making an API call.

class dataikuapi.agentmanagement.operations.OperationSearchResult(client, response, as_type='listitems')

A bounded operation search result.

Use has_more to determine whether more operations matched and narrower filters are needed. Do not create this directly; use dataikuapi.AgentManagementClient.list_operations(), dataikuapi.agentmanagement.platform.Platform.list_operations() or dataikuapi.agentmanagement.agent.Agent.list_operations().

class dataikuapi.agentmanagement.operations.OperationStatus(client, platform_id, operation_id, status)

The status of an Agent Management asynchronous operation.

Do not create this directly, use dataikuapi.agentmanagement.operations.Operation.get_status().

get_raw()

Returns the raw status of this operation.

Return type:

dict

class dataikuapi.agentmanagement.platform.Platform(client, platform_id)

An Agent Management platform.

Do not create this directly, use dataikuapi.AgentManagementClient.get_platform().

property id
get_status()

Returns status information about this platform.

Return type:

dataikuapi.agentmanagement.platform.PlatformStatus

get_settings()

Returns the settings of this platform.

Return type:

dataikuapi.agentmanagement.platform.PlatformSettings

list_alert_configurations(as_type='listitems')

Lists alert configurations owned on this platform, not configurations from other levels.

Parameters:

as_type (str) – “listitems”/”listitem” returns list items; “objects”/”object” returns handles of dataikuapi.agentmanagement.alerting.AlertConfiguration

Returns:

a list - see as_type for more information

Return type:

list

new_alert_configuration(type='metric', name=None)

Initializes a new alert configuration builder owned by this platform.

Configure the returned builder, then call its create() method to submit it.

Parameters:
  • type (str) – metric; agent review configurations can only be created on an agent

  • name (str) – optional display name

Return type:

MetricAlertConfigurationBuilder

get_alert_configuration(configuration_id)

Returns a handle to an alert configuration owned on this platform.

Parameters:

configuration_id (str) – configuration ID

Return type:

dataikuapi.agentmanagement.alerting.AlertConfiguration

delete(allow_deletion_if_platform_contains_agents=False)

Deletes the platform and all its Agent Management agent records.

Parameters:

allow_deletion_if_platform_contains_agents (boolean) – allow deletion even if the platform contains discovered or managed agents (default: False). Otherwise, these agents prevent deletion. Ignored and archived agents do not prevent deletion and are deleted with the platform.

list_agents(as_type='listitems', agent_filter=None)

Lists agents on this platform.

Parameters:
Returns:

a list - see as_type for more information

Return type:

list

start_disable_agents(agent_filter, allow_destructive=False)

Starts disabling the agents matching a filter on their remote platform.

Only agents on this platform are selected, regardless of any platform IDs in the filter. The server validates the complete selection before starting the operation.

Parameters:
  • agent_filter (AgentFilter) – agents to disable

  • allow_destructive (bool) – accept irreversible disable operations, including permanent deletion of remote resources (default: False). Without this consent, the server rejects the entire selection if any affected agent requires a destructive operation.

This method returns before the operation completes. Call wait_for_result() on the returned operation to wait.

Returns:

the Agent Management operation tracking the activation change

Return type:

dataikuapi.agentmanagement.operations.Operation

start_enable_agents(agent_filter)

Starts enabling the agents matching a filter on their remote platform.

Only agents on this platform are selected, regardless of any platform IDs in the filter. The server validates the complete selection before starting the operation.

Parameters:

agent_filter (AgentFilter) – agents to enable

This method returns before the operation completes. Call wait_for_result() on the returned operation to wait.

Returns:

the Agent Management operation tracking the activation change

Return type:

dataikuapi.agentmanagement.operations.Operation

setup_monitoring(agents, run_first_fetch=True, include_in_uptime_tests=True, **kwargs)

Enables monitoring for one or several agents on this platform in one pass.

Provisions monitoring resources and enables supported monitoring capabilities. Administration rights are required on each agent.

Parameters:
  • agents (iterable) – agent IDs (strings), dataikuapi.agentmanagement.agent.AgentListItem entries, or dataikuapi.agentmanagement.agent.Agent handles

  • run_first_fetch (boolean) – whether to launch the initial data fetch (default: True)

  • include_in_uptime_tests (boolean) – whether to include agents in supported uptime tests (default: True)

  • project_key (str) – optional project in which to provision monitoring resources

  • connection_name (str) – optional connection for managed monitoring datasets

  • partitioning (str) – optional time partitioning, NONE or DAY

Returns:

setup results containing configuredAgentIds and warnings; check warnings for agents that could not be configured

Return type:

dict

get_available_metric_ids(agent_filter=None)

Lists the union of metric identifiers supported by readable agents in this platform.

Returns the dictionaries documented by dataikuapi.AgentManagementClient.get_available_metric_ids(). The platform scope is added to a copy of the optional filter.

Parameters:

agent_filter (AgentFilter) – optional additional agent filter

Return type:

list of dict

get_metric_time_series(metrics, agent_filter=None, from_time=None, to_time=None, latest_only=False)

Returns stored time-series values for agents on this platform.

metrics uses the qualified identifiers and the response uses the compact tabular format documented by dataikuapi.AgentManagementClient.get_metric_time_series(). The platform scope is added to the optional agent_filter and the same global REST endpoint is used. Set latest_only=True and omit both timestamps to get the latest available values.

Parameters:
  • metrics (list) – qualified metric identifiers

  • agent_filter (AgentFilter) – optional additional agent selection

  • from_time (int or datetime) – inclusive lower bound, as epoch milliseconds or a timezone-aware datetime; required unless latest_only=True

  • to_time (int or datetime) – optional exclusive upper bound, as epoch milliseconds or a timezone-aware datetime

  • latest_only (boolean) – return at most the latest row of each logical series

Return type:

list of dict

get_metric_buckets(metrics, bucket, agent_filter=None, from_time=None, to_time=None)

Returns bucketed metrics for agents on this platform.

metrics uses the qualified identifiers, bucket compatibility rules and compact tabular response documented by dataikuapi.AgentManagementClient.get_metric_buckets(). The platform scope is added to the optional agent_filter and the same global REST endpoint is used.

Parameters:
  • metrics (list) – qualified metric identifiers

  • bucket (str) – HOUR, DAY, WEEK or MONTH

  • agent_filter (AgentFilter) – optional additional agent selection

  • from_time (int or datetime) – required inclusive lower bound, as epoch milliseconds or a timezone-aware datetime

  • to_time (int or datetime) – optional exclusive upper bound, as epoch milliseconds or a timezone-aware datetime

Return type:

dataikuapi.agentmanagement.metrics.BucketedMetricsFetchResults

create_agent(agent_id, display_name=None, description=None, tags=None, configuration=None, permissions=None, agent_owner=None)

Creates an agent manually and returns a handle to it. It is not usually necessary to create agents manually, as they are almost always discovered automatically by the platform scan.

Parameters:
  • agent_id (str) – unique identifier of the agent

  • display_name (str) – display name of the agent

  • description (str) – agent description

  • tags (list) – tags assigned to the agent

  • configuration (dict) – provider-specific configuration

  • permissions (list) – agent permissions

  • agent_owner (dict) – owner, as {"user": "login"} or {"group": "name"}. Omit to use the platform default

Return type:

dataikuapi.agentmanagement.agent.Agent

get_agent(agent_id)

Returns a handle to an agent on this platform.

Parameters:

agent_id (str) – identifier of the agent

Return type:

dataikuapi.agentmanagement.agent.Agent

start_scan()

Starts an platform scan.

Usage example:

platform = client.get_platform("my-platform")
operation = platform.start_scan()
scan_result = operation.wait_for_result()

This method returns before the operation completes. Call wait_for_result() on the returned operation to wait.

Returns:

the Agent Management operation tracking the scan

Return type:

dataikuapi.agentmanagement.operations.Operation

start_run_uptime_tests(agent_ids=None)

Starts uptime tests for this platform.

Usage example:

platform = client.get_platform("my-platform")
operation = platform.start_run_uptime_tests(["my-agent"])
uptime_test_results = operation.wait_for_result()
Parameters:

agent_ids (list) – agents to test, or None to test all eligible agents

This method returns before the operation completes. Call wait_for_result() on the returned operation to wait.

Returns:

the Agent Management operation tracking the uptime tests

Return type:

dataikuapi.agentmanagement.operations.Operation

list_operations(as_type='listitems', current_only=False, operation_types=None, statuses=None, triggers=None, from_timestamp=None, to_timestamp=None, limit=None)

Lists operations launched for this platform.

Parameters:
  • as_type (str) – “listitems”/”listitem” returns OperationListItem entries; “objects”/”object” returns Operation handles

  • current_only (boolean) – whether to return only queued or running operations

  • operation_types (list) – operation types

  • statuses (list) – operation statuses

  • triggers (list) – operation triggers

  • from_timestamp (int) – optional inclusive lower timestamp bound, in milliseconds since the Unix epoch

  • to_timestamp (int) – optional exclusive upper timestamp bound, in milliseconds since the Unix epoch

  • limit (int) – maximum number of returned operations, defaults to 1000, up to 10000

Returns:

operations and a has_more flag indicating whether additional operations matched

Return type:

dataikuapi.agentmanagement.operations.OperationSearchResult

get_operation(operation_id)

Returns a handle to an platform operation.

Parameters:

operation_id (str) – identifier of the operation

Return type:

dataikuapi.agentmanagement.operations.Operation

class dataikuapi.agentmanagement.platform.PlatformListItem(client, data)

A Platform listing entry with local accessors and conversion to a resource handle.

property id

The listing entry’s id.

property name

The listing entry’s name.

property display_name

The listing entry’s display name.

property type

The listing entry’s type.

to_platform()

Return a Platform handle without making an API call.

class dataikuapi.agentmanagement.platform.PlatformSettings(client, platform_id, settings)

The settings of an Agent Management platform.

Do not create this directly, use dataikuapi.agentmanagement.platform.Platform.get_settings().

property raw

The raw settings of this platform.

An platform administrator can change raw["defaultAgentOwner"] to {"user": "login"}, {"group": "name"}, or None, then call save(). Changing this default does not reassign existing agents.

Return type:

dict

save()

Saves the settings of this platform, using fetchedRevision to detect concurrent changes.

Remove fetchedRevision from raw or set it to None to save without a revision check.

Returns:

the saved settings

Return type:

dataikuapi.agentmanagement.platform.PlatformSettings

class dataikuapi.agentmanagement.platform.PlatformStatus(client, platform_id, status)

The status of an Agent Management platform.

Do not create this directly, use dataikuapi.agentmanagement.platform.Platform.get_status().

get_raw()

Returns the raw status of this platform.

Return type:

dict

class dataikuapi.agentmanagement.risk.EstateRiskExposure(exposure)

The aggregated Agent Management risk exposure.

Do not create this directly, use dataikuapi.AgentManagementClient.get_risk_exposure().

property raw

Returns the raw risk exposure.

Return type:

dict

class dataikuapi.agentmanagement.risk.RiskAssessment(client, platform_id, agent_id, settings)

The risk assessment of a monitored agent, including its evidence documents.

Do not create this directly, use dataikuapi.agentmanagement.agent.Agent.get_risk_assessment().

property raw

Returns the raw risk assessment response, including fetchedRevision and the assessment.

Return type:

dict

get_raw()

Returns the raw risk assessment response.

Return type:

dict

save(documents=None)

Saves the risk assessment and optionally uploads document evidence.

Uses fetchedRevision from raw to detect concurrent changes. Remove it or set it to None to save without a revision check.

Parameters:

documents (dict) – optional mapping of evidence identifiers to file-like objects or (filename, file_object) tuples

Returns:

this assessment with its saved data

Return type:

dataikuapi.agentmanagement.risk.RiskAssessment

get_risk_evidence_content(evidence_id)

Downloads the content of a document attached as evidence in this assessment.

Parameters:

evidence_id (str) – identifier of a document evidence entry in the assessment

Return type:

requests.Response

class dataikuapi.agentmanagement.risk.RiskTaxonomySettings(client, settings)

The Agent Management risk taxonomy settings.

Do not create this directly, use dataikuapi.AgentManagementClient.get_risk_taxonomy() or dataikuapi.AgentManagementClient.get_default_risk_taxonomy().

property raw

Returns the raw risk taxonomy settings, including fetchedRevision and the taxonomy.

Return type:

dict

get_raw()

Returns the raw risk taxonomy settings.

Return type:

dict

compute_replacement_impact()

Computes the impact of replacing the current risk taxonomy.

Return type:

dict

save(impact)

Saves the Agent Management risk taxonomy.

Uses fetchedRevision from raw to detect concurrent changes. Remove it or set it to None to skip the revision check. The replacement impact fingerprint is still checked.

Parameters:

impact (dict) – impact returned by compute_replacement_impact()

Returns:

the saved settings

Return type:

dataikuapi.agentmanagement.risk.RiskTaxonomySettings

class dataikuapi.agentmanagement.settings.Settings(client, settings)

The global Agent Management settings.

Do not create this directly, use dataikuapi.AgentManagementClient.get_settings().

get_raw()

Returns the raw Agent Management settings, including global business KPI definitions in businessKPIs.

Return type:

dict

save(confirm_metric_reset=False)

Saves the global Agent Management settings.

Uses fetchedRevision from get_raw() to detect concurrent changes. Remove it or set it to None to save without a revision check.

Parameters:

confirm_metric_reset (boolean) – whether to confirm deletion of metrics made incompatible by the settings change (defaults to False)

Returns:

the saved settings

Return type:

dataikuapi.agentmanagement.settings.Settings

class dataikuapi.agentmanagement_client.AgentManagementClient(host, api_key=None, internal_ticket=None, extra_headers=None, no_check_certificate=False, client_certificate=None, jwt_bearer_token=None, **kwargs)

Entry point for the Dataiku Agent Management API client.

Instance administration methods delegate to dataikuapi.DSSClient on the same Agent Management instance and return the existing DSS handles. Use get_dssclient() for projects, datasets, recipes, plugins and code environments.

Usage example:

import dataikuapi

client = dataikuapi.AgentManagementClient("https://agent-management.example", api_key="your-api-key")
agent = client.get_agent("my-platform", "my-agent")
status = agent.get_status()

Initialize a new Agent Management API client.

Args:

host (str): The host URL of the Agent Management instance (e.g., “http://localhost:11200”) api_key (str, optional): API key for authentication no_check_certificate (bool, optional): If True, disables SSL certificate verification. Defaults to False. extra_headers (dict, optional): Additional HTTP headers to include in requests. client_certificate (str or tuple, optional): Path to client certificate file or tuple of (cert, key) paths. jwt_bearer_token (str, optional): JWT bearer token for authentication.

list_futures(as_objects=False, all_users=False)

List the currently-running generic long tasks (a.k.a futures).

This does not list all Agent Management operations. Use list_operations() for platform and agent operations.

Parameters:
  • as_objects (boolean) – if True, each returned item will be a dataikuapi.dss.future.DSSFuture

  • all_users (boolean) – if True, returns futures for all users (requires admin privileges). Else, only returns futures for the user associated with the current authentication context (if any)

Returns:

list of futures. if as_objects is True, each future in the list is a dataikuapi.dss.future.DSSFuture. Else, each future in the list is a dict. Each dict contains at least a ‘jobId’ field

Return type:

list of dataikuapi.dss.future.DSSFuture or list of dict

get_future(job_id)

Get a handle to interact with a specific long task (a.k.a future). This notably allows aborting this future.

Parameters:

job_id (str) – the identifier of the desired future (which can be returned by list_futures())

Returns:

A handle to interact the future

Return type:

dataikuapi.dss.future.DSSFuture

list_users_info()

Gets basic information about users on the Agent Management instance.

You do not need to be admin to call this

Returns:

A list of users, as a list of dataikuapi.dss.admin.DSSUserInfo

list_groups_info()

Gets basic information about groups on the Agent Management instance.

You do not need to be admin to call this

Returns:

A list of groups, as a list of dataikuapi.dss.admin.DSSGroupInfo

list_users(as_objects=False, include_settings=False)

List all users setup on the Agent Management instance

Note: this call requires an API key with admin rights

Parameters:
  • as_objects (bool) – Return a list of dataikuapi.dss.admin.DSSUser instead of dictionaries. Defaults to False.

  • include_settings (bool) – Include detailed user settings in the response. Only useful if as_objects is False. Defaults to False.

Returns:

A list of users, as a list of dataikuapi.dss.admin.DSSUser if as_objects is True, else as a list of dicts

Return type:

list of dataikuapi.dss.admin.DSSUser or list of dicts

get_user(login)

Get a handle to interact with a specific user

The handle’s get_client_as() method returns a dataikuapi.DSSClient authenticated as this user on the same AM instance.

Parameters:

login (str) – the login of the desired user

Returns:

A dataikuapi.dss.admin.DSSUser user handle

create_user(login, password, display_name='', source_type='LOCAL', groups=None, profile='REGULAR_USER', email=None)

Create a user, and return a handle to interact with it

Note: this call requires an API key with admin rights

Note: this call is not available to Dataiku Cloud users

Parameters:
  • login (str) – the login of the new user. Must be nonblank.

  • password (str) – the password used for ‘LOCAL’ authentication, subject to the instance’s password policy. Ignored for other sources (pass None).

  • display_name (str) – the displayed name for the new user. Must be nonblank, despite the default value of ‘’.

  • source_type (str) – the user provisioning source type. Examples include ‘LOCAL’, ‘LOCAL_NO_AUTH’, ‘LDAP’, ‘PAM’, ‘AZURE_AD’ and ‘CUSTOM’. Defaults to ‘LOCAL’.

  • groups (list) – the names of the groups the new user belongs to (defaults to [])

  • profile (str) – The Agent Management profile of the new user: REGULAR_USER (default) or POWER_USER.

  • email (str) – The email for the new user.

Returns:

A dataikuapi.dss.admin.DSSUser user handle

create_users(users)

Create multiple users, and return a list of creation status

Note: this call requires an API key with admin rights

Note: this call is not available to Dataiku Cloud users

Parameters:

users (list) –

a list of dictionaries where each dictionary contains the parameters for user creation. It accepts the following keys:

  • ’login’ (str): the login of the new user. Required and must be nonblank.

  • ’password’ (str): used only for ‘LOCAL’ authentication; subject to the instance’s password policy when provided. Ignored for other sources.

  • ’displayName’ (str): the displayed name for the new user. Required and must be nonblank.

  • ’sourceType’ (str): the user provisioning source type. Examples include ‘LOCAL’, ‘LOCAL_NO_AUTH’, ‘LDAP’, ‘PAM’, ‘AZURE_AD’ and ‘CUSTOM’. Defaults to ‘LOCAL’.

  • ’groups’ (list): the names of the groups the new user belongs to. Defaults to []

  • ’userProfile’ (str): The Agent Management profile: REGULAR_USER (default) or POWER_USER.

  • ’email’ (str): The email for the new user. Defaults to None

Return type:

list[dict]

Returns:

A list of dictionaries, where each dictionary represents the creation status of a user. It should contain the following keys:

  • ’login’ (str): the login of the created user

  • ’status’ (str): the creation status of the user. Can be ‘SUCCESS’ or ‘FAILURE’

  • ’error’ (str): the error that occurred during that user’s creation. Empty if status is not ‘FAILURE’.

edit_users(user_changes)

Edits multiple users in a single bulk operation. This method is very permissive and is intended for mass operations. If you are modifying a small number of users, it is advised to get a handle from the get_user method and interact directly with a DSSUser object.

A valid workflow is to get the full users dictionaries from list_users(include_settings=True), modify them and use this method to apply the modifications.

Note: This call requires an API key with admin rights.

Note: this call is not available to Dataiku Cloud users

Parameters:

user_changes (list[dict]) –

A list of dictionaries, where each dictionary defines the changes for a single user. Each dictionary must contain the ‘login’ key to identify the user. Other keys can be included to modify the user’s properties, matching the structure of a user settings object (see the output of list_users(include_settings=True)). Available keys include:

  • ’login’ (str): The login of the user to modify (mandatory). Cannot be modified.

  • ’displayName’ (str): The user’s display name.

  • ’email’ (str): The user’s email address.

  • ’groups’ (list[str]): The list of groups for the user.

  • ’userProfile’ (str): The user’s Agent Management profile (REGULAR_USER or POWER_USER).

  • ’enabled’ (bool): Whether the user is enabled.

  • ’sourceType’: User provisioning source type. Examples include ‘LOCAL’, ‘LOCAL_NO_AUTH’, ‘LDAP’, ‘PAM’, ‘AZURE_AD’ and ‘CUSTOM’.

  • ’adminProperties’ (dict): Custom admin properties for the user.

  • ’userProperties’ (dict): Custom user properties for the user.

  • ’secrets’ (list): A list of user-specific secrets.

  • ’preferences’ (dict): A dictionary of user preferences:

    • ’uiLanguage’ (str): UI language code (e.g., ‘en’, ‘ja’, ‘fr’).

    • ’mentionEmails’ (bool): Email notifications for mentions.

    • ’discussionEmails’ (bool): Email notifications for discussions.

    • ’accessRequestEmails’ (bool): Email notifications for access requests.

    • ’grantedAccessEmails’ (bool): Email notifications when access is granted.

    • ’grantedPluginRequestEmails’ (bool): Email notifications when a plugin request is granted.

    • ’pluginRequestEmails’ (bool): Email notifications for plugin requests.

    • ’instanceAccessRequestsEmails’ (bool): Email notifications for instance access requests.

    • ’profileUpgradeRequestsEmails’ (bool): Email notifications for profile upgrade requests.

    • ’codeEnvCreationRequestEmails’ (bool): Email notifications for code env creation requests.

    • ’grantedCodeEnvCreationRequestEmails’ (bool): Email notifications when a code env request is granted.

    • ’dailyDigestsEmails’ (bool): Daily digest emails.

    • ’offlineActivityEmails’ (bool): Offline activity summary emails.

    • ’rememberPositionFlow’ (bool): Remember position in the Flow.

    • ’loginLogoutNotifications’ (bool): Notifications for login/logout.

    • ’watchedObjectsEditionsNotifications’ (bool): Notifications for edits on watched objects.

    • ’objectOnCurrentProjectCreatedDeletedNotifications’ (bool): Notifications for object creation/deletion in the current project.

    • ’anyObjectOnCurrentProjectEditedNotifications’ (bool): Notifications for any object edit in the current project.

    • ’watchStarOnCurrentProjectNotifications’ (bool): Notifications for watch/star actions in the current project.

    • ’otherUsersJobsTasksNotifications’ (bool): Notifications for jobs/tasks from other users.

    • ’requestAccessNotifications’ (bool): Notifications for access requests.

    • ’scenarioRunNotifications’ (bool): Notifications for scenario runs.

Return type:

list[dict]

Returns:

A list of dictionaries, one for each attempted modification, indicating the status. Each dictionary contains the following keys:

  • ’login’ (str): The login of the user that was modified.

  • ’status’ (str): The result of the operation, either ‘SUCCESS’ or ‘FAILURE’.

  • ’error’ (str): The error message if the status is ‘FAILURE’, otherwise empty.

delete_users(user_logins, allow_self_deletion=False)

Bulk deletes multiple users.

Note: This call requires an API key with admin rights.

Note: this call is not available to Dataiku Cloud users

Parameters:
  • user_logins (list[str]) – A list of logins for the users to be deleted.

  • allow_self_deletion (bool) – Allow the use of this function to delete your own user. Warning: this is very dangerous and used recklessly could lead to the deletion of all users/admins.

Return type:

list[dict]

Returns:

A list of dictionaries, one for each attempted deletion, indicating the status. Each dictionary contains the following keys:

  • ’login’ (str): The login of the user that was deleted.

  • ’status’ (str): The result of the deletion, either ‘SUCCESS’ or ‘FAILURE’.

  • ’error’ (str): The error message if the status is ‘FAILURE’, otherwise empty.

get_own_user()

Get a handle to interact with the current user

Returns:

A dataikuapi.dss.admin.DSSOwnUser user handle

list_users_activity(enabled_users_only=False)

List all users activity

Note: this call requires an API key with admin rights

Returns:

A list of user activity logs, as a list of dataikuapi.dss.admin.DSSUserActivity

Return type:

list of dataikuapi.dss.admin.DSSUserActivity

start_resync_users_from_supplier(logins)

Starts a resync of multiple users from an external supplier (LDAP, Azure AD or custom auth)

Parameters:

logins (list) – list of logins to resync

Returns:

a dataikuapi.dss.future.DSSFuture representing the sync process

Return type:

dataikuapi.dss.future.DSSFuture

start_resync_all_users_from_supplier()

Starts a resync of all users from an external supplier (LDAP, Azure AD or custom auth)

Returns:

a dataikuapi.dss.future.DSSFuture representing the sync process

Return type:

dataikuapi.dss.future.DSSFuture

start_fetch_external_groups(user_source_type)

Fetch groups from external source

Parameters:

user_source_type – ‘LDAP’, ‘AZURE_AD’ or ‘CUSTOM’

Return type:

dataikuapi.dss.future.DSSFuture

Returns:

a DSSFuture containing a list of group names

start_fetch_external_users(user_source_type, login=None, email=None, group_name=None)
Fetch users from external source filtered by login or group name:
  • if login or email is provided, will search for a user with an exact match in the external source (e.g. before login remapping)

  • else,
    • if group_name is provided, will search for members of the group in the external source

    • else will search for all users

Parameters:
  • user_source_type – ‘LDAP’, ‘AZURE_AD’ or ‘CUSTOM’

  • login – optional - the login of the user in the external source

  • email – optional - the email of the user in the external source

  • group_name – optional - the group name of the group in the external source

Return type:

dataikuapi.dss.future.DSSFuture

Returns:

a DSSFuture containing a list of ExternalUser

start_provision_users(user_source_type, users)

Provision users of given source type

Parameters:
  • user_source_type (string) – ‘LDAP’, ‘AZURE_AD’ or ‘CUSTOM’

  • users (list) – list of user attributes coming form the external source

Return type:

dataikuapi.dss.future.DSSFuture

list_groups()

List all groups setup on the Agent Management instance

Note: this call requires an API key with admin rights

Returns:

A list of groups, as an list of dicts

Return type:

list of dicts

get_group(name)

Get a handle to interact with a specific group

Parameters:

name (str) – the name of the desired group

Returns:

A dataikuapi.dss.admin.DSSGroup group handle

create_group(name, description=None, source_type='LOCAL')

Create a group, and return a handle to interact with it

Note: this call requires an API key with admin rights

Parameters:
  • name (str) – the name of the new group

  • description (str) – (optional) a description of the new group

  • source_type – the type of the new group. Admissible values are ‘LOCAL’ and ‘LDAP’

Returns:

A dataikuapi.dss.admin.DSSGroup group handle

list_connections(as_type='dictitems')

List all connections setup on the Agent Management instance.

Note

This call requires an API key with admin rights

Parameters:

as_type (string) – how to return the connection. Possible values are “dictitems”, “listitems” and “objects”

Returns:

if as_type is dictitems, a dict of connection name to dataikuapi.dss.admin.DSSConnectionListItem. if as_type is listitems, a list of dataikuapi.dss.admin.DSSConnectionListItem. if as_type is objects, a list of dataikuapi.dss.admin.DSSConnection.

Return type:

dict or list

list_connections_names(connection_type)

List all connections names on the Agent Management instance.

Parameters:

connection_type (str) – Returns only connections with this type. Use ‘all’ if you don’t want to filter.

Returns:

the list of connections names

Return type:

List[str]

get_connection(name)

Get a handle to interact with a specific connection

Parameters:

name (str) – the name of the desired connection

Returns:

A dataikuapi.dss.admin.DSSConnection connection handle

create_connection(name, type, params=None, usable_by='ALL', allowed_groups=None, description=None)

Create a connection, and return a handle to interact with it

Note: this call requires an API key with admin rights

Parameters:
  • name – the name of the new connection

  • type – the type of the new connection

  • params (dict) – the parameters of the new connection, as a JSON object (defaults to {})

  • usable_by – the type of access control for the connection. Either ‘ALL’ (=no access control) or ‘ALLOWED’ (=access restricted to users of a list of groups)

  • allowed_groups (list) – when using access control (that is, setting usable_by=’ALLOWED’), the list of names of the groups whose users are allowed to use the new connection (defaults to [])

  • description (str) – (optional) a description of the new connection

Returns:

A dataikuapi.dss.admin.DSSConnection connection handle

list_global_api_keys(as_type='listitems')

List all global API keys set up on the Agent Management instance

Note

This call requires an API key with admin rights

Note

If the secure API keys feature is enabled, the secret key of the listed API keys will not be present in the returned objects

Parameters:

as_type (str) – How to return the global API keys. Possible values are “listitems” and “objects”

Returns:

if as_type=listitems, each key as a dataikuapi.dss.admin.DSSGlobalApiKeyListItem. if as_type=objects, each key is returned as a dataikuapi.dss.admin.DSSGlobalApiKey.

get_global_api_key_by_id(id_)

Get a handle to interact with a specific Global API key

Parameters:

id (str) – the id the API key

Returns:

A dataikuapi.dss.admin.DSSGlobalApiKey API key handle

create_global_api_key(label=None, description=None, admin=False)

Create a Global API key, and return a handle to interact with it.

Use AgentManagementClient.create_global_api_key_with_groups() to create global API keys that use groups to manage their permissions.

Note

This call requires an API key with admin rights

Note

The secret key of the created API key will always be present in the returned object, even if the secure API keys feature is enabled

Parameters:
  • label (str) – the label of the new API key

  • description (str) – the description of the new API key

  • admin (boolean) – has the new API key admin rights (True or False)

Returns:

A dataikuapi.dss.admin.DSSGlobalApiKey API key handle

create_global_api_key_with_groups(label=None, description=None, groups=None)

Create a Global API key, and return a handle to interact with it.

Note

This call requires an API key with admin rights

Note

The secret key of the created API key will always be present in the returned object, even if the secure API keys feature is enabled

Parameters:
  • label (str) – the label of the new API key

  • description (str) – the description of the new API key

  • groups (list) – the groups the new API key belongs to

Returns:

A dataikuapi.dss.admin.DSSGlobalApiKey API key handle

list_personal_api_keys(as_type='listitems')

List all your personal API keys.

Parameters:

as_type (str) – How to return the personal API keys. Possible values are “listitems” and “objects”

Returns:

if as_type=listitems, each key as a dataikuapi.dss.admin.DSSPersonalApiKeyListItem. if as_type=objects, each key is returned as a dataikuapi.dss.admin.DSSPersonalApiKey.

get_personal_api_key(id)

Get a handle to interact with a specific Personal API key.

Parameters:

id (str) – the id of the desired API key

Returns:

A dataikuapi.dss.admin.DSSPersonalApiKey API key handle

create_personal_api_key(label='', description='', as_type='dict')

Create a Personal API key associated with your user.

Parameters:
  • label (str) – the label of the new API key

  • description (str) – the description of the new API key

  • as_type (str) – How to return the personal API keys. Possible values are “dict” and “object”

Returns:

if as_type=dict, the new personal API key is returned as a dict. if as_type=object, the new personal API key is returned as a dataikuapi.dss.admin.DSSPersonalApiKey.

list_all_personal_api_keys(as_type='listitems')

List all personal API keys. Only admin can list all the keys.

Parameters:

as_type (str) – How to return the personal API keys. Possible values are “listitems” and “objects”

Returns:

if as_type=listitems, each key as a dataikuapi.dss.admin.DSSPersonalApiKeyListItem. if as_type=objects, each key is returned as a dataikuapi.dss.admin.DSSPersonalApiKey.

create_personal_api_key_for_user(user, label='', description='', as_type='object')

Create a Personal API key associated on behalf of a user. Only admin can create a key for another user.

Parameters:
  • label (str) – the label of the new API key

  • description (str) – the description of the new API key

  • user (str) – the id of the user to impersonate

  • as_type (str) – How to return the personal API keys. Possible values are “dict” and “object”

Returns:

if as_type=dict, the new personal API key is returned as a dict. if as_type=object, the new personal API key is returned as a dataikuapi.dss.admin.DSSPersonalApiKey.

list_logs()

List all available log files on the Agent Management instance This call requires an API key with admin rights

Returns:

A list of log file names

get_log(name)

Get the contents of a specific log file This call requires an API key with admin rights

Parameters:

name (str) – the name of the desired log file (obtained with list_logs())

Returns:

The contents of the log file, limited to the last 1,000 lines

log_custom_audit(custom_type, custom_params=None)

Log a custom entry to the audit trail

Parameters:
  • custom_type (str) – value for customMsgType in audit trail item

  • custom_params (dict) – value for customMsgParams in audit trail item (defaults to {})

get_auth_info()

Returns various information about the user currently authenticated using this instance of the API client.

This method returns a dict that may contain the following keys (may also contain others):

  • authIdentifier: login for a user, id for an API key

  • groups: list of group names (if context is an user)

Returns:

a dict

Return type:

dict

get_instance_info()

Get global information about the Agent Management instance

Returns:

a dataikuapi.dssclient.DSSInstanceInfo

get_licensing_status()

Returns a dictionary with information about licensing status of this Agent Management instance

Return type:

dict

set_license(license)

Sets a new licence for the Agent Management instance.

Parameters:

license – license (content of license file)

Returns:

None

get_messaging_channel(channel_id)

Get the messaging channel with the corresponding ID

Parameters:

channel_id – ID of channel as specified Notifications & Integrations UI

Returns:

A messaging channel object, such as dataikuapi.dss.messaging_channel.DSSMessagingChannel, or a dataikuapi.dss.messaging_channel.DSSMailMessagingChannel for a mail channel

list_messaging_channels(as_type='listitems', channel_type=None, channel_family=None)

List all available messaging channels

Parameters:
  • as_type (str) – How to return the list. Supported values are “listitems” and “objects” (defaults to listitems).

  • channel_type (str) – a channel type to filter by, e.g. “smtp”, “aws-ses-mail”, “slack” (see AgentManagementClient.create_messaging_channel() for the full list of supported types)

  • channel_family (str) – a str to filter for family of channels with a similar interface - “mail” for all channels that send email-like messages

Returns:

A list of messaging channels after the filtering specified, as listitems (dataikuapi.dss.messaging_channel.DSSMessagingChannelListItem) or objects (dataikuapi.dss.messaging_channel.DSSMessagingChannel or dataikuapi.dss.messaging_channel.DSSMailMessagingChannel)

new_messaging_channel(type)

Initializes the creation of a new messaging channel. Returns a dataikuapi.dss.messaging_channel.DSSMessagingChannelCreator or one of its subclasses to complete the creation of the messaging channel. The creation requires admin privileges.

Parameters:

type (str) – Type of the messaging channel. Can be one of the following: “smtp”, “aws-ses-mail”, “microsoft-graph-mail”, “slack”, “msft-teams” or “google-chat”.

Returns:

A new DSS Messaging Channel Creator handle

Return type:

dataikuapi.dss.messaging_channel.DSSMessagingChannelCreator

Usage example:

smtp_messaging_channel_creator = client.new_messaging_channel("smtp")
smtp_messaging_channel_creator.with_id("Some ID")
smtp_messaging_channel_creator.with_sender("[email protected]")
smtp_messaging_channel_creator.with_authorized_domains(["example.com", "example.org", "something.example.com"])
smtp_messaging_channel_creator.with_login("username")
smtp_messaging_channel_creator.with_password("password")
smtp_messaging_channel_creator.with_host("host.example.com")
smtp_messaging_channel_creator.with_port(443)
smtp_messaging_channel_creator.with_session_properties([{ "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" }])
smtp_messaging_channel = smtp_messaging_channel_creator.create()
create_messaging_channel(channel_type, channel_id=None, channel_configuration=None, permissions=None)

Create a messaging channel. Requires admin privileges.

We strongly recommend that you use the creator helpers instead of calling this directly. See AgentManagementClient.new_messaging_channel().

Parameters:
  • channel_type (str) – type of the channel. Common types are “smtp”, “aws-ses-mail”, “microsoft-graph-mail”, “slack”, “msft-teams” and “google-chat”. Twilio and shell channels are not supported by Agent Management.

  • channel_id (str) – optional ID of the channel, must be unique. If None or empty a random ID will be generated.

  • channel_configuration (dict) –

    optional specific configuration for the channel depending on the channel type. Every configuration entry is optional but not provided some may lead to a non-functional messaging channel.

    • ”smtp”, “aws-ses-mail”, “microsoft-graph-mail”:
      • ”useCurrentUserAsSender”: True to use the email of the user triggering the action as sender, False otherwise. Has precedence over ‘sender’ property;

      • ”sender”: sender email, use an adhoc provided email if not provided;

      • ”authorizedDomain”: comma-separated list of authorized domains for “To” addresses;

      • ”useSSL”: True to use SSL, False otherwise;

      • ”useTLS”: True to use TLS, False otherwise;

      • ”login”: user login;

      • ”password”: user password;

      • ”host”: host to connect to;

      • ”port”: port to connect to;

      • ”sessionProperties”: Array of dictionaries with “key” and “value” keys set for session extra properties;

      • Additional for “aws-ses-mail”:
        • ”accessKey”: AWS access key;

        • ”secretKey”: AWS secret key;

        • ”regionOrEndpoint”: AWS region or custom endpoint.

      • Additional for “microsoft-graph-mail”:
        • ”clientId”: Microsoft application ID;

        • ”tenantId”: Microsoft directory ID;

        • ”clientSecret”: Microsoft application client secret value.

    • ”slack”:
      • ”useProxy”: True to use DSS’s proxy settings to connect, False otherwise;

      • ”mode”: connection mode. Can be “WEBHOOK” or “API”;

      • ”webhookUrl”: webhook URL for “WEBHOOK” mode;

      • ”authorizationToken”: authorization token for “API” mode;

      • ”channel”: Slack channel ID.

    • ”msft-teams”:
      • ”useProxy”: True to use DSS’s proxy settings to connect, False otherwise;

      • ”webhookUrl”: webhook URL;

      • ”webhookType”: type of webhook to use. Can be “WORKFLOWS” or “OFFICE365” (legacy).

    • ”google-chat”:
      • ”useProxy”: True to use DSS’s proxy settings to connect, False otherwise;

      • ”webhookUrl”: webhook URL;

      • ”webhookKey”: key parameter for the webhook URL (mandatory if not included in the URL);

      • ”webhookToken”: token parameter for the webhook URL (mandatory if not included in the URL).

  • permissions (list[dict]) –

    optional list of permissions objects (all users can use the channel if not defined). Can be:

    • { “group”: group_id, canUse: True } to authorize a group to use the channel

    • { “user”: user_login, canUse: True } to authorize a single user to use the channel

Usage example:

channel_type = "smtp"
channel_id = "Some ID"
sender = "[email protected]"
authorized_domains = ["example.com", "example.org", "something.example.com"]
login = "username"
password = "password"
host = "host.example.com"
port = 587
session_properties = [{ "key": "key1", "value": "value1" }, { "key": "key2", "value": "value2" }]
channel_params = {
    "useCurrentUserAsSender": False,
    "sender": sender,
    "authorizedDomain": ",".join(authorized_domains),
    "useSSL": True,
    "useTLS": True,
    "login": login,
    "password": password,
    "host": host,
    "port": port,
    "sessionProperties": session_properties
}
client.create_messaging_channel(channel_type, channel_id, channel_params)
Returns:

The created messaging channel object, such as dataikuapi.dss.messaging_channel.DSSMessagingChannel, or a dataikuapi.dss.messaging_channel.DSSMailMessagingChannel for a mail channel

get_sso_settings()

Get the Single Sign-On (SSO) settings

Returns:

SSO settings

Return type:

dataikuapi.iam.settings.SSOSettings

get_ldap_settings()

Get the LDAP settings

Returns:

LDAP settings

Return type:

dataikuapi.iam.settings.LDAPSettings

get_azure_ad_settings()

Get the Azure Active Directory (aka Microsoft Entra ID) settings

Returns:

Azure AD settings

Return type:

dataikuapi.iam.settings.AzureADSettings

get_cobuild_status()

Returns whether Cobuild is available to the authenticated caller.

The result contains enabled and, when access is denied, reason.

Return type:

dict

new_cobuild_conversation()

Start a new empty Cobuild conversation in Agent Management.

Example:

conversation = client.new_cobuild_conversation()
response = conversation.send_message("List the agents in my estate")
print(response.message)

Pass allow_edit=True to send_message or approve_plan to allow changes for that turn. Assistant responses can request a confirmation or an explicit answer; continue with answer_confirmation or answer_question respectively.

Return type:

dataikuapi.agentmanagement.cobuild.CobuildConversation

get_settings()

Returns the global Agent Management settings.

Return type:

dataikuapi.agentmanagement.settings.Settings

list_alert_configurations(as_type='listitems')

Lists alert configurations owned globally, not configurations from other levels.

Parameters:

as_type (str) – “listitems”/”listitem” returns list items; “objects”/”object” returns handles of dataikuapi.agentmanagement.alerting.AlertConfiguration

Returns:

a list - see as_type for more information

Return type:

list

new_alert_configuration(type='metric', name=None)

Initializes a new alert configuration builder owned by this client.

Configure the returned builder, then call its create() method to submit it.

Parameters:
  • type (str) – metric; agent review configurations can only be created on an agent

  • name (str) – optional display name

Return type:

MetricAlertConfigurationBuilder

get_alert_configuration(configuration_id)

Returns a handle to an alert configuration owned globally.

Parameters:

configuration_id (str) – configuration ID

Return type:

dataikuapi.agentmanagement.alerting.AlertConfiguration

list_platforms(as_type='listitems')

Lists Agent Management platforms.

Parameters:

as_type (str) – “listitems”/”listitem” returns list items; “objects”/”object” returns handles of dataikuapi.agentmanagement.platform.Platform

Returns:

a list - see as_type for more information

Return type:

list

create_platform(platform_id, platform_type, display_name, connection_name=None, default_project_key=None, permissions=None, default_agent_permissions=None)

Creates an Agent Management platform with default settings and returns a handle to it.

Parameters:
  • platform_id (str) – unique identifier of the platform

  • platform_type (str) – type of platform

  • display_name (str) – display name of the platform

  • connection_name (str) – platform connection used by the platform (except OpenTelemetryReceiver)

  • default_project_key (str) – default DSS project used by the platform

  • permissions (list) – platform permissions; the creator is also made an administrator

  • default_agent_permissions (list) – default permissions for agents in the platform

Return type:

dataikuapi.agentmanagement.platform.Platform

get_platform(platform_id)

Returns a handle to an Agent Management platform.

Parameters:

platform_id (str) – identifier of the platform

Return type:

dataikuapi.agentmanagement.platform.Platform

get_agent(platform_id, agent_id)

Returns a handle to an agent.

Parameters:
  • platform_id (str) – identifier of the platform

  • agent_id (str) – identifier of the agent

Return type:

dataikuapi.agentmanagement.agent.Agent

list_agents(as_type='listitems', agent_filter=None)

Lists readable agents matching an optional filter.

Parameters:
  • as_type (str) – “listitems”/”listitem” returns AgentListItem entries; “objects”/”object” returns Agent handles

  • agent_filter (AgentFilter) – optional agent selection

Return type:

list

search_agents(agent_filter=None)

Lists the readable agents matching a filter.

Values of a facet are combined with OR, while different facets are combined with AND.

Parameters:

agent_filter (AgentFilter) – agent filter

Returns:

a dictionary containing agents and contextual facets counts

Return type:

dict

evaluate_alerts(agent_filter=None, mode='DUE')

Queues alert evaluation through the scheduler for editable agents matching a filter, whether or not periodic evaluation is enabled. Evaluation errors are logged asynchronously.

Agents that the caller cannot edit are ignored.

Parameters:
  • agent_filter (AgentFilter) – optional agent selection

  • mode (str) – DUE processes pending metric buckets within the catch-up limit. FORCE_LATEST recomputes the latest completed eligible bucket and corrects its alerts. FORCE_CATCH_UP does the same for the last N buckets, where N is the configured catch-up depth. Both read additional supporting history when consecutive breaches require it. Affected alerts remain in history as invalidated. Replacements have new IDs, even when recomputed values are unchanged, and do not inherit acknowledgements; these remain on the original alerts. Missing target observations prevent correction of the requested range. Missing older supporting observations also prevent correction when too few consecutive breaches remain to establish the observed severity. Agent-review alerts evaluate the latest eligible review run in every mode.

Returns:

number of agents included in the queued request

Return type:

int

get_available_metric_ids(agent_filter=None)

Lists the metric identifiers supported by readable agents matching the filter.

Returns the union across selected agents, sorted by identifier. Each dictionary contains id, supportsBuckets and supportsTimeSeries. The flags indicate compatibility with get_metric_buckets() and get_metric_time_series(); they do not guarantee stored data. Configured business KPIs use the business-kpi. prefix and support both query methods. An empty agent selection returns an empty list.

Parameters:

agent_filter (AgentFilter) – optional agent filter; omitted selects all readable agents

Returns:

metric identifiers and their query compatibility

Return type:

list of dict

Example:

available = dam.get_available_metric_ids()
bucket_metric_ids = [metric["id"] for metric in available if metric["supportsBuckets"]]
get_metric_time_series(metrics, agent_filter=None, from_time=None, to_time=None, latest_only=False)

Returns stored, non-aggregated metric values for the selected agents.

This method can only return metrics for which individual values are stored. Metrics which exist only as aggregates cannot be reconstructed as time-series values and must be queried with get_metric_buckets() instead.

metrics is a list of qualified metric identifiers. Each identifier includes its family, for example reliability.uptime_test_status. The accepted identifiers are reliability.uptime_test_status, performance.uptime_test_response_time_ms and business-kpi.<id>, where <id> is the identifier of a business KPI assigned to the agent. Uptime and business KPI metrics can be requested in the same call. Examples of metrics which only exist as buckets include reliability.uptime_successful_tests_count, reliability.uptime_tests_count, reliability.uptime_pct and all activity, consumption, behavior and bucketed performance metrics. This list is not exhaustive; any requested metric which is not stored as individual values is rejected.

The response is a list of series. Each series has infrastructureName, agentId, columns and rows. The first column is timestamp as a UTC-aware datetime; remaining columns are the qualified metrics. Rows are chronological lists aligned with columns. Metrics sharing the same stored timeline are grouped; each business KPI has its own series. A selected agent with no value has an empty rows list.

If latest_only is True, each series contains at most its latest available row. Metrics which share a timeline still share one row: this mode does not look for the latest non-null value of each metric separately. Both timestamps must be omitted in this mode. Otherwise from_time is required and to_time defaults to the current time.

To get the latest available values, omit both timestamps and set latest_only=True:

latest_time_series = dam.get_metric_time_series(
    metrics=["reliability.uptime_test_status", "performance.uptime_test_response_time_ms"],
    latest_only=True
)

This example requests one metric from each family available as stored time-series values. The business KPI points are deliberately shifted by five minutes from the uptime points:

from datetime import datetime, timezone

time_series = dam.get_metric_time_series(
    metrics=["reliability.uptime_test_status", "business-kpi.customer-satisfaction"],
    from_time=datetime(2026, 1, 1, 0, 0, tzinfo=timezone.utc),
    to_time=datetime(2026, 1, 2, 0, 0, tzinfo=timezone.utc),
    agent_filter=AgentFilter().with_agent_ids("support-agent")
)

# time_series == [
#     {
#         "infrastructureName": "production",
#         "agentId": "support-agent",
#         "columns": ["timestamp", "reliability.uptime_test_status"],
#         "rows": [[datetime(2026, 1, 1, 1, 0, tzinfo=timezone.utc), "OK"], [datetime(2026, 1, 1, 2, 0, tzinfo=timezone.utc), "ERROR"]]
#     },
#     {
#         "infrastructureName": "production",
#         "agentId": "support-agent",
#         "columns": ["timestamp", "business-kpi.customer-satisfaction"],
#         "rows": [[datetime(2026, 1, 1, 1, 5, tzinfo=timezone.utc), 4.6], [datetime(2026, 1, 1, 2, 5, tzinfo=timezone.utc), 4.8]]
#     }
# ]
Parameters:
  • metrics (list) – qualified metric identifiers, for example ["reliability.uptime_test_status", "performance.uptime_test_response_time_ms", "business-kpi.revenue"]

  • agent_filter (AgentFilter) – optional agent selection

  • from_time (int or datetime) – optional inclusive lower bound, as epoch milliseconds or a timezone-aware datetime; required when latest_only is False and forbidden when it is True

  • to_time (int or datetime) – optional exclusive upper bound, as epoch milliseconds or a timezone-aware datetime; defaults to the current time when from_time is set and is forbidden when latest_only is True

  • latest_only (boolean) – return at most the latest row of each logical series

Return type:

list of dict

get_metric_buckets(metrics, bucket, agent_filter=None, from_time=None, to_time=None)

Returns bucketed metrics for the selected agents.

metrics is a list of qualified metric identifiers. Each identifier has the form <family>.<metric> and a single request may mix families. The accepted identifiers are:

  • reliability: reliability.uptime_pct, reliability.uptime_tests_count, reliability.uptime_successful_tests_count, reliability.uptime_failed_tests_count, reliability.interaction_errors, reliability.interaction_error_rate_pct, reliability.platform_side.interaction_errors, reliability.platform_side.interaction_error_rate_pct, reliability.platform_side.throttles;

  • activity: activity.distinct_users_count, activity.interactions, activity.conversations, activity.platform_side.interactions and activity.interactions_per_conversation statistics;

  • performance: performance.interaction_latency_ms and performance.conversation_total_latency_ms statistics, plus performance.platform_side.interaction_latency_ms_avg and performance.platform_side.interaction_latency_ms_p95;

  • consumption: consumption.tokens.input, consumption.tokens.output, consumption.tokens.total, consumption.tokens.input_cache_read, consumption.tokens.input_cache_write, consumption.cost.total, plus consumption.tokens.input_per_interaction, consumption.tokens.output_per_interaction, consumption.tokens.total_per_interaction, consumption.cost.per_interaction and consumption.cost.per_conversation statistics;

  • behavior: behavior.tool_calls, plus behavior.tool_calls_per_interaction and behavior.tool_calls_per_conversation statistics;

  • business KPI: business-kpi.<id>.

Request statistics with an explicit .avg or .percentile.95 suffix, for example performance.conversation_total_latency_ms.percentile.95. Platform-side latency values are supplied by the platform and do not support custom aggregation suffixes. Percentages, including uptime and error rates, range from 0 to 100; rates without samples are missing.

Supported buckets are HOUR, DAY, WEEK and MONTH for all metric families. Business KPI buckets use the latest dataset value within each bucket. Activity counts distinct users and conversations within each bucket, not sums of smaller buckets. Conversation statistics use only interactions within the bucket and exclude missing conversation IDs. Conversation total latency is the sum of interaction durations, excluding time spent waiting for the user. Tool-call metrics describe recorded calls and include interactions with zero recorded calls in their population; missing trace data cannot be distinguished from no calls. Cost is an estimate: partially priced samples contribute known charges, while entirely unpriced samples are excluded from cost distributions.

Bucket boundaries always use the global metrics timezone configured in Agent Management. Weekly boundaries also use the globally configured first day of the week. start and end are nevertheless absolute instants returned as UTC-aware datetimes.

Returns dataikuapi.agentmanagement.metrics.BucketedMetricsFetchResults. Its agents() lists represented agents as platform/agent tuples. Use agent_series(platform_name, agent_id) for a unified {columns, rows} table: columns are start, end and the requested metrics in request order, and rows are joined on exact bucket boundaries and sorted chronologically. Missing values are None. raw_agent_data(platform_name, agent_id) preserves the original grouped series and metadata. agent_single_series(platform_name, agent_id, metric_id) returns (start, end, value) tuples. agent_values_at_time(platform_name, agent_id, time) returns metric values in the bucket containing the instant, accepting epoch milliseconds or an aware datetime.

Example:

results = dam.get_metric_buckets(
    ["activity.interactions", "performance.conversation_total_latency_ms.avg"],
    "DAY", from_time=datetime(2026, 1, 1, tzinfo=timezone.utc))
for platform_name, agent_id in results.agents():
    table = results.agent_series(platform_name, agent_id)
Parameters:
  • metrics (list) – qualified metric identifiers

  • bucket (str) – HOUR, DAY, WEEK or MONTH

  • agent_filter (AgentFilter) – optional agent selection

  • from_time (int or datetime) – inclusive lower bound, as epoch milliseconds or a timezone-aware datetime

  • to_time (int or datetime) – optional exclusive upper bound, as epoch milliseconds or a timezone-aware datetime; defaults to the current time

Return type:

dataikuapi.agentmanagement.metrics.BucketedMetricsFetchResults

list_operations(agent_filter=None, operation_types=None, statuses=None, triggers=None, from_timestamp=None, to_timestamp=None, limit=None, current_only=False, as_type='listitems')

Lists readable Agent Management operations matching the supplied filters.

The result contains operations and has_more, which indicates whether additional operations matched.

Parameters:
  • agent_filter (AgentFilter) – filter selecting operations attached to matching agents

  • operation_types (list) – operation types

  • statuses (list) – operation statuses

  • triggers (list) – operation triggers

  • from_timestamp (int) – optional inclusive lower timestamp bound, in milliseconds since the Unix epoch

  • to_timestamp (int) – optional exclusive upper timestamp bound, in milliseconds since the Unix epoch

  • limit (int) – maximum number of returned operations, defaults to 1000, up to 10000

  • current_only (boolean) – whether to return only queued or running operations

  • as_type (str) – “listitems”/”listitem” returns OperationListItem entries; “objects”/”object” returns Operation handles

Return type:

dataikuapi.agentmanagement.operations.OperationSearchResult

search_triggered_alerts(agent_filter=None, states=None, severities=None, configuration_ids=None, origins=None, from_timestamp=None, to_timestamp=None, limit=None, as_objects=True)

Searches readable Agent Management triggered alerts matching the supplied filters.

If states is omitted or empty, only active, unacknowledged alerts are returned. Explicitly requesting OPEN also includes acknowledged alerts that remain open pending recovery.

Parameters:
  • agent_filter (AgentFilter) – filter selecting triggered alerts attached to matching agents

  • states (list) – triggered alert states, either OPEN or CLOSED

  • severities (list) – triggered alert severities, either WARNING or CRITICAL

  • configuration_ids (list) – alert configuration IDs, without an origin prefix

  • origins (list) – configuration origins: GLOBAL, INFRA, AGENT, or SCOPE; combined with configuration_ids when both filters are supplied

  • from_timestamp (int) – optional inclusive lower opening timestamp bound, in milliseconds since the Unix epoch

  • to_timestamp (int) – optional exclusive upper opening timestamp bound, in milliseconds since the Unix epoch

  • limit (int) – optional maximum number of returned alerts; defaults to 100 and is capped at 1000

  • as_objects (boolean) – if True, the result contains dataikuapi.agentmanagement.alerting.Alert handles, otherwise dictionaries

Return type:

dataikuapi.agentmanagement.alerting.TriggeredAlertSearchResult

get_triggered_alert(alert_id)

Returns a handle to an Agent Management triggered alert.

Parameters:

alert_id (str) – identifier of the alert

Return type:

dataikuapi.agentmanagement.alerting.Alert

get_risk_exposure()

Returns the aggregated Agent Management risk exposure.

Return type:

dataikuapi.agentmanagement.risk.EstateRiskExposure

get_risk_taxonomy()

Returns the Agent Management risk taxonomy settings.

Return type:

dataikuapi.agentmanagement.risk.RiskTaxonomySettings

get_default_risk_taxonomy()

Returns the default Agent Management risk taxonomy settings.

Return type:

dataikuapi.agentmanagement.risk.RiskTaxonomySettings

list_tags()

Lists tags used by Agent Management agents.

Return type:

dataikuapi.agentmanagement_client.AgentManagementTags

get_dssclient()

Creates a DSSClient targeting the same Agent Management instance with the same authentication context.

Use this client for projects, datasets, recipes, plugins and code environments. Instance administration methods on AgentManagementClient also use this client internally.

Returns:

a DSSClient client

Return type:

dataikuapi.DSSClient

class dataikuapi.agentmanagement_client.AgentManagementTag(client, tag)

An Agent Management tag.

Do not create this directly, use AgentManagementTags.tag().

property name

The tag name (read-only). Use rename() to change it.

property color

The tag color. Changes are persisted by save().

save()

Saves the tag color.

Returns:

this tag with its saved definition

Return type:

AgentManagementTag

rename(new_name)

Renames the tag everywhere it is used and updates this object’s definition.

Parameters:

new_name (str) – new tag name

Returns:

this tag with its renamed definition

Return type:

AgentManagementTag

delete()

Deletes the tag everywhere it is used.

class dataikuapi.agentmanagement_client.AgentManagementTags(client, tags)

A snapshot of tags used by Agent Management agents, iterable as tag objects.

Do not create this directly, use AgentManagementClient.list_tags().

tag(name)

Returns a tag by its name.

Parameters:

name (str) – tag name

Return type:

AgentManagementTag

Raises:

KeyError – if the tag is not in this collection

class dataikuapi.dss.cobuild.CobuildAssistantResponse(raw)

A response from the Cobuild AI assistant.

Important

Do not create this class directly, it is returned by DSSCobuildConversation.send_message() DSSCobuildConversation.answer_confirmation(), and DSSCobuildConversation.answer_question(), and DSSCobuildConversation.approve_plan(). Agent Management conversations return this same response type through dataikuapi.agentmanagement.cobuild.CobuildConversation.

property role

Role of the message sender (“user” or “assistant”)

Return type:

str

property type

Type of the response: "assistant_message", "delete_confirmation_request", "ask_question_to_user_request", or "error".

  • "assistant_message": the assistant has completed its turn; the conversation is idle.

  • "delete_confirmation_request": the assistant is requesting confirmation before deleting objects. Call DSSCobuildConversation.answer_confirmation() with a choice of "APPROVE" or "CANCEL" to continue.

  • "ask_question_to_user_request": the assistant is requesting an explicit answer before it can continue. Call DSSCobuildConversation.answer_question() to continue.

  • "error": an error occurred while processing the Cobuild turn. In the public API, missing tool permissions are reported through this error response too.

Return type:

str

property is_question

DEPRECATED … DEPRECATED … DEPRECATED … DEPRECATED Whether the assistant is asking the user a question. If True, call DSSCobuildConversation.send_message() again with the answer to continue.

Return type:

bool

property is_confirmation_request

Whether the assistant is requesting confirmation before deleting objects or doing other operations requiring confirmation. If True, call DSSCobuildConversation.answer_confirmation() with a choice of "APPROVE" or "CANCEL" to continue. If the confirmation is about a deletion, inspect objects_to_delete and deletion_impacts for details.

Return type:

bool

property is_question_request

Whether the assistant is requesting an explicit answer before continuing. If True, call DSSCobuildConversation.answer_question().

Return type:

bool

property is_error

Whether the response represents an error.

Return type:

bool

property objects_to_delete

For "delete_confirmation_request" responses: the list of objects that the assistant is requesting permission to delete (or unshare). Each entry is a dict with fields projectKey, type, id, and displayName.

None for other response types.

Return type:

list of dict or None

property deletion_impacts

For "delete_confirmation_request" responses: a dict describing the cascading effects of the requested deletion (recipes that would be deleted, datasets left unchanged, etc.).

None for other response types.

Return type:

dict or None

property question_id

For "ask_question_to_user_request" responses: the identifier of the pending question.

None for other response types.

Return type:

str or None

property title

For "ask_question_to_user_request" responses: the short question shown to the user.

None for other response types.

Return type:

str or None

property predefined_answers

For "ask_question_to_user_request" responses: the list of predefined answers proposed by Cobuild.

None for other response types.

Return type:

list[str] or None

property allow_custom_answer

For "ask_question_to_user_request" responses: whether a custom free-text answer is allowed.

None for other response types.

Return type:

bool or None

property allow_multiple_answers

For "ask_question_to_user_request" responses: whether multiple answers can be selected.

None for other response types.

Return type:

bool or None

property default_answer_set

For "ask_question_to_user_request" responses: whether Cobuild suggested a default answer.

None for other response types.

Return type:

bool or None

property updated_plan

The latest non-null plan update emitted while processing this request.

The returned CobuildPlan is a read-only snapshot of the complete current plan, including its status, title, description, and typed milestones. None when the request did not update a plan or if it got discarded.

Return type:

CobuildPlan or None

class dataikuapi.dss.cobuild.CobuildConversationMode(*values)

Mode used for a Cobuild user message.

BUILD = 'BUILD'
PLAN = 'PLAN'
class dataikuapi.dss.cobuild.CobuildMessage(raw)
property message

The text content of the response.

Return type:

str or None

class dataikuapi.dss.cobuild.CobuildPlan(raw)

Read-only typed snapshot of a Cobuild plan.

A plan is returned by CobuildAssistantResponse.updated_plan whenever Cobuild updates it while processing a request. The snapshot contains the complete current plan, not a patch. To revise it, send another message in CobuildConversationMode.PLAN mode; to execute a draft, call DSSCobuildConversation.approve_plan() or dataikuapi.agentmanagement.cobuild.CobuildConversation.approve_plan().

For example:

plan = response.updated_plan
if plan is not None:
    print(plan.title, plan.status.value)
    for milestone in plan.milestones:
        print(milestone.title, milestone.status.value)
property id

Identifier of this plan.

Return type:

str

property status

Current lifecycle state of this plan.

Return type:

CobuildPlanStatus

property title

Short description of the overall plan.

Return type:

str or None

property description

Detailed description of the plan.

Return type:

str or None

property milestones

Ordered milestones making up this plan.

Return type:

list of CobuildPlanMilestone

class dataikuapi.dss.cobuild.CobuildPlanImplementationNotes(raw)

Additional implementation context for a Cobuild plan milestone.

These notes record the tools that Cobuild planned to use and the reasoning it retained while validating and executing the plan. They are provided for inspection only; changing this object does not modify the plan on the server.

property tools

Names of the tools Cobuild planned to use.

Return type:

list[str]

property details

Detailed implementation and validation notes.

Return type:

str or None

class dataikuapi.dss.cobuild.CobuildPlanMilestone(raw)

One ordered unit of work in a CobuildPlan.

Milestones are read-only snapshots of the plan returned by the server. Their fields describe both the intended work and its current execution state; changing this object does not modify the plan on the server.

property id

Identifier of this milestone.

Return type:

str

property status

Current execution state of this milestone.

Return type:

CobuildPlanMilestoneStatus

property title

Short description of the milestone.

Return type:

str or None

property steps

Markdown description of the work Cobuild intends to carry out.

Return type:

str or None

property completion_checklist

Checks Cobuild uses to determine whether the milestone is complete.

Return type:

list[str]

property output_description_summary

Summary of the expected outputs or outcomes of this milestone.

Return type:

str or None

property implementation_notes

Additional implementation context, when Cobuild supplied it.

Return type:

CobuildPlanImplementationNotes or None

class dataikuapi.dss.cobuild.CobuildPlanMilestoneStatus(*values)

Execution state of a CobuildPlanMilestone.

NOT_STARTED = 'NOT_STARTED'
IN_PROGRESS = 'IN_PROGRESS'
DONE = 'DONE'
class dataikuapi.dss.cobuild.CobuildPlanStatus(*values)

Lifecycle state of a CobuildPlan.

DRAFT = 'DRAFT'
ACTIVE = 'ACTIVE'
INACTIVE = 'INACTIVE'
class dataikuapi.dss.cobuild.CobuildUserMessage(raw)

A message sent to Cobuild AI assistant by the user.

Important

Do not create this class directly, it is automatically created when using dataikuapi.dss.project.DSSProject.new_cobuild_conversation(), DSSCobuildConversation.send_message(), and DSSCobuildConversation.answer_confirmation(), and DSSCobuildConversation.answer_question(). It is also used by dataikuapi.agentmanagement.cobuild.CobuildConversation.

property role

Role of the message sender (“user” or “assistant”)

Return type:

str

property type

Type of the message: "request", "delete_confirmation_response", or "ask_question_to_user_response".

  • "request": a normal message sent to cobuild.

  • "delete_confirmation_response": user response when cobuild requests confirmation before deleting objects

  • "ask_question_to_user_response": user response when cobuild requests an explicit answer

Return type:

str

property is_confirmation_response

Whether this message is the answer for assistant requesting confirmation before deleting objects

Return type:

bool

property is_question_response

Whether this message is the answer for assistant requesting an explicit answer.

Return type:

bool

class dataikuapi.dssclient.DSSInstanceInfo(data)

Global information about the DSS instance

property raw

Returns all data as a Python dictionary

property node_id

Returns the node id (as defined in Cloud Stacks or in install.ini)

property node_name

Returns the node name as it appears in the navigation bar

property node_type

Returns the node type :return: One of DESIGN, AUTOMATION or DEPLOYER

These shared settings handles are returned by the Agent Management client’s authentication provider methods.

class dataikuapi.iam.settings.AzureADSettings(client, path, azuread_settings)
save()

Saves back the settings

set_use_global_proxy(use_global_proxy)

Set whether to use a global proxy for Azure AD.

Parameters:

use_global_proxy (bool) – True to use a global proxy, False otherwise

Returns:

self

Return type:

AzureADSettings

get_use_global_proxy()

Get whether to use a global proxy for Azure AD.

Returns:

True if using a global proxy, False otherwise

Return type:

bool

set_credential_method(credential_method)

Set the credential method for Azure AD.

Parameters:

credential_method (str) – The credential method (possible values: “OAUTH2_SECRET” or “OAUTH2_CERT”)

Returns:

self

Return type:

AzureADSettings

get_credential_method()

Get the credential method for Azure AD.

Returns:

The credential method

Return type:

str

set_credentials_client_id(credentials_client_id)

Set the client ID for Azure AD credentials.

Parameters:

credentials_client_id (str) – The client ID

Returns:

self

Return type:

AzureADSettings

get_credentials_client_id()

Get the client ID for Azure AD credentials.

Returns:

The client ID

Return type:

str

set_credentials_client_secret(credentials_client_secret)

Set the client secret for Azure AD credentials.

Parameters:

credentials_client_secret (str) – The client secret

Returns:

self

Return type:

AzureADSettings

get_credentials_client_secret()

Get the client secret for Azure AD credentials.

Returns:

The client secret

Return type:

str

set_credentials_tenant_id(credentials_tenant_id)

Set the tenant ID for Azure AD credentials.

Parameters:

credentials_tenant_id (str) – The tenant ID

Returns:

self

Return type:

AzureADSettings

get_credentials_tenant_id()

Get the tenant ID for Azure AD credentials.

Returns:

The tenant ID

Return type:

str

set_user_query_filter(user_query_filter)

Set the user query filter for Azure AD.

Parameters:

user_query_filter (str) – The user query filter

Returns:

self

Return type:

AzureADSettings

get_user_query_filter()

Get the user query filter for Azure AD.

Returns:

The user query filter

Return type:

str

set_group_query_filter(group_query_filter)

Set the group query filter for Azure AD.

Parameters:

group_query_filter (str) – The group query filter

Returns:

self

Return type:

AzureADSettings

get_group_query_filter()

Get the group query filter for Azure AD.

Returns:

The group query filter

Return type:

str

set_groups_limit(groups_limit)

Set the limit for the number of groups in Azure AD.

Parameters:

groups_limit (int) – The groups limit

Returns:

self

Return type:

AzureADSettings

get_groups_limit()

Get the limit for the number of groups in Azure AD.

Returns:

The groups limit

Return type:

int

set_enabled(enabled)

Set whether Azure AD integration is enabled.

Parameters:

enabled (bool) – True if Azure AD integration is enabled, False otherwise

Returns:

self

Return type:

AzureADSettings

get_enabled()

Get whether Azure AD integration is enabled.

Returns:

True if Azure AD integration is enabled, False otherwise

Return type:

bool

set_auto_provision_users_at_login_time(auto_provision_users_at_login_time)

Set whether auto-provisioning of users is enabled at login time in Azure AD.

Parameters:

auto_provision_users_at_login_time (bool) – True to enable auto-provisioning, False otherwise

Returns:

self

Return type:

AzureADSettings

get_auto_provision_users_at_login_time()

Get whether auto-provisioning of users is enabled at login time in Azure AD.

Returns:

True if auto-provisioning is enabled, False otherwise

Return type:

bool

set_auto_sync_users_at_login_time(auto_sync_users_at_login_time)

Set whether auto-syncing of users is enabled at login time in Azure AD.

Parameters:

auto_sync_users_at_login_time (bool) – True to enable auto-syncing, False otherwise

Returns:

self

Return type:

AzureADSettings

get_auto_sync_users_at_login_time()

Get whether auto-syncing of users is enabled at login time in Azure AD.

Returns:

True if auto-syncing is enabled, False otherwise

Return type:

bool

set_allow_on_demand_users_sync(allow_on_demand_users_sync)

Set whether to allow on-demand users syncing in Azure AD.

Parameters:

allow_on_demand_users_sync (bool) – True to allow syncing, False otherwise

Returns:

self

Return type:

AzureADSettings

get_allow_on_demand_users_sync()

Get whether on-demand users syncing is allowed in Azure AD.

Returns:

True if syncing is allowed, False otherwise

Return type:

bool

set_default_user_profile(default_user_profile)

Set the default user profile in Azure AD.

Parameters:

default_user_profile (str) – Default user profile

Returns:

self

Return type:

AzureADSettings

get_default_user_profile()

Get the default user profile in Azure AD.

Returns:

Default user profile

Return type:

str

set_group_profiles(group_profiles)

Set the group profiles in Azure AD.

Parameters:

group_profiles (list) – List of group profiles

Returns:

self

Return type:

AzureADSettings

get_group_profiles()

Get the group profiles in Azure AD.

Returns:

List of group profiles

Return type:

list

set_authorized_groups(authorized_groups)

Set the authorized groups in Azure AD.

Parameters:

authorized_groups (list[str]) – Authorized groups

Returns:

self

Return type:

AzureADSettings

get_authorized_groups()

Get the authorized groups in Azure AD.

Returns:

Authorized groups

Return type:

list[str]

set_allow_on_demand_users_provisioning(allow_on_demand_users_provisioning)

Set whether to allow on-demand users provisioning in Azure AD.

Parameters:

allow_on_demand_users_provisioning (bool) – True to allow provisioning, False otherwise

Returns:

self

Return type:

AzureADSettings

get_allow_on_demand_users_provisioning()

Get whether on-demand users provisioning is allowed in Azure AD.

Returns:

True if provisioning is allowed, False otherwise

Return type:

bool

set_login_attribute_ref(login_attribute_ref)

Set the login attribute reference in Azure AD.

Parameters:

login_attribute_ref (str) – The login attribute reference

Returns:

self

Return type:

AzureADSettings

get_login_attribute_ref()

Get the login attribute reference in Azure AD.

Returns:

The login attribute reference

Return type:

str

set_remapping_rules(remapping_rules)

Set the remapping rules in Azure AD.

Parameters:

remapping_rules (list) – List of remapping rules

Returns:

self

Return type:

AzureADSettings

get_remapping_rules()

Get the remapping rules in Azure AD.

Returns:

List of remapping rules

Return type:

list

class dataikuapi.iam.settings.LDAPSettings(client, path, ldap_settings)
save()

Saves back the settings

set_url(url)

Set the LDAP server URL.

Parameters:

url (str) – The LDAP server URL

Returns:

self

Return type:

LDAPSettings

get_url()

Get the LDAP server URL.

Returns:

The LDAP server URL

Return type:

str

set_use_tls(use_tls)

Set whether to use TLS in LDAP.

Parameters:

use_tls (bool) – True to use TLS, False otherwise

Returns:

self

Return type:

LDAPSettings

get_use_tls()

Get whether to use TLS in LDAP.

Returns:

True if using TLS, False otherwise

Return type:

bool

set_bind_dn(bind_dn)

Set the LDAP bind DN.

Parameters:

bind_dn (str) – The LDAP bind DN

Returns:

self

Return type:

LDAPSettings

get_bind_dn()

Get the LDAP bind DN.

Returns:

The LDAP bind DN

Return type:

str

set_bind_password(bind_password)

Set the LDAP bind password.

Parameters:

bind_password (str) – The LDAP bind password

Returns:

self

Return type:

LDAPSettings

get_bind_password()

Get the LDAP bind password.

Returns:

The LDAP bind password

Return type:

str

set_user_filter(user_filter)

Set the LDAP user filter.

Parameters:

user_filter (str) – LDAP user filter

Returns:

self

Return type:

LDAPSettings

get_user_filter()

Get the LDAP user filter.

Returns:

LDAP user filter

Return type:

str

set_display_name_attribute(display_name_attribute)

Set the LDAP display name attribute.

Parameters:

display_name_attribute (str) – The LDAP display name attribute

Returns:

self

Return type:

LDAPSettings

get_display_name_attribute()

Get the LDAP display name attribute.

Returns:

The LDAP display name attribute

Return type:

str

set_email_attribute(email_attribute)

Set the LDAP email attribute.

Parameters:

email_attribute (str) – The LDAP email attribute

Returns:

self

Return type:

LDAPSettings

get_email_attribute()

Get the LDAP email attribute.

Returns:

The LDAP email attribute

Return type:

str

set_enable_groups(enable_groups)

Set whether to enable groups in LDAP.

Parameters:

enable_groups (bool) – True to enable groups, False otherwise

Returns:

self

Return type:

LDAPSettings

get_enable_groups()

Get whether groups are enabled in LDAP.

Returns:

True if groups are enabled, False otherwise

Return type:

bool

set_group_filter(group_filter)

Set the LDAP group filter.

Parameters:

group_filter (str) – LDAP group filter

Returns:

self

Return type:

LDAPSettings

get_group_filter()

Get the LDAP group filter.

Returns:

LDAP group filter

Return type:

str

set_group_name_attribute(group_name_attribute)

Set the LDAP group name attribute.

Parameters:

group_name_attribute (str) – The LDAP group name attribute

Returns:

self

Return type:

LDAPSettings

get_group_name_attribute()

Get the LDAP group name attribute.

Returns:

The LDAP group name attribute

Return type:

str

set_authorized_groups(authorized_groups)

Set the authorized groups in LDAP.

Parameters:

authorized_groups (list[str]) – Authorized groups

Returns:

self

Return type:

LDAPSettings

get_authorized_groups()

Get the authorized groups in LDAP.

Returns:

Authorized groups

Return type:

list[str]

set_enabled(enabled)

Set whether LDAP is enabled.

Parameters:

enabled (bool) – True if LDAP is enabled, False otherwise

Returns:

self

Return type:

LDAPSettings

get_enabled()

Get whether LDAP is enabled.

Returns:

True if LDAP is enabled, False otherwise

Return type:

bool

set_auto_import_users(auto_import_users)

Set whether to auto-import users in LDAP.

Parameters:

auto_import_users (bool) – True to auto-import users, False otherwise

Returns:

self

Return type:

LDAPSettings

get_auto_import_users()

Get whether auto-importing users is enabled in LDAP.

Returns:

True if auto-importing is enabled, False otherwise

Return type:

bool

set_auto_sync_users_at_login_time(auto_sync_users_at_login_time)

Set whether auto-syncing of users is enabled at login time in LDAP.

Parameters:

auto_sync_users_at_login_time (bool) – True to enable auto-syncing, False otherwise

Returns:

self

Return type:

LDAPSettings

get_auto_sync_users_at_login_time()

Get whether auto-syncing of users is enabled at login time in LDAP.

Returns:

True if auto-syncing is enabled, False otherwise

Return type:

bool

set_allow_on_demand_users_sync(allow_on_demand_users_sync)

Set whether to allow on-demand users syncing in LDAP.

Parameters:

allow_on_demand_users_sync (bool) – True to allow syncing, False otherwise

Returns:

self

Return type:

LDAPSettings

get_allow_on_demand_users_sync()

Get whether on-demand users syncing is allowed in LDAP.

Returns:

True if syncing is allowed, False otherwise

Return type:

bool

set_default_user_profile(default_user_profile)

Set the default user profile in LDAP.

Parameters:

default_user_profile (str) – Default user profile

Returns:

self

Return type:

LDAPSettings

get_default_user_profile()

Get the default user profile in LDAP.

Returns:

Default user profile

Return type:

str

set_group_profiles(group_profiles)

Set the group profiles in LDAP.

Parameters:

group_profiles (list) – List of group profiles

Returns:

self

Return type:

LDAPSettings

get_group_profiles()

Get the group profiles in LDAP.

Returns:

List of group profiles

Return type:

list

set_authentication_enabled(authentication_enabled)

Set whether authentication is enabled in LDAP.

Parameters:

authentication_enabled (bool) – True if authentication is enabled, False otherwise

Returns:

self

Return type:

LDAPSettings

get_authentication_enabled()

Get whether authentication is enabled in LDAP.

Returns:

True if authentication is enabled, False otherwise

Return type:

bool

set_all_groups_filter(all_groups_filter)

Set the LDAP filter for retrieving all groups.

Parameters:

all_groups_filter (str) – The LDAP filter for all groups

Returns:

self

Return type:

LDAPSettings

get_all_groups_filter()

Get the LDAP filter for retrieving all groups.

Returns:

The LDAP filter for all groups

Return type:

str

set_all_users_filter(all_users_filter)

Set the LDAP filter for retrieving all users.

Parameters:

all_users_filter (str) – The LDAP filter for all users

Returns:

self

Return type:

LDAPSettings

get_all_users_filter()

Get the LDAP filter for retrieving all users.

Returns:

The LDAP filter for all users

Return type:

str

set_username_attribute(username_attribute)

Set the LDAP username attribute.

Parameters:

username_attribute (str) – The LDAP username attribute

Returns:

self

Return type:

LDAPSettings

get_username_attribute()

Get the LDAP username attribute.

Returns:

The LDAP username attribute

Return type:

str

set_group_membership_attribute(group_membership_attribute)

Set the LDAP group membership attribute.

Parameters:

group_membership_attribute (str) – The LDAP group membership attribute

Returns:

self

Return type:

LDAPSettings

get_group_membership_attribute()

Get the LDAP group membership attribute.

Returns:

The LDAP group membership attribute

Return type:

str

set_allow_on_demand_users_provisioning(allow_on_demand_users_provisioning)

Set whether on-demand users provisioning is allowed in LDAP.

Parameters:

allow_on_demand_users_provisioning (bool) – True to allow provisioning, False otherwise

Returns:

self

Return type:

LDAPSettings

get_allow_on_demand_users_provisioning()

Get whether on-demand users provisioning is allowed in LDAP.

Returns:

True if provisioning is allowed, False otherwise

Return type:

bool

set_group_membership_user_attribute(group_membership_user_attribute)

Set the LDAP group membership user attribute.

Parameters:

group_membership_user_attribute (str) – The LDAP group membership user attribute

Returns:

self

Return type:

LDAPSettings

get_group_membership_user_attribute()

Get the LDAP group membership user attribute.

Returns:

The LDAP group membership user attribute

Return type:

str

set_remapping_rules(remapping_rules)

Set the remapping rules in LDAP.

Parameters:

remapping_rules (list) – List of remapping rules

Returns:

self

Return type:

LDAPSettings

get_remapping_rules()

Get the remapping rules in LDAP.

Returns:

List of remapping rules

Return type:

list

class dataikuapi.iam.settings.SSOSettings(client, path, sso_settings)
save()

Saves back the settings to the project

set_protocol(protocol)

Set the SSO protocol.

Parameters:

protocol (SSOProtocol) – SSO protocol

Returns:

self

Return type:

SSOSettings

get_protocol()

Get the SSO protocol.

Returns:

SSO protocol

Return type:

SSOProtocol

set_remapping_rules(remapping_rules)

Set the remapping rules.

Parameters:

remapping_rules (list) – List of UserRemappingRule instances

Returns:

self

Return type:

SSOSettings

get_remapping_rules()

Get the remapping rules.

Returns:

List of UserRemappingRule instances

Return type:

list

set_saml_sp_params(saml_sp_params)

Set the SAML Service Provider parameters.

Parameters:

saml_sp_params (SAMLSPParams) – Instance of SAMLSPParams

Returns:

self

Return type:

SSOSettings

get_saml_sp_params()

Get the SAML Service Provider parameters.

Returns:

Instance of SAMLSPParams

Return type:

SAMLSPParams

set_openid_params(openid_params)

Set the OpenID parameters.

Parameters:

openid_params (OpenIDParams) – Instance of OpenIDParams

Returns:

self

Return type:

SSOSettings

get_openid_params()

Get the OpenID parameters.

Returns:

Instance of OpenIDParams

Return type:

OpenIDParams

set_spnego_mode(spnego_mode)

Set the SPNEGO mode.

Parameters:

spnego_mode (SPNEGOMode) – SPNEGO mode

Returns:

self

Return type:

SSOSettings

get_spnego_mode()

Get the SPNEGO mode.

Returns:

SPNEGO mode

Return type:

SPNEGOMode

set_sso_enabled(enabled)

Set whether SSO is enabled.

Parameters:

enabled (bool) – True if SSO is enabled, False otherwise

Returns:

self

Return type:

SSOSettings

get_sso_enabled()

Get whether SSO is enabled.

Returns:

True if SSO is enabled, False otherwise

Return type:

bool

set_auto_provision_users_at_login_time(auto_provision)

Set whether auto-provisioning of users is enabled at login time.

Parameters:

auto_provision (bool) – True to enable auto-provisioning, False otherwise

Returns:

self

Return type:

SSOSettings

get_auto_provision_users_at_login_time()

Get whether auto-provisioning of users is enabled at login time.

Returns:

True if auto-provisioning is enabled, False otherwise

Return type:

bool

set_auto_sync_users_at_login_time(auto_sync)

Set whether auto-syncing of users is enabled at login time.

Parameters:

auto_sync (bool) – True to enable auto-syncing, False otherwise

Returns:

self

Return type:

SSOSettings

get_auto_sync_users_at_login_time()

Get whether auto-syncing of users is enabled at login time.

Returns:

True if auto-syncing is enabled, False otherwise

Return type:

bool

set_default_user_profile(default_profile)

Set the default user profile.

Parameters:

default_profile (str) – Default user profile

Returns:

self

Return type:

SSOSettings

get_default_user_profile()

Get the default user profile.

Returns:

Default user profile

Return type:

str

set_group_profiles(group_profiles)

Set the group profiles.

Parameters:

group_profiles (list) – List of group profiles

Returns:

self

Return type:

SSOSettings

get_group_profiles()

Get the group profiles.

Returns:

List of group profiles

Return type:

list

set_authorized_groups(authorized_groups)

Set the authorized groups.

Parameters:

authorized_groups (list[str]) – Authorized groups

Returns:

self

Return type:

SSOSettings

get_authorized_groups()

Get the authorized groups.

Returns:

Authorized groups

Return type:

list[str]