code: @RequirePOST
      @Restricted(DoNotUse.class) // WebOnly
      public HttpResponse doInstallPlugins(StaplerRequest req) throws IOException {
          Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
          String payload = IOUtils.toString(req.getInputStream(), req.getCharacterEncoding());
          JSONObject request = JSONObject.fromObject(payload);
          JSONArray pluginListJSON = request.getJSONArray("plugins");
          List<String> plugins = new ArrayList<>();
  
          for (int i = 0; i < pluginListJSON.size(); i++) {
              plugins.add(pluginListJSON.getString(i));
          }
  
          UUID correlationId = UUID.randomUUID();
          try {
              boolean dynamicLoad = request.getBoolean("dynamicLoad");
              install(plugins, dynamicLoad, correlationId);
  
              JSONObject responseData = new JSONObject();
              responseData.put("correlationId", correlationId.toString());
  
              return hudson.util.HttpResponses.okJSON(responseData);
          } catch (Exception e) {
              return hudson.util.HttpResponses.errorJSON(e.getMessage());
          }
      }
docs: Installs a list of plugins from a JSON POST.
  @param req The request object.
  @return A JSON response that includes a "correlationId" in the "data" element.
  That "correlationId" can then be used in calls to
  {@link UpdateCenter#doInstallStatus(org.kohsuke.stapler.StaplerRequest)}.
  @throws IOException Error reading JSON payload fro request.