Restore a project

Description

Restores an existing project to a domain.

URL

/qcbin/v2/sa/api/domains/{domain}/projects/restore

HTTP Method

POST

Remarks

To create a project by copying, POST a string compliant with the Project schema reference that contains following fields (the source project should be deactivated):

To restore a project, POST a string compliant with the Project schema reference that contains the following fields. The information can be found in the dbid.xml of the project. For more details, see Restoring Access to Projects.

FieldDescription
name

Required.

Name of the project.

db-type

Required.

Type of the project database.

db-server-name

Required.

Name of the server where the project database is located.

db-name

Required.

Name of the project database.

physical-directory

Required.

The location of the project repository in the file system.

db-connstr-format

Required.

Connection string of the project database server.

db-user-pass

Required.

The password for accessing the database.

skip-lab-projects-validation

(Available from ALM 16.0.1 Patch 2)

Optional. Applicable to projects with the Lab extension enabled.

Controls whether to skip the validation of the relationship between the project you want to restore and the ALM Lab Project.

Valid values are:

  • true. Skips the validation and the timeslot data in the linked ALM Lab Project (if any) is lost during the project restore.

  • false. Goes through the validation. To keep the timeslot data, first restore the ALM Lab Project the current project worked with, and then restore the current project.

Content-Type: application/xml, application/json

Accept: application/xml, application/json

Returns

On success, the HTTP return value is 201.

On success, returns the full data of the restored project in an XML/JSON string compliant with the Project schema reference.

Input Example

Content-Type: application/json

{

  "restore-project": {

     "db-server-name": "mssql-restore",

     "db-name": "restoreprj_db",

     "db-type": 2,

     "name": "Restoreprj",

     "physical-directory": "C:\\ProgramData\\Micro Focus\\ALM\\repository\\qc\\RESROREPROJECT_19\\Restoreprj",

     "db-connstr-format": "jdbc:mercury:sqlserver://database_address:1433",

     "db-user-pass": "QCC:z0Z5aNvQ9ehN/rsRNPDlmg=="

    }

}

Return Value Example

Accept: application/json

{

  "project": {

  "domain-name": "RESTOREPROJECT",

  "create-from-domain": "restored",

  "is-auto-mail-enabled": false,

  "description": "Created on 2019/07/19 16:15:09",

  "db-server-name": "mssql-restore",

  "uid": "f06883bd-b322-450c-adb1-94f1be44d544",

  "id": 34,

  "users-quota": -1,

  "domain-id": 19,

  "is-qpm-auto-calc-enabled": true,

  "is-active": false,

  "is-unicode": false,

  "db-name": "restoreprj_db",

  "version": "15.00",

  "search-language": "English",

  "project-type": "Standard",

  "is-template": false,

  "exception-file": "",

  "is-db-native-auth": false,

  "db-type": 2,

  "name": "Restoreprj",

  "physical-directory": "C:\\ProgramData\\Micro Focus\\ALM\\repository\\qc\\RESTOREPROJECT_19\\Restoreprj\\",

  "db-connstr-format": "jdbc:mercury:sqlserver://database_address:1433",

  "create-from-project": "restored",

  "has-vcs-db": false

 }

}