@@ -1853,4 +1853,34 @@ public void unshareProject(Integer projectId, Integer groupId) throws GitLabApiE
18531853 Response .Status expectedStatus = (isApiVersion (ApiVersion .V3 ) ? Response .Status .OK : Response .Status .NO_CONTENT );
18541854 delete (expectedStatus , null , "projects" , projectId , "share" , groupId );
18551855 }
1856+
1857+ /**
1858+ * Archive a project
1859+ *
1860+ * POST /projects/:id/archive
1861+ *
1862+ * @param projectId the ID of the project to archive, required
1863+ * @return the archived GitLab Project
1864+ * @throws GitLabApiException if any exception occurs
1865+ */
1866+ public Project archiveProject (Integer projectId )
1867+ throws GitLabApiException {
1868+ Response response = post (Response .Status .CREATED , (new GitLabApiForm ()), "projects" , projectId , "archive" );
1869+ return (response .readEntity (Project .class ));
1870+ }
1871+
1872+ /**
1873+ * Unarchive a project
1874+ *
1875+ * POST /projects/:id/unarchive
1876+ *
1877+ * @param projectId the ID of the project to unarchive, required
1878+ * @return the unarchived GitLab Project
1879+ * @throws GitLabApiException if any exception occurs
1880+ */
1881+ public Project unarchiveProject (Integer projectId )
1882+ throws GitLabApiException {
1883+ Response response = post (Response .Status .CREATED , (new GitLabApiForm ()), "projects" , projectId , "unarchive" );
1884+ return (response .readEntity (Project .class ));
1885+ }
18561886}
0 commit comments