Skip to content

Archive a project

Request

Archives a project. Archive is IRREVOCABLE. The operation runs asynchronously: it deletes codebase files and Lucene indexes from the scanner filesystem, then atomically changes the project status to Archived. All inventory, evidence, scan history, reports, and exports are preserved in the database. Archived projects become fully read-only all modification APIs are blocked except DELETE. Only Project Administrators can archive projects. Pre-conditions: no active scans, copies, imports, exports or branching jobs on the project or its children.

Security
bearerAuth
Path
projectIdinteger, (int64), >= 1required

ID of the project to archive

Example:1
Query
archiveChildProjectsboolean

If true, all first-level child projects will also be archived (FR-18)

Default:false
commentsstringrequired

Mandatory reason/comments for archiving. Also displayed in the audit trail (FR-15, FR-16).

curl -i -X POST \
  'https://codeinsightapi.redocly.app/_mock/swagger/projects/1/archive?archiveChildProjects=false&comments=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Accepted - archive task has been scheduled