Import a project from QCP file

Description

Creates a new project from QCP file and retrieves project properties.

URL

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

HTTP Method

POST

Remarks

To import a project from a QCP file, POST the QCP file with the content-type: multipart/form-data header, the body of the request can have these parts:

FieldDescription
name

Required.

Name of the project.

db-server-name

Required.

Name of the server where the project database is located.

db-type

Required.

Type of the project database.

tablespace

Required for Oracle database.

Tablespace where the project is created.

temp-tablespace

Required for Oracle database.

Temporary tablespace where the project is created.

skip-lab-projects-validation

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 import.

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

file-name

Required.

Name of the .qcp file.

Content-Type: multipart/form-data

Accept: application/xml, application/json

Returns

On success, the HTTP return value is 201.

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

Input Example

Header:

Content-Type: multipart/form-data; boundary=--exampleboundary

 

Data:

--exampleboundary,

Content-Disposition: form-data; name="name"

 

ImportProject

--exampleboundary--

Content-Disposition: form-data; name="db-server-name"

 

SQLDB_Server

--exampleboundary--

Content-Disposition: form-data; name="db-type"

 

3

--exampleboundary--

 

Content-Disposition: form-data; name="tablespace"

 

Tablespace

--exampleboundary--

 

Content-Disposition: form-data; name="temp-tablespace"

 

TEMP

--exampleboundary--

 

Content-Disposition: form-data; name="file-name"; filename="C:\ALM_Project.qcp"

 

[Content of file]

 

--exampleboundary--

Return Value Example

Accept: application/json

{

  "project": {

    "domain-name": "DEFAULT",

    "create-from-domain": "TEMPLATES",

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

    "description": "Created on 7/24/2019 12:06:09 PM",

    "db-server-name": "SQLDB_Server",

    "uid": "642e6eac-23ae-41e9-973d-81d900796606",

    "id": 3,

    "users-quota": -1,

    "domain-id": 1,

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

    "is-active": false,

    "is-unicode": false,

    "db-name": "default_importproject_db",

    "version": "12.50",

    "search-language": "English",

    "project-type": "Standard",

    "is-template": false,

    "exception-file": "",

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

    "db-type": 2,

    "name": "ImportProject",

    "physical-directory": "C:\\ProgramData\\Micro Focus\\ALM\\Repository\\qc\\Default\\ImportProject\\",

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

    "create-from-project": "Empty Database",

    "has-vcs-db": false

  }

}