Commit 5531d0ee authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs/refactor-api-landing-page' into 'master'

Refactor of API landing page

See merge request gitlab-org/gitlab-ce!25076
parents 2a5de7e0 fb6e59eb
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
> [Introduced][ce-5953] in GitLab 8.12. > [Introduced][ce-5953] in GitLab 8.12.
Checks if your .gitlab-ci.yml file is valid. Checks if your `.gitlab-ci.yml` file is valid.
``` ```
POST /lint POST /lint
......
...@@ -8,7 +8,7 @@ The GitLab Pages feature must be enabled to use these endpoints. Find out more a ...@@ -8,7 +8,7 @@ The GitLab Pages feature must be enabled to use these endpoints. Find out more a
Get a list of all pages domains. The user must have admin permissions. Get a list of all pages domains. The user must have admin permissions.
```http ```text
GET /pages/domains GET /pages/domains
``` ```
...@@ -34,7 +34,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -34,7 +34,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Get a list of project pages domains. The user must have permissions to view pages domains. Get a list of project pages domains. The user must have permissions to view pages domains.
```http ```text
GET /projects/:id/pages/domains GET /projects/:id/pages/domains
``` ```
...@@ -69,7 +69,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -69,7 +69,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Get a single project pages domain. The user must have permissions to view pages domains. Get a single project pages domain. The user must have permissions to view pages domains.
```http ```text
GET /projects/:id/pages/domains/:domain GET /projects/:id/pages/domains/:domain
``` ```
...@@ -110,7 +110,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap ...@@ -110,7 +110,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/ap
Creates a new pages domain. The user must have permissions to create new pages domains. Creates a new pages domain. The user must have permissions to create new pages domains.
```http ```text
POST /projects/:id/pages/domains POST /projects/:id/pages/domains
``` ```
...@@ -146,7 +146,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "domain ...@@ -146,7 +146,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "domain
Updates an existing project pages domain. The user must have permissions to change an existing pages domains. Updates an existing project pages domain. The user must have permissions to change an existing pages domains.
```http ```text
PUT /projects/:id/pages/domains/:domain PUT /projects/:id/pages/domains/:domain
``` ```
...@@ -182,7 +182,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "certifi ...@@ -182,7 +182,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "certifi
Deletes an existing project pages domain. Deletes an existing project pages domain.
```http ```text
DELETE /projects/:id/pages/domains/:domain DELETE /projects/:id/pages/domains/:domain
``` ```
......
# Project import/export API # Project import/export API
[Introduced][ce-41899] in GitLab 10.6 > [Introduced][ce-41899] in GitLab 10.6.
[See also the project import/export documentation](../user/project/settings/import_export.md) See also the [project import/export documentation](../user/project/settings/import_export.md).
## Schedule an export ## Schedule an export
...@@ -16,7 +16,7 @@ data file uploads to the final server. ...@@ -16,7 +16,7 @@ data file uploads to the final server.
If the `upload` params is present, `upload[url]` param is required. If the `upload` params is present, `upload[url]` param is required.
(**Note:** This feature was introduced in GitLab 10.7) (**Note:** This feature was introduced in GitLab 10.7)
```http ```text
POST /projects/:id/export POST /projects/:id/export
``` ```
...@@ -28,8 +28,7 @@ POST /projects/:id/export ...@@ -28,8 +28,7 @@ POST /projects/:id/export
| `upload[url]` | string | yes | The URL to upload the project | | `upload[url]` | string | yes | The URL to upload the project |
| `upload[http_method]` | string | no | The HTTP method to upload the exported project. Only `PUT` and `POST` methods allowed. Default is `PUT` | | `upload[http_method]` | string | no | The HTTP method to upload the exported project. Only `PUT` and `POST` methods allowed. Default is `PUT` |
```sh
```console
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/export \ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/export \
--data "upload[http_method]=PUT" \ --data "upload[http_method]=PUT" \
--data-urlencode "upload[url]=https://example-bucket.s3.eu-west-3.amazonaws.com/backup?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIMBJHN2O62W8IELQ%2F20180312%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20180312T110328Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=8413facb20ff33a49a147a0b4abcff4c8487cc33ee1f7e450c46e8f695569dbd" --data-urlencode "upload[url]=https://example-bucket.s3.eu-west-3.amazonaws.com/backup?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIMBJHN2O62W8IELQ%2F20180312%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20180312T110328Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=8413facb20ff33a49a147a0b4abcff4c8487cc33ee1f7e450c46e8f695569dbd"
...@@ -45,7 +44,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab ...@@ -45,7 +44,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab
Get the status of export. Get the status of export.
```http ```text
GET /projects/:id/export GET /projects/:id/export
``` ```
...@@ -53,7 +52,7 @@ GET /projects/:id/export ...@@ -53,7 +52,7 @@ GET /projects/:id/export
| --------- | -------------- | -------- | ---------------------------------------- | | --------- | -------------- | -------- | ---------------------------------------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```console ```sh
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/export curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/export
``` ```
...@@ -86,7 +85,7 @@ to a web server, etc. ...@@ -86,7 +85,7 @@ to a web server, etc.
Download the finished export. Download the finished export.
```http ```text
GET /projects/:id/export/download GET /projects/:id/export/download
``` ```
...@@ -94,18 +93,18 @@ GET /projects/:id/export/download ...@@ -94,18 +93,18 @@ GET /projects/:id/export/download
| --------- | -------------- | -------- | ---------------------------------------- | | --------- | -------------- | -------- | ---------------------------------------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```console ```sh
curl --header "PRIVATE-TOKEN: <your_access_token>" --remote-header-name --remote-name https://gitlab.example.com/api/v4/projects/5/export/download curl --header "PRIVATE-TOKEN: <your_access_token>" --remote-header-name --remote-name https://gitlab.example.com/api/v4/projects/5/export/download
``` ```
```console ```sh
ls *export.tar.gz ls *export.tar.gz
2017-12-05_22-11-148_namespace_project_export.tar.gz 2017-12-05_22-11-148_namespace_project_export.tar.gz
``` ```
## Import a file ## Import a file
```http ```text
POST /projects/import POST /projects/import
``` ```
...@@ -124,7 +123,7 @@ cURL to post data using the header `Content-Type: multipart/form-data`. ...@@ -124,7 +123,7 @@ cURL to post data using the header `Content-Type: multipart/form-data`.
The `file=` parameter must point to a file on your file system and be preceded The `file=` parameter must point to a file on your file system and be preceded
by `@`. For example: by `@`. For example:
```console ```sh
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "path=api-project" --form "file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "path=api-project" --form "file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import
``` ```
...@@ -168,7 +167,7 @@ requests.post(url, headers=headers, data=data, files=files) ...@@ -168,7 +167,7 @@ requests.post(url, headers=headers, data=data, files=files)
Get the status of an import. Get the status of an import.
```http ```text
GET /projects/:id/import GET /projects/:id/import
``` ```
...@@ -176,7 +175,7 @@ GET /projects/:id/import ...@@ -176,7 +175,7 @@ GET /projects/:id/import
| --------- | -------------- | -------- | ---------------------------------------- | | --------- | -------------- | -------- | ---------------------------------------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```console ```sh
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/import curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/1/import
``` ```
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
**Valid access levels** **Valid access levels**
The access levels are defined in the `ProtectedRefAccess.allowed_access_levels` method. Currently, these levels are recognized: The access levels are defined in the `ProtectedRefAccess.allowed_access_levels` method. Currently, these levels are recognized:
``` ```
0 => No access 0 => No access
30 => Developer access 30 => Developer access
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/41766) in GitLab 11.7. > - [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/41766) in GitLab 11.7.
> - Using this API you can manipulate GitLab's [Release](../../user/project/releases/index.md) entries. > - Using this API you can manipulate GitLab's [Release](../../user/project/releases/index.md) entries.
> - For manipulating links as a release asset, see [Release Links API](links.md) > - For manipulating links as a release asset, see [Release Links API](links.md).
## List Releases ## List Releases
......
# Gitignores API # `.gitignore` API
## List gitignore templates ## List `.gitignore` templates
Get all gitignore templates. Get all `.gitignore` templates.
``` ```
GET /templates/gitignores GET /templates/gitignores
...@@ -99,9 +99,9 @@ Example response: ...@@ -99,9 +99,9 @@ Example response:
] ]
``` ```
## Single gitignore template ## Single `.gitignore` template
Get a single gitignore template. Get a single `.gitignore` template.
``` ```
GET /templates/gitignores/:key GET /templates/gitignores/:key
...@@ -109,7 +109,7 @@ GET /templates/gitignores/:key ...@@ -109,7 +109,7 @@ GET /templates/gitignores/:key
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ---------- | ------ | -------- | ----------- | | ---------- | ------ | -------- | ----------- |
| `key` | string | yes | The key of the gitignore template | | `key` | string | yes | The key of the `.gitignore` template |
```bash ```bash
curl https://gitlab.example.com/api/v4/templates/gitignores/Ruby curl https://gitlab.example.com/api/v4/templates/gitignores/Ruby
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment