code: public String startBackUp(String repositoryName, String workspaceName, String backupDir) throws IOException,
              BackupExecuteException
     {
        if (workspaceName != null)
        {
           String sURL =
                    path + HTTPBackupAgent.Constants.BASE_URL + HTTPBackupAgent.Constants.OperationType.START_BACKUP
                             + "/" + repositoryName + "/" + workspaceName;
  
           BackupConfigBean bean = new BackupConfigBean(BackupManager.FULL_BACKUP_ONLY, backupDir);
  
           JsonGeneratorImpl generatorImpl = new JsonGeneratorImpl();
           JsonValue json;
           try
           {
              json = generatorImpl.createJsonObject(bean);
           }
           catch (JsonException e)
           {
              throw new BackupExecuteException("Can not get json from  : " + bean.getClass().toString(), e);
           }
  
           BackupAgentResponse response = transport.executePOST(sURL, json.toString());
  
           if (response.getStatus() == Response.Status.OK.getStatusCode())
           {
              return "\nSuccessful : \n" + "\tstatus code = " + response.getStatus() + "\n";
           }
           else
           {
              return failureProcessing(response);
           }
        }
        else
        {
           String sURL =
                    path + HTTPBackupAgent.Constants.BASE_URL
                             + HTTPBackupAgent.Constants.OperationType.START_BACKUP_REPOSITORY + "/" + repositoryName;
  
           BackupConfigBean bean = new BackupConfigBean(BackupManager.FULL_BACKUP_ONLY, backupDir);
  
           JsonGeneratorImpl generatorImpl = new JsonGeneratorImpl();
           JsonValue json;
           try
           {
              json = generatorImpl.createJsonObject(bean);
           }
           catch (JsonException e)
           {
              throw new BackupExecuteException("Can not get json from  : " + bean.getClass().toString(), e);
           }
  
           BackupAgentResponse response = transport.executePOST(sURL, json.toString());
  
           if (response.getStatus() == Response.Status.OK.getStatusCode())
           {
              return "\nSuccessful : \n" + "\tstatus code = " + response.getStatus() + "\n";
           }
           else
           {
              return failureProcessing(response);
           }
        }
     }
docs: {@inheritDoc}