code: public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, File directory) throws GitLabApiException {
  
          Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD,
                  "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
          try {
  
              if (directory == null)
                  directory = new File(System.getProperty("java.io.tmpdir"));
  
              String filename = "job-" + jobId + "-artifacts.zip";
              File file = new File(directory, filename);
  
              InputStream in = response.readEntity(InputStream.class);
              Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
              return (file);
  
          } catch (IOException ioe) {
              throw new GitLabApiException(ioe);
          }
      }
docs: Download the job artifacts file for the specified job ID.  The artifacts file will be saved in the
  specified directory with the following name pattern: job-{jobid}-artifacts.zip.  If the file already
  exists in the directory it will be overwritten.
  
  <pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id/artifacts</code></pre>
  
  @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
  @param jobId the job ID to get the artifacts for
  @param directory the File instance of the directory to save the file to, if null will use "java.io.tmpdir"
  @return a File instance pointing to the download of the specified job artifacts file
  @throws GitLabApiException if any exception occurs