set_ai_guard_rail_as_default¶
- ArtificialIntelligenceApi.set_ai_guard_rail_as_default(id, role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Set a global AI guard rail as the organization default
Marks this global guard rail as default (IsDefault true) and unsets the previous default. Private rails cannot be default. Requires at least read-only access.
- Parameters:
id (str) – GuardRailId of the global guard rail to make default. (required)
role_id (str) – Role identifier used for authorization. Missing this header returns AUTH-1001. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /ai/guard-rails/{id}/default
Success (HTTP 200)¶
Guard rail successfully set as default.
Newly set as default
{
"Message": "Guard rail set as default successfully.",
"GuardRailId": "3k2h1example"
}
Already the organization default
{
"Message": "Guard rail is already set as default",
"GuardRailId": "3k2h1example"
}
Errors¶
Documented error codes: IPV-1008.
HTTP 400
Only global rails can be default (IPV-1008), not found, or insufficient access.
HTTP 500
Internal server error during operation.