Class AdminSystemManager
java.lang.Object
org.gcube.informationsystem.resourceregistry.rest.base.BaseRest
org.gcube.informationsystem.resourceregistry.rest.admin.AdminSystemManager
Global Privileged whole-system operations (System Dump, System Restore).
Segregated under /admin so that API Gateway / WAF network policies can
restrict this surface independently of the standard endpoints. Authorization is
enforced by SystemPolicyEnforcementPoint, not duplicated here.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Responsedump()Streams a complete, unfiltered logical snapshot as a ZIP archive.jakarta.ws.rs.core.Responserestore(InputStream requestBody) Ingests a System Dump ZIP archive (as produced bydump()), recreating the entire Resource Registry state.Methods inherited from class org.gcube.informationsystem.resourceregistry.rest.base.BaseRest
buildResponse, buildResponse, setAccountingMethod, setAccountingMethod
-
Field Details
-
DUMP_METHOD
Accounting method name for the System Dump operation.- See Also:
-
RESTORE_METHOD
Accounting method name for the System Restore operation.- See Also:
-
-
Constructor Details
-
AdminSystemManager
public AdminSystemManager()Creates a newAdminSystemManagerREST resource.
-
-
Method Details
-
dump
@GET @Path("dump") @Produces("application/zip") public jakarta.ws.rs.core.Response dump() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionStreams a complete, unfiltered logical snapshot as a ZIP archive.- Returns:
- the response carrying the streaming ZIP attachment
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if the dump response cannot be prepared
-
restore
@POST @Path("restore") @Consumes("application/zip") public jakarta.ws.rs.core.Response restore(InputStream requestBody) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException Ingests a System Dump ZIP archive (as produced bydump()), recreating the entire Resource Registry state.- Parameters:
requestBody- the ZIP archive stream- Returns:
- JAX-RS
Responsewith status200 OK - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if the archive is malformed or any collection cannot be restored
-