Skip to main content

io.enterpriseai.resources.StorageClient

Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/StorageClient.java. Back to the Java SDK reference index.

note

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 StorageClient​

Storage profiles: S3-compatible targets, checks and presigned URLs.

Constructor StorageClient​

StorageClient(Transport transport)

Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.

NameTypeDefaultRequiredDescription
transportTransportyesTransport shared by the sub-clients of one client.

StorageClient.createProfile​

JsonNode createProfile(Object body)

Create a storage profile. Creates a profile with status unverified and answers 201. Requires tenant_admin for scope tenant (inside a tenant) or platform_admin for scope platform (403 storage_scope_forbidden), and the policy decision storage.profile.create. Audited (storage.profile.create).

Route: /v1/storage/profiles (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesThe new storage profile. Unknown fields are refused.

Returns: JsonNode. Decoded JSON answer of the operation "Create a storage profile".

Raises: the typed errors of the transport (Errors).

StorageClient.createProfile​

JsonNode createProfile(Object body, RequestOptions options)

Create a storage profile. Creates a profile with status unverified and answers 201. Requires tenant_admin for scope tenant (inside a tenant) or platform_admin for scope platform (403 storage_scope_forbidden), and the policy decision storage.profile.create. Audited (storage.profile.create).

Route: /v1/storage/profiles (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesThe new storage profile. Unknown fields are refused.
optionsRequestOptionsyesProvider options: path_style (path style addressing for S3) and storage_class. Any other key is refused.

Returns: JsonNode. Decoded JSON answer of the operation "Create a storage profile".

Raises: the typed errors of the transport (Errors).

StorageClient.deleteObject​

JsonNode deleteObject(String profileId, Object body)

Delete an object of a profile. Deletes one object (or one version of it) inside the presign prefixes of the profile. A profile serving audit_worm or evidence never deletes through the API (409 storage_object_protected); a retention refusal of the backend is returned as is. Requires tenant_admin, developer or agent (platform profile: platform_admin) and the policy decision storage.object.delete; audited with the full key and version. Other errors: 403 storage_key_out_of_scope, 422 storage_key_invalid, 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/objects/delete (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
bodyObjectyesKey, and optionally version, of the object to delete.

Returns: JsonNode. Decoded JSON answer of the operation "Delete an object of a profile".

Raises: the typed errors of the transport (Errors).

StorageClient.deleteObject​

JsonNode deleteObject(String profileId, Object body, RequestOptions options)

Delete an object of a profile. Deletes one object (or one version of it) inside the presign prefixes of the profile. A profile serving audit_worm or evidence never deletes through the API (409 storage_object_protected); a retention refusal of the backend is returned as is. Requires tenant_admin, developer or agent (platform profile: platform_admin) and the policy decision storage.object.delete; audited with the full key and version. Other errors: 403 storage_key_out_of_scope, 422 storage_key_invalid, 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/objects/delete (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
bodyObjectyesKey, and optionally version, of the object to delete.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Delete an object of a profile".

Raises: the typed errors of the transport (Errors).

StorageClient.deleteProfile​

JsonNode deleteProfile(String profileId)

Delete a storage profile. Deletes the profile (the bucket and its objects are not touched) and answers 204. Requires tenant_admin for a tenant profile, platform_admin for a platform profile (403 storage_scope_forbidden), and the policy decision storage.profile.delete. The audit event storage.profile.delete records the provider, bucket and the number of audit exports that used it. Unknown id: 404 storage_profile_not_found.

Route: /v1/storage/profiles/{profile_id} (DELETE).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.

Returns: JsonNode. Decoded JSON answer of the operation "Delete a storage profile".

Raises: the typed errors of the transport (Errors).

StorageClient.deleteProfile​

JsonNode deleteProfile(String profileId, RequestOptions options)

Delete a storage profile. Deletes the profile (the bucket and its objects are not touched) and answers 204. Requires tenant_admin for a tenant profile, platform_admin for a platform profile (403 storage_scope_forbidden), and the policy decision storage.profile.delete. The audit event storage.profile.delete records the provider, bucket and the number of audit exports that used it. Unknown id: 404 storage_profile_not_found.

Route: /v1/storage/profiles/{profile_id} (DELETE).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Delete a storage profile".

Raises: the typed errors of the transport (Errors).

StorageClient.getProfile​

JsonNode getProfile(String profileId)

Get a storage profile. One storage profile with its status, discovered capabilities, verification time, missing and needed capabilities and last error. Never a secret value. Same readers as the list. Unknown id: 404 storage_profile_not_found.

Route: /v1/storage/profiles/{profile_id} (GET).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.

Returns: JsonNode. Decoded JSON answer of the operation "Get a storage profile".

Raises: the typed errors of the transport (Errors).

StorageClient.listObjects​

JsonNode listObjects(String profileId)

List the objects of a profile. Objects stored under a prefix inside the presign prefixes of the profile: key relative to the profile key prefix (usable with presign and delete), stored key, size, ETag, content type, SHA-256, version, last modification and storage class. Requires tenant_admin, developer, agent or auditor (platform profile: platform_admin) and the policy decision storage.object.list; the listing is audited. Errors: 422 storage_prefix_required when prefix is omitted and the profile has not exactly one presign prefix, 403 storage_key_out_of_scope outside the presign prefixes, 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/objects (GET).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.

Returns: JsonNode. Decoded JSON answer of the operation "List the objects of a profile".

Raises: the typed errors of the transport (Errors).

StorageClient.listObjects​

JsonNode listObjects(String profileId, Map<String, ?> query)

List the objects of a profile. Objects stored under a prefix inside the presign prefixes of the profile: key relative to the profile key prefix (usable with presign and delete), stored key, size, ETag, content type, SHA-256, version, last modification and storage class. Requires tenant_admin, developer, agent or auditor (platform profile: platform_admin) and the policy decision storage.object.list; the listing is audited. Errors: 422 storage_prefix_required when prefix is omitted and the profile has not exactly one presign prefix, 403 storage_key_out_of_scope outside the presign prefixes, 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/objects (GET).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
queryMap<String, ?>yesQuery string parameters of the route.

Returns: JsonNode. Decoded JSON answer of the operation "List the objects of a profile".

Raises: the typed errors of the transport (Errors).

StorageClient.listProfiles​

JsonNode listProfiles()

List the storage profiles. Storage profiles visible to the caller, ordered by scope then name, each with its needed_capabilities (required capabilities plus those its purposes need). One page only: next_cursor is always null. Requires platform_admin, or a tenant principal with tenant_admin, security_officer, developer or auditor.

Route: /v1/storage/profiles (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "List the storage profiles".

Raises: the typed errors of the transport (Errors).

StorageClient.listProfiles​

JsonNode listProfiles(Map<String, ?> query)

List the storage profiles. Storage profiles visible to the caller, ordered by scope then name, each with its needed_capabilities (required capabilities plus those its purposes need). One page only: next_cursor is always null. Requires platform_admin, or a tenant principal with tenant_admin, security_officer, developer or auditor.

Route: /v1/storage/profiles (GET).

NameTypeDefaultRequiredDescription
queryMap<String, ?>yesQuery string parameters of the route.

Returns: JsonNode. Decoded JSON answer of the operation "List the storage profiles".

Raises: the typed errors of the transport (Errors).

StorageClient.presign​

JsonNode presign(String profileId, Object body)

Issue a presigned URL. Issues a presigned URL to read (GET) or write (PUT) one object directly in the bucket, and answers 201 with the grant id, URL, method, full key, lifetime and expiry. The key must be inside the presign prefixes (403 storage_key_out_of_scope) and the profile must have a verified, recent presign capability (409 storage_capability_missing). The lifetime may not exceed EAI_STORAGE_PRESIGN_MAX_SECONDS (3600 by default, never more than 604800; 422 storage_presign_expiry_invalid). Requires tenant_admin, developer or agent (platform profile: platform_admin) and the policy decision storage.presign.read or storage.presign.write. The grant is recorded with a SHA-256 of the URL (never the URL itself) and audited.

Route: /v1/storage/profiles/{profile_id}/presign (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
bodyObjectyesObject, direction and lifetime of the presigned URL.

Returns: JsonNode. Decoded JSON answer of the operation "Issue a presigned URL".

Raises: the typed errors of the transport (Errors).

StorageClient.presign​

JsonNode presign(String profileId, Object body, RequestOptions options)

Issue a presigned URL. Issues a presigned URL to read (GET) or write (PUT) one object directly in the bucket, and answers 201 with the grant id, URL, method, full key, lifetime and expiry. The key must be inside the presign prefixes (403 storage_key_out_of_scope) and the profile must have a verified, recent presign capability (409 storage_capability_missing). The lifetime may not exceed EAI_STORAGE_PRESIGN_MAX_SECONDS (3600 by default, never more than 604800; 422 storage_presign_expiry_invalid). Requires tenant_admin, developer or agent (platform profile: platform_admin) and the policy decision storage.presign.read or storage.presign.write. The grant is recorded with a SHA-256 of the URL (never the URL itself) and audited.

Route: /v1/storage/profiles/{profile_id}/presign (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
bodyObjectyesObject, direction and lifetime of the presigned URL.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Issue a presigned URL".

Raises: the typed errors of the transport (Errors).

StorageClient.profileChecks​

JsonNode profileChecks(String profileId)

List the verifications of a profile. History of the capability verifications of the profile, newest first: status, capabilities found, missing capabilities, whether a write probe ran, error, duration in milliseconds and who ran it. One page only (next_cursor is always null). Same readers as the list.

Route: /v1/storage/profiles/{profile_id}/checks (GET).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.

Returns: JsonNode. Decoded JSON answer of the operation "List the verifications of a profile".

Raises: the typed errors of the transport (Errors).

StorageClient.profileChecks​

JsonNode profileChecks(String profileId, Map<String, ?> query)

List the verifications of a profile. History of the capability verifications of the profile, newest first: status, capabilities found, missing capabilities, whether a write probe ran, error, duration in milliseconds and who ran it. One page only (next_cursor is always null). Same readers as the list.

Route: /v1/storage/profiles/{profile_id}/checks (GET).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
queryMap<String, ?>yesQuery string parameters of the route.

Returns: JsonNode. Decoded JSON answer of the operation "List the verifications of a profile".

Raises: the typed errors of the transport (Errors).

StorageClient.updateProfile​

JsonNode updateProfile(String profileId, Object body)

Update a storage profile. Changes the given fields; the merged profile is validated like a new one. A change of provider, endpoint, region, bucket, auth, credential_ref, encryption or options clears the capabilities and sets the status back to unverified; status: disabled disables the profile, status: active on a disabled profile makes it unverified. Adding the purpose audit_worm without such a change requires a verified object lock capability (409 storage_capability_missing). Requires tenant_admin (platform profile: platform_admin) and the policy decision storage.profile.update; audited with the changed fields.

Route: /v1/storage/profiles/{profile_id} (PATCH).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
bodyObjectyesFields to change; omitted fields keep their value.

Returns: JsonNode. Decoded JSON answer of the operation "Update a storage profile".

Raises: the typed errors of the transport (Errors).

StorageClient.updateProfile​

JsonNode updateProfile(String profileId, Object body, RequestOptions options)

Update a storage profile. Changes the given fields; the merged profile is validated like a new one. A change of provider, endpoint, region, bucket, auth, credential_ref, encryption or options clears the capabilities and sets the status back to unverified; status: disabled disables the profile, status: active on a disabled profile makes it unverified. Adding the purpose audit_worm without such a change requires a verified object lock capability (409 storage_capability_missing). Requires tenant_admin (platform profile: platform_admin) and the policy decision storage.profile.update; audited with the changed fields.

Route: /v1/storage/profiles/{profile_id} (PATCH).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
bodyObjectyesFields to change; omitted fields keep their value.
optionsRequestOptionsyesNew provider options (path_style, storage_class). Changing them clears the capabilities.

Returns: JsonNode. Decoded JSON answer of the operation "Update a storage profile".

Raises: the typed errors of the transport (Errors).

StorageClient.verifyProfile​

JsonNode verifyProfile(String profileId, Object body)

Verify the capabilities of a profile. Discovers the capabilities of the bucket by real calls and stores them. Requires tenant_admin or security_officer (platform profile: platform_admin) and the policy decision storage.profile.verify. A disabled profile answers 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/verify (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
bodyObjectyesVerification options; the body may be omitted.

Returns: JsonNode. Decoded JSON answer of the operation "Verify the capabilities of a profile".

Raises: the typed errors of the transport (Errors).

StorageClient.verifyProfile​

JsonNode verifyProfile(String profileId, Object body, RequestOptions options)

Verify the capabilities of a profile. Discovers the capabilities of the bucket by real calls and stores them. Requires tenant_admin or security_officer (platform profile: platform_admin) and the policy decision storage.profile.verify. A disabled profile answers 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/verify (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
bodyObjectyesVerification options; the body may be omitted.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Verify the capabilities of a profile".

Raises: the typed errors of the transport (Errors).