compliance.go (package eai)
Source: sdks/go/compliance.go. Back to the Go SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class ComplianceService
ComplianceService groups the endpoints of: Navin Enterprise Compliance & Audit Agent instances, activation and lifecycle owned by the Control Plane (ADR-0177 section 8), the same model as RagAgentService.
ComplianceService.Backup
Backup(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Back up an instance (not supported). Answers 501 compliance_backup_not_supported with parts and the reason of each one: the compliance runtime has no admin route to export the compliance schema rows of an instance, the knowledge domain has no export of a knowledge base. Nothing is pretended; the refusal is audited.
Route: /v1/compliance/instances/{instance_id}/backup (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Back up an instance (not supported)". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Check
Check(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Validate an instance. Real checks before provisioning: the project exists and the caller may administer it, the generation model exists in the registry with the chat capability and a usable status, the embedding model resolves in the Model Gateway (capability embeddings), the quota of instances, Qdrant answers, the shared runtime answers (shared model) or the Navin Manager answers (dedicated model, an unpublished catalog service is a warning). From draft or after a failed validation. 200 with validation and status draft; 422 compliance_validation_failed with the failed checks (status failed, step validation). Audited as compliance.validate and compliance.validate.completed.
Route: /v1/compliance/instances/{instance_id}/validate (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Validate an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Create
Create(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)
Create a draft Compliance & Audit Agent instance. Creates the activation record in draft (201) with its immutable id (given, for example the id chosen by the compliance runtime, or generated), its sector and its pack. Needs a tenant administrator or an owner of the project (403 forbidden); unknown project: 404 compliance_project_not_found; a name or an id already used: 409 conflict. With Idempotency-Key a retry replays the first answer. Audited as compliance.create.
Route: /v1/compliance/instances (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
body | any | yes | Name, project, organization and business unit, sector and pack, deployment model, generation and embedding models of the registry, optional version. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a draft Compliance & Audit Agent instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Delete
Delete(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Delete an instance. Long operation (202, status deleting then deleted) from draft, stopped or failed (a ready instance is stopped first, else 409). Removes only what the instance owns, as recorded in resources: its knowledge base and its Qdrant points, the objects under its storage prefix, its agent memories and memory policy, its tuples, API key and secret, its agent; the governed application is retired. The shared runtime, a shared database, the Qdrant collection shared by the tenant knowledge bases and the storage profile are kept. Each step lists deleted and kept. Audited as compliance.delete and compliance.delete.completed.
Route: /v1/compliance/instances/{instance_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.DeleteLogo
DeleteLogo(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Remove the logo of an instance. Back to the default logo of the runtime: the branding no longer points to an object, version is incremented and the stored object is removed. Without a logo, answers the branding unchanged. Same rights as the PUT; audited as compliance.branding.logo.remove.
Route: /v1/compliance/instances/{instance_id}/branding/logo (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Remove the logo of an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Get
Get(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Read a Compliance & Audit Agent instance. The activation record with serving (true for ready and degraded), sector, pack, the current operation and run, validation, last_error and the steps of the current run in order (state, attempts, detail, logs, times). This is the route the compliance runtime reads at startup and on demand.
Route: /v1/compliance/instances/{instance_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance, the same in the Control Plane and in the compliance runtime. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a Compliance & Audit Agent instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.GetBranding
GetBranding(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Read the branding of an instance. The branding chosen in the activation journey, owned by the Control Plane: agent_name, sidebar_color, navbar_color, the text colours computed for them (sidebar_text_color, navbar_text_color, black or white, contrast 4.5:1 or more), logo (content_type, sha256, size_bytes, url) or null, version, updated_at, and app_url (the URL of the web application once known). A null field means the default of the runtime. The compliance runtime keeps a replica of it for its public login page and rewrites it when version is newer. Any principal of the tenant; another tenant's instance answers 404.
Route: /v1/compliance/instances/{instance_id}/branding (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the branding of an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.GetLogo
GetLogo(ctx context.Context, instanceID string, opts ...CallOption) ([]byte, error)
Read the logo of an instance. The logo bytes, read from the storage domain and checked against the recorded sha256, with the Content-Type of the validated format (image/png or image/jpeg), X-Content-Type-Options: nosniff, a Content-Security-Policy starting with default-src 'none' and an ETag. 404 compliance_logo_not_found when the instance has no logo. Any principal of the tenant.
Route: /v1/compliance/instances/{instance_id}/branding/logo (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: ([]byte, error). Decoded JSON answer of the operation "Read the logo of an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Health
Health(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Health of an instance. Real checks: readiness URL of the runtime (GET /readyz), knowledge base (row, vector store qdrant, Qdrant /readyz) and model gateway (generation and embedding models in the registry, usable). status is up, degraded or down (runtime down); instance_status is the lifecycle status. Each check has status, duration_ms and reason when not up.
Route: /v1/compliance/instances/{instance_id}/health (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Health of an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.List
List(ctx context.Context, opts ...CallOption) (json.RawMessage, error)
List the Compliance & Audit Agent instances. Activation records of the tenant, newest first, with status, sector, pack, deployment model, versions and owned resources (one page, next_cursor null). Filters: status, project, sector.
Route: /v1/compliance/instances (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the Compliance & Audit Agent instances". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Provision
Provision(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Provision an instance. Long operation (202, Operation-Id): status provisioning then starting, steps from validation to activation run by the worker. From a validated draft (else 409 compliance_not_validated) or after a failed provisioning, which resumes from the failed step. Repeated while provisioning or once ready: changed: false. Audited as compliance.provision, each step as compliance.step.
Route: /v1/compliance/instances/{instance_id}/provision (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Provision an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Restart
Restart(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Restart an instance. Long operation (202): from ready, degraded, stopped or after a failed restart, steps deployment (Navin Manager restart for a dedicated instance), health, smoke, activation. A restart in progress: changed: false.
Route: /v1/compliance/instances/{instance_id}/restart (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Restart an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Restore
Restore(ctx context.Context, instanceID string, backupID string, opts ...CallOption) (json.RawMessage, error)
Restore an instance (not supported). Answers 501 compliance_backup_not_supported with the same parts as the backup: no backup of an instance can be made for real yet. Audited.
Route: /v1/compliance/instances/{instance_id}/restore (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
backupID | string | yes | Identifier of the backup to restore. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Restore an instance (not supported)". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Start
Start(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Start an instance. Long operation (202): from stopped (or after a failed start or stop), steps deployment (Navin Manager start for a dedicated instance, status only for a shared one), health, smoke, activation (governed application active). Already starting or ready: changed: false.
Route: /v1/compliance/instances/{instance_id}/start (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Start an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Stop
Stop(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)
Stop an instance. Long operation (202): from ready, degraded or after a failed start, restart, upgrade or stop, steps deployment (Navin Manager stop for a dedicated instance, status only for a shared one) and activation (governed application suspended, reason compliance_instance_stopped); status stopped. Already stopping or stopped: changed: false.
Route: /v1/compliance/instances/{instance_id}/stop (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Stop an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.UpdateBranding
UpdateBranding(ctx context.Context, instanceID string, body any, opts ...CallOption) (json.RawMessage, error)
Change the branding of an instance. Writes the fields given (an absent field is kept, null brings it back to the default of the runtime) and answers the branding. Colours are #RRGGBB (stored in upper case); the text drawn on them is black or white, whichever contrasts most (WCAG 2.2 relative luminance), and a colour whose text would stay under 4.5:1 answers 422 compliance_branding_contrast. app_url must be an https URL without credentials (422 compliance_app_url_invalid). A change of the name, the colours or the logo increments version; expected_version different from the current one answers 409 compliance_branding_version_conflict. With an Idempotency-Key, a retry with the same body replays the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Needs a tenant administrator or an owner of the project (403 forbidden); refused while the instance is deleting or deleted (409). Audited as compliance.branding.update.
Route: /v1/compliance/instances/{instance_id}/branding (PUT).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
body | any | yes | The branding fields to write. | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change the branding of an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.Upgrade
Upgrade(ctx context.Context, instanceID string, version string, opts ...CallOption) (json.RawMessage, error)
Upgrade an instance. Long operation (202), status updating: a shared instance follows the shared runtime, so the deployment step reads the version of the runtime in its OpenAPI document (GET /api/v1/compliance/openapi.json) and checks that it is the requested one (else shared_runtime_version_mismatch); a dedicated one is reinstalled by the Navin Manager. Then health, smoke, activation; deployed_version becomes the version. The same version already deployed or in progress: changed: false.
Route: /v1/compliance/instances/{instance_id}/upgrade (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
version | string | yes | Version to deploy (letters, digits, ., _, +, -, up to 64 characters). | |
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Upgrade an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).
ComplianceService.UploadLogo
UploadLogo(ctx context.Context, instanceID string, logo LogoUpload, opts ...CallOption) (json.RawMessage, error)
Upload the logo of an instance. Multipart file (with the optional text fields filename and mime_type). PNG or JPEG only: SVG and any other format are refused. The real signature, the declared Content-Type and the file extension must match; 32 to 1024 pixels a side, 512 KiB at most; else 422 compliance_logo_invalid with details.reason (format_not_allowed, signature_invalid, signature_mismatch, extension_mismatch, dimensions_out_of_bounds, too_large, empty). The file is then scanned by the file security domain, fail closed: a blocked file answers 422 file_blocked, a scanner down 503 file_scan_unavailable. It is stored through the storage domain in the documents storage profile of the tenant under compliance-agent/<tenant>/<instance>/branding/ (409 compliance_branding_storage_required without such a profile, 503 compliance_branding_storage_unavailable when it cannot be reached); the replaced object is removed. Increments version and answers the branding. Same rights as the PUT; audited as compliance.branding.logo.update (a refusal is audited as a denial).
Route: /v1/compliance/instances/{instance_id}/branding/logo (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ctx | context.Context | yes | Context of the call: cancellation and deadline. | |
instanceID | string | yes | Identifier (UUID) of the instance. | |
logo | LogoUpload | yes | ||
opts | ...CallOption | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Upload the logo of an instance". The error is a typed error of the SDK, nil on success.
Raises: error, the typed errors of the transport (Errors).