code: public Archive startArchive(String sessionId, ArchiveProperties properties) throws OpenTokException {
          if (sessionId == null || sessionId == "") {
              throw new InvalidArgumentException("Session not valid");
          }
          Boolean hasResolution =  properties != null && properties.resolution() != null && !properties.resolution().isEmpty();
          if(properties != null && properties.outputMode().equals(Archive.OutputMode.INDIVIDUAL) && hasResolution) {
              throw new InvalidArgumentException("The resolution cannot be specified for individual output mode.");
          }
          // TODO: do validation on sessionId and name
          String archive = this.client.startArchive(sessionId, properties);
          try {
              return archiveReader.readValue(archive);
          } catch (Exception e) {
              throw new RequestException("Exception mapping json: " + e.getMessage());
          }
      }
docs: Starts archiving an OpenTok session. This version of the <code>startArchive()</code> method
  lets you disable audio or video recording.
  <p>
  Clients must be actively connected to the OpenTok session for you to successfully start
  recording an archive.
  <p>
  You can only record one archive at a time for a given session. You can only record archives
  of sessions that use the OpenTok Media Router (sessions with the
  <a href="https://tokbox.com/developer/guides/create-session/#media-mode">media mode</a>
  set to routed); you cannot archive sessions with the media mode set to relayed.
  <p>
  For more information on archiving, see the
  <a href="https://tokbox.com/developer/guides//archiving/">OpenTok archiving</a>
  developer guide.
  
  @param sessionId The session ID of the OpenTok session to archive.
  
  @param properties This ArchiveProperties object defines options for the archive.
  
  @return The Archive object. This object includes properties defining the archive, including the archive ID.