Skip to content

Import project resources

POST
/api/v4/projects/import-relation

Imports project resources included with a project archive. The type of item to import is controlled by the relation attribute. Skips items that were previously imported. This feature was introduced in GitLab 16.11.

Media type multipart/form-data
object
path
required

The project path and name

string
nullable
file
required

The project export file from which to extract the relation.

string format: binary
nullable
relation
required

The relation to import. Must be one of issues, merge_requests, ci_pipelines, or milestones.

string
nullable
file.path

Path to locally stored body (generated by Workhorse)

string
nullable
file.name

Real filename as sent in Content-Disposition (generated by Workhorse)

string
nullable
file.type

Real content type as send in Content-Type (generated by Workhorse)

string
nullable
file.size

Real size of file (generated by Workhorse)

integer
nullable
file.md5

MD5 checksum of the file (generated by Workhorse)

string
nullable
file.sha1

SHA1 checksum of the file (generated by Workhorse)

string
nullable
file.sha256

SHA256 checksum of the file (generated by Workhorse)

string
nullable
file.etag

Etag of the file (generated by Workhorse)

string
nullable
file.remote_id

Remote_id of the file (generated by Workhorse)

string
nullable
file.remote_url

Remote_url of the file (generated by Workhorse)

string
nullable

Created

Media type application/json
object
id
integer format: int64
project_path
string
relation
string
status
string
created_at
string format: date-time
updated_at
string format: date-time
Example
{
"id": 1,
"project_path": "namespace1/project1",
"relation": "issues",
"status": "pending",
"created_at": "2022-01-31T15:10:45.080Z",
"updated_at": "2022-01-31T15:10:45.080Z"
}

Bad request

Unauthorized

Forbidden

Not found

Service unavailable