Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
812a2c19
Commit
812a2c19
authored
Dec 05, 2017
by
Travis Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add project export API documentation
parent
ec2e54b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
0 deletions
+78
-0
doc/api/project_import_export.md
doc/api/project_import_export.md
+78
-0
No files found.
doc/api/project_import_export.md
View file @
812a2c19
...
...
@@ -4,6 +4,84 @@
[
See also the project import/export documentation
](
../user/project/settings/import_export.md
)
## Export start
Start a new export.
```
http
POST /projects/:id/export
```
| Attribute | Type | Required | Description |
| --------- | -------------- | -------- | ---------------------------------------- |
|
`id`
| integer/string | yes | The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user |
```
console
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/export
```
```
json
{
"message"
:
"202 Accepted"
}
```
## Export status
Get the status of export.
```
http
GET /projects/:id/export
```
| Attribute | Type | Required | Description |
| --------- | -------------- | -------- | ---------------------------------------- |
|
`id`
| integer/string | yes | The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user |
```
console
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/export
```
Status can be one of
`none`
,
`started`
, or
`finished`
.
```
json
{
"id"
:
1
,
"description"
:
"Itaque perspiciatis minima aspernatur corporis consequatur."
,
"name"
:
"Gitlab Test"
,
"name_with_namespace"
:
"Gitlab Org / Gitlab Test"
,
"path"
:
"gitlab-test"
,
"path_with_namespace"
:
"gitlab-org/gitlab-test"
,
"created_at"
:
"2017-08-29T04:36:44.383Z"
,
"export_status"
:
"finished"
,
"_links"
:
{
"api_url"
:
"https://gitlab.example.com/api/v4/projects/1/export/download"
,
"web_url"
:
"https://gitlab.example.com/gitlab-org/gitlab-test/download_export"
,
}
}
```
## Export download
Download the finished export.
```
http
GET /projects/:id/export
```
| Attribute | Type | Required | Description |
| --------- | -------------- | -------- | ---------------------------------------- |
|
`id`
| integer/string | yes | The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user |
```
console
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --remote-header-name --remote-name https://gitlab.example.com/api/v4/projects/5/export/download
```
```
console
ls *export.tar.gz
2017-12-05_22-11-148_namespace_project_export.tar.gz
```
## Import a file
```
http
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment