project_import

Import project resources

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.

post/api/v4/projects/import-relation

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Request body multipart/form-data

pathstring required

The project path and name

filestring binary required

The project export file from which to extract the relation.

relationstring required

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

file.pathstring

Path to locally stored body (generated by Workhorse)

file.namestring

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

file.typestring

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

file.sizeinteger

Real size of file (generated by Workhorse)

file.md5string

MD5 checksum of the file (generated by Workhorse)

file.sha1string

SHA1 checksum of the file (generated by Workhorse)

file.sha256string

SHA256 checksum of the file (generated by Workhorse)

file.etagstring

Etag of the file (generated by Workhorse)

file.remote_idstring

Remote_id of the file (generated by Workhorse)

file.remote_urlstring

Remote_url of the file (generated by Workhorse)

Response

Import project resources

idinteger required
project_pathstring required
relationstring required
statusstring required
created_atstring date-time required
updated_atstring date-time required

Example response

{
  "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"
}

Changes

No recorded changes to this operation across all 5 revisions of this API.