Skip to content

Commit e650cf1

Browse files
Add archiveProject (#393)
* Add archiveProject https://docs.atlassian.com/software/jira/docs/api/REST/7.9.0/#api/2/project-archiveProject * Update ProjectService.php
1 parent 56191e4 commit e650cf1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/Project/ProjectService.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,4 +357,27 @@ public function deleteProject($projectIdOrKey)
357357

358358
return $ret;
359359
}
360+
361+
/**
362+
* Archive a project only available for premium subscription
363+
*
364+
* @param string $projectIdOrKey
365+
*
366+
* @throws JiraException
367+
*
368+
* @return string response status
369+
*
370+
* STATUS 401 Returned if the user is not logged in.
371+
* STATUS 204 - application/json Returned if the project is successfully archived.
372+
* STATUS 403 - Returned if the currently authenticated user does not have permission to archive the project.
373+
* STATUS 404 - Returned if the project does not exist.
374+
* STATUS 405 - Method not allowed specified request HTTP method was received and recognized by the server, but is not supported by the target resource.
375+
*/
376+
public function archiveProject($projectIdOrKey)
377+
{
378+
$ret = $this->exec($this->uri . '/' . $projectIdOrKey . '/archive', null, 'PUT');
379+
380+
return $ret;
381+
}
382+
360383
}

0 commit comments

Comments
 (0)