java.lang.Object
org.gcube.informationsystem.resourceregistry.rest.base.BaseRest
org.gcube.informationsystem.resourceregistry.rest.admin.AdminSystemManager

@Path("admin/system") public class AdminSystemManager extends BaseRest
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 Details

    • DUMP_METHOD

      public static final String DUMP_METHOD
      Accounting method name for the System Dump operation.
      See Also:
    • RESTORE_METHOD

      public static final String RESTORE_METHOD
      Accounting method name for the System Restore operation.
      See Also:
  • Constructor Details

    • AdminSystemManager

      public AdminSystemManager()
      Creates a new AdminSystemManager REST resource.
  • Method Details

    • dump

      @GET @Path("dump") @Produces("application/zip") public jakarta.ws.rs.core.Response dump() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Streams 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 by dump()), recreating the entire Resource Registry state.
      Parameters:
      requestBody - the ZIP archive stream
      Returns:
      JAX-RS Response with status 204 No Content
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the archive is malformed or any collection cannot be restored