Update and Delete Aditor Configuration#

Update a Configuration#

To update an audit configuration, you send a PATCH request to the /v1beta1/audit/configs endpoint.

client.beta.audit.configs.update(
    config_name="demo-basic-config",
    namespace="default",
    description="Updated description",
    system={
        "parallel_attempts": 10,
        "lite": False
    },
    plugins={
        "probe_spec": "ansiescape"
    }
)
curl -X PATCH "${AUDITOR_BASE_URL}/v1beta1/audit/configs/default/demo-basic-config" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Updated description",
    "system": {
      "parallel_attempts": 10,
      "lite": false
    },
    "plugins": {
      "probe_spec": "ansiescape"
    }
  }' | jq

Delete a Configuration#

To delete an audit configuration, you send a DELETE request to the /v1beta1/audit/configs endpoint.

client.beta.audit.configs.delete(
    config_name="demo-basic-config",
    namespace="default"
)
curl -X DELETE "${AUDITOR_BASE_URL}/v1beta1/audit/configs/default/demo-basic-config" \
  -H "Accept: application/json"

View Configuration History#

To view the configuration history, you send a GET request to the /v1beta1/audit/configs/<namespace>/<config-name>/versions endpoint.

You can compare the updated_at fields to determine the most recent version or you can compare the id and entity_id fields. The object with matching id and entity_id fields is the latest version.

import os
from nemo_microservices import NeMoMicroservices

client = NeMoMicroservices(base_url=os.getenv("AUDITOR_BASE_URL"))

versions = client.beta.audit.configs.list_versions(
    config_name="demo-basic-config",
    namespace="default"
)
print(versions)
curl -X DELETE "${AUDITOR_BASE_URL}/v1beta1/audit/configs/default/demo-basic-config" \
  -H "Accept: application/json"

Example Output

SyncDefaultPagination[AuditConfig](object='list',
data=[AuditConfig(id='audit_config-bJDEzz5NRrfDaxzgUxYHz',
created_at=datetime.datetime(2025, 8, 18, 12, 32, 57, 579546,
tzinfo=TzInfo(UTC)), custom_fields={}, description='Basic demonstration
configuration', entity_id='audit_config-bJDEzz5NRrfDaxzgUxYHz', name='demo-
basic-config', namespace='default', ownership=None,
plugins=AuditPluginsDataOutput(buff_max=None, buff_spec=None, buffs={},
buffs_include_original_prompt=False, detector_spec='auto', detectors={},
extended_detectors=False, generators={}, harnesses={}, model_name=None,
model_type=None, probe_spec='dan.AutoDANCached,goodside.Tag', probes={}),
project=None, reporting=AuditReportData(report_dir='garak_runs',
report_prefix='run1', show_100_pass_modules=True, taxonomy=None),
run=AuditRunData(deprefix=True, eval_threshold=0.5, generations=5,
probe_tags=None, seed=None, user_agent='garak/{version} (LLM vulnerability
scanner https://garak.ai)'), schema_version='1.0',
system=AuditSystemData(enable_experimental=False, lite=True,
narrow_output=False, parallel_attempts=20, parallel_requests=False,
show_z=False, verbose=0), type_prefix=None,
updated_at=datetime.datetime(2025, 8, 18, 12, 35, 59, 753597,
tzinfo=TzInfo(UTC))), AuditConfig(id='audit_config-9Soinqvw4qhRqwQMiCJAju',
created_at=datetime.datetime(2025, 8, 18, 12, 32, 57, 579546,
tzinfo=TzInfo(UTC)), custom_fields={}, description='Updated description',
entity_id='audit_config-bJDEzz5NRrfDaxzgUxYHz', name='demo-basic-config',
namespace='default', ownership=None,
plugins=AuditPluginsDataOutput(buff_max=None, buff_spec=None, buffs={},
buffs_include_original_prompt=False, detector_spec='auto', detectors={},
extended_detectors=False, generators={}, harnesses={}, model_name=None,
model_type=None, probe_spec='ansiescape', probes={}), project=None,
reporting=AuditReportData(report_dir='garak_runs', report_prefix='run1',
show_100_pass_modules=True, taxonomy=None), run=AuditRunData(deprefix=True,
eval_threshold=0.5, generations=5, probe_tags=None, seed=None,
user_agent='garak/{version} (LLM vulnerability scanner https://garak.ai)'),
schema_version='1.0', system=AuditSystemData(enable_experimental=False,
lite=False, narrow_output=False, parallel_attempts=10,
parallel_requests=False, show_z=False, verbose=0), type_prefix=None,
updated_at=datetime.datetime(2025, 8, 18, 12, 32, 57, 579546,
tzinfo=TzInfo(UTC)))], sort='created_at',
pagination=DefaultPaginationPagination(current_page_size=2, page=1,
page_size=100, total_pages=1, total_results=2), filter={'ownership': None})
{
  "object": "list",
  "data": [
    {
      "schema_version": "1.0",
      "id": "audit_config-bJDEzz5NRrfDaxzgUxYHz",
      "description": "Basic demonstration configuration",
      "type_prefix": null,
      "namespace": "default",
      "project": null,
      "created_at": "2025-08-18T12:32:57.579546Z",
      "updated_at": "2025-08-18T12:35:59.753597Z",
      "custom_fields": {},
      "ownership": null,
      "name": "demo-basic-config",
      "entity_id": "audit_config-bJDEzz5NRrfDaxzgUxYHz",
      "system": {
        "verbose": 0,
        "narrow_output": false,
        "parallel_requests": false,
        "parallel_attempts": 20,
        "lite": true,
        "show_z": false,
        "enable_experimental": false
      },
      "run": {
        "seed": null,
        "deprefix": true,
        "eval_threshold": 0.5,
        "generations": 5,
        "probe_tags": null,
        "user_agent": "garak/{version} (LLM vulnerability scanner https://garak.ai)"
      },
      "plugins": {
        "model_type": null,
        "model_name": null,
        "probe_spec": "dan.AutoDANCached,goodside.Tag",
        "detector_spec": "auto",
        "extended_detectors": false,
        "buff_spec": null,
        "buffs_include_original_prompt": false,
        "buff_max": null,
        "detectors": {},
        "generators": {},
        "buffs": {},
        "harnesses": {},
        "probes": {}
      },
      "reporting": {
        "report_prefix": "run1",
        "taxonomy": null,
        "report_dir": "garak_runs",
        "show_100_pass_modules": true
      }
    },
    {
      "schema_version": "1.0",
      "id": "audit_config-9Soinqvw4qhRqwQMiCJAju",
      "description": "Updated description",
      "type_prefix": null,
      "namespace": "default",
      "project": null,
      "created_at": "2025-08-18T12:32:57.579546Z",
      "updated_at": "2025-08-18T12:35:59.865411Z",
      "custom_fields": {},
      "ownership": null,
      "name": "demo-basic-config",
      "entity_id": "audit_config-bJDEzz5NRrfDaxzgUxYHz",
      "system": {
        "verbose": 0,
        "narrow_output": false,
        "parallel_requests": false,
        "parallel_attempts": 10,
        "lite": false,
        "show_z": false,
        "enable_experimental": false
      },
      "run": {
        "seed": null,
        "deprefix": true,
        "eval_threshold": 0.5,
        "generations": 5,
        "probe_tags": null,
        "user_agent": "garak/{version} (LLM vulnerability scanner https://garak.ai)"
      },
      "plugins": {
        "model_type": null,
        "model_name": null,
        "probe_spec": "ansiescape",
        "detector_spec": "auto",
        "extended_detectors": false,
        "buff_spec": null,
        "buffs_include_original_prompt": false,
        "buff_max": null,
        "detectors": {},
        "generators": {},
        "buffs": {},
        "harnesses": {},
        "probes": {}
      },
      "reporting": {
        "report_prefix": "run1",
        "taxonomy": null,
        "report_dir": "garak_runs",
        "show_100_pass_modules": true
      }
    },
    {
      "schema_version": "1.0",
      "id": "audit_config-EQM8CqU4mg5KbigKGgFR57",
      "description": "Updated description",
      "type_prefix": null,
      "namespace": "default",
      "project": null,
      "created_at": "2025-08-18T12:32:57.579546Z",
      "updated_at": "2025-08-18T12:32:57.579546Z",
      "custom_fields": {},
      "ownership": null,
      "name": "demo-basic-config",
      "entity_id": "audit_config-bJDEzz5NRrfDaxzgUxYHz",
      "system": {
        "verbose": 0,
        "narrow_output": false,
        "parallel_requests": false,
        "parallel_attempts": 10,
        "lite": false,
        "show_z": false,
        "enable_experimental": false
      },
      "run": {
        "seed": null,
        "deprefix": true,
        "eval_threshold": 0.5,
        "generations": 5,
        "probe_tags": null,
        "user_agent": "garak/{version} (LLM vulnerability scanner https://garak.ai)"
      },
      "plugins": {
        "model_type": null,
        "model_name": null,
        "probe_spec": "ansiescape",
        "detector_spec": "auto",
        "extended_detectors": false,
        "buff_spec": null,
        "buffs_include_original_prompt": false,
        "buff_max": null,
        "detectors": {},
        "generators": {},
        "buffs": {},
        "harnesses": {},
        "probes": {}
      },
      "reporting": {
        "report_prefix": "run1",
        "taxonomy": null,
        "report_dir": "garak_runs",
        "show_100_pass_modules": true
      }
    },
    {
      "schema_version": "1.0",
      "id": "audit_config-QDCphLWg1JYKUHZwngFfgm",
      "description": "Basic demonstration configuration",
      "type_prefix": null,
      "namespace": "default",
      "project": null,
      "created_at": "2025-08-18T12:37:46.827186Z",
      "updated_at": "2025-08-18T12:40:48.094931Z",
      "custom_fields": {},
      "ownership": null,
      "name": "demo-basic-config",
      "entity_id": "audit_config-QDCphLWg1JYKUHZwngFfgm",
      "system": {
        "verbose": 0,
        "narrow_output": false,
        "parallel_requests": false,
        "parallel_attempts": 20,
        "lite": true,
        "show_z": false,
        "enable_experimental": false
      },
      "run": {
        "seed": null,
        "deprefix": true,
        "eval_threshold": 0.5,
        "generations": 5,
        "probe_tags": null,
        "user_agent": "garak/{version} (LLM vulnerability scanner https://garak.ai)"
      },
      "plugins": {
        "model_type": null,
        "model_name": null,
        "probe_spec": "dan.AutoDANCached,goodside.Tag",
        "detector_spec": "auto",
        "extended_detectors": false,
        "buff_spec": null,
        "buffs_include_original_prompt": false,
        "buff_max": null,
        "detectors": {},
        "generators": {},
        "buffs": {},
        "harnesses": {},
        "probes": {}
      },
      "reporting": {
        "report_prefix": "run1",
        "taxonomy": null,
        "report_dir": "garak_runs",
        "show_100_pass_modules": true
      }
    },
    {
      "schema_version": "1.0",
      "id": "audit_config-CJU4XynA45g5dFDB4YBN5K",
      "description": "Updated description",
      "type_prefix": null,
      "namespace": "default",
      "project": null,
      "created_at": "2025-08-18T12:37:46.827186Z",
      "updated_at": "2025-08-18T12:37:46.827186Z",
      "custom_fields": {},
      "ownership": null,
      "name": "demo-basic-config",
      "entity_id": "audit_config-QDCphLWg1JYKUHZwngFfgm",
      "system": {
        "verbose": 0,
        "narrow_output": false,
        "parallel_requests": false,
        "parallel_attempts": 10,
        "lite": false,
        "show_z": false,
        "enable_experimental": false
      },
      "run": {
        "seed": null,
        "deprefix": true,
        "eval_threshold": 0.5,
        "generations": 5,
        "probe_tags": null,
        "user_agent": "garak/{version} (LLM vulnerability scanner https://garak.ai)"
      },
      "plugins": {
        "model_type": null,
        "model_name": null,
        "probe_spec": "ansiescape",
        "detector_spec": "auto",
        "extended_detectors": false,
        "buff_spec": null,
        "buffs_include_original_prompt": false,
        "buff_max": null,
        "detectors": {},
        "generators": {},
        "buffs": {},
        "harnesses": {},
        "probes": {}
      },
      "reporting": {
        "report_prefix": "run1",
        "taxonomy": null,
        "report_dir": "garak_runs",
        "show_100_pass_modules": true
      }
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 100,
    "current_page_size": 5,
    "total_pages": 1,
    "total_results": 5
  },
  "sort": "created_at",
  "filter": {
    "ownership": null
  }
}