Commit f18e9f3f authored by Evan Read's avatar Evan Read Committed by Achilleas Pipinellis

Refactor of API landing page

    - Breaks up into more sections.
    - Also minor fixes to pages within sections.
parent 149fdc3b
# GitLab API # GitLab API
Automate GitLab via a simple and powerful API. All definitions can be found Automate GitLab via a simple and powerful API.
under [`/lib/api`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/lib/api).
The main GitLab API is a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API. Therefore, documentation in this section assumes knowledge of REST concepts. The main GitLab API is a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API. Therefore, documentation in this section assumes knowledge of REST concepts.
## API Resources ## API resources
The following API resources are available: Available API resources can be grouped in the following contexts:
- [Applications](applications.md) - [Projects](#project-resources).
- [Avatar](avatar.md) - [Groups](#group-resources).
- [Award emoji](award_emoji.md) - [Standalone](#standalone-resources).
- [Branches](branches.md)
- [Broadcast messages](broadcast_messages.md) See also:
- [Code snippets](snippets.md)
- [Commits](commits.md) - [V3 to V4](v3_to_v4.md).
- [Container Registry](container_registry.md) - Adding [deploy keys for multiple projects](deploy_key_multiple_projects.md).
- [Custom attributes](custom_attributes.md)
- [Deploy keys](deploy_keys.md), and [deploy keys for multiple projects](deploy_key_multiple_projects.md) ### Project resources
- [Deployments](deployments.md)
- [Discussions](discussions.md) (threaded comments) The following API resources are available in the project context:
- [Environments](environments.md)
- [Epic issues](epic_issues.md) **[ULTIMATE]** | Resource | Available endpoints |
- [Epic links](epic_links.md) **[ULTIMATE]** |:--------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
- [Epics](epics.md) **[ULTIMATE]** | [Access requests](access_requests.md) | `/projects/:id/access_requests` (also available for groups) |
- [Events](events.md) | [Award emoji](award_emoji.md) | `/projects/:id/issues/.../award_emoji`, `/projects/:id/merge_requests/.../award_emoji`, `/projects/:id/snippets/.../award_emoji` |
- [Feature flags](features.md) | [Branches](branches.md) | `/projects/:id/repository/branches/`, `/projects/:id/repository/merged_branches` |
- [Geo Nodes](geo_nodes.md) **[PREMIUM]** | [Commits](commits.md) | `/projects/:id/repository/commits`, `/projects/:id/statuses` |
- Group-related resources, including: | [Container Registry](container_registry.md) | `/projects/:id/registry/repositories` |
- [Groups](groups.md) | [Custom attributes](custom_attributes.md) | `/projects/:id/custom_attributes` (also available for groups and users) |
- [Group access requests](access_requests.md) | [Deploy keys](deploy_keys.md) | `/projects/:id/deploy_keys` (also available standalone) |
- [Group badges](group_badges.md) | [Deployments](deployments.md) | `/projects/:id/deployments` |
- [Group issue boards](group_boards.md) | [Discussions](discussions.md) (threaded comments) | `/projects/:id/issues/.../discussions`, `/projects/:id/snippets/.../discussions`, `/projects/:id/merge_requests/.../discussions`, `/projects/:id/commits/.../discussions` (also available for groups) |
- [Group labels](group_labels.md) | [Environments](environments.md) | `/projects/:id/environments` |
- [Group-level variables](group_level_variables.md) | [Events](events.md) | `/projects/:id/events` (also available for users and standalone) |
- [Group members](members.md) | [Issues](issues.md) | `/projects/:id/issues` (also available for groups and standalone) |
- [Group milestones](group_milestones.md) | [Issue boards](boards.md) | `/projects/:id/boards` |
- [Issues](issues.md) | [Issue links](issue_links.md) **[STARTER]** | `/projects/:id/issues/.../links` |
- [Issue boards](boards.md) | [Jobs](jobs.md) | `/projects/:id/jobs`, `/projects/:id/pipelines/.../jobs` |
- [Issue links](issue_links.md) | [Labels](labels.md) | `/projects/:id/labels` |
- [Jobs](jobs.md) | [Managed licenses](managed_licenses.md) **[ULTIMATE]** | `/projects/:id/managed_licenses` |
- [Keys](keys.md) | [Members](members.md) | `/projects/:id/members` (also available for groups) |
- [Labels](labels.md) | [Merge request approvals](merge_request_approvals.md) **[STARTER]** | `/projects/:id/approvals`, `/projects/:id/merge_requests/.../approvals` |
- [License](license.md) | [Merge requests](merge_requests.md) | `/projects/:id/merge_requests` (also available for groups and standalone) |
- [Managed licenses](managed_licenses.md) **[ULTIMATE]** | [Notes](notes.md) (comments) | `/projects/:id/issues/.../notes`, `/projects/:id/snippets/.../notes`, `/projects/:id/merge_requests/.../notes` (also available for groups) |
- [Markdown](markdown.md) | [Notification settings](notification_settings.md) | `/projects/:id/notification_settings` (also available for groups and standalone) |
- [Merge request approvals](merge_request_approvals.md) **[STARTER]** | [Packages](packages.md) **[PREMIUM]** | `/projects/:id/packages` |
- [Merge requests](merge_requests.md) | [Pages domains](pages_domains.md) | `/projects/:id/pages` (also available standalone) |
- [Namespaces](namespaces.md) | [Pipelines](pipelines.md) | `/projects/:id/pipelines` |
- [Notes](notes.md) (comments) | [Pipeline schedules](pipeline_schedules.md) | `/projects/:id/pipeline_schedules` |
- [Notification settings](notification_settings.md) | [Pipeline triggers](pipeline_triggers.md) | `/projects/:id/triggers` |
- [Packages](packages.md) **[PREMIUM]** | [Projects](projects.md) including setting Webhooks | `/projects`, `/projects/:id/hooks` (also available for users) |
- [Pages domains](pages_domains.md) | [Project badges](project_badges.md) | `/projects/:id/badges` |
- [Pipelines](pipelines.md) | [Project clusters](project_clusters.md) | `/projects/:id/clusters` |
- [Pipeline schedules](pipeline_schedules.md) | [Project-level variables](project_level_variables.md) | `/projects/:id/variables` |
- [Pipeline triggers](pipeline_triggers.md) and [triggering pipelines](../ci/triggers/README.md) | [Project import/export](project_import_export.md) | `/projects/:id/export`, `/projects/import`, `/projects/:id/import` |
- Project-related resources, including: | [Project milestones](milestones.md) | `/projects/:id/milestones` |
- [Projects](projects.md) including setting Webhooks | [Project snippets](project_snippets.md) | `/projects/:id/snippets` |
- [Project access requests](access_requests.md) | [Project templates](project_templates.md) | `/projects/:id/templates` |
- [Project badges](project_badges.md) | [Protected branches](protected_branches.md) | `/projects/:id/protected_branches` |
- [Project clusters](project_clusters.md) | [Protected tags](protected_tags.md) | `/projects/:id/protected_tags` |
- [Project-level variables](project_level_variables.md) | [Releases](releases/index.md) | `/projects/:id/releases` |
- [Project import/export](project_import_export.md) | [Release links](releases/links.md) | `/projects/:id/releases/.../assets/links` |
- [Project import from GitHub](import.md) | [Repositories](repositories.md) | `/projects/:id/repository` |
- [Project members](members.md) | [Repository files](repository_files.md) | `/projects/:id/repository/files` |
- [Project milestones](milestones.md) | [Repository submodules](repository_submodules.md) | `/projects/:id/repository/submodules` |
- [Project snippets](project_snippets.md) | [Resource label events](resource_label_events.md) | `/projects/:id/issues/.../resource_label_events`, `/projects/:id/merge_requests/.../resource_label_events` (also available for groups) |
- [Project templates](project_templates.md) (see also [Templates API Resources](#templates-api-resources)) | [Runners](runners.md) | `/projects/:id/runners` (also available standalone) |
- [Protected branches](protected_branches.md) | [Search](search.md) | `/projects/:id/search` (also available for groups and standalone) |
- [Protected tags](protected_tags.md) | [Services](services.md) | `/projects/:id/services` |
- [Repositories](repositories.md) | [Tags](tags.md) | `/projects/:id/repository/tags` |
- [Repository files](repository_files.md) | [Wikis](wikis.md) | `/projects/:id/wikis` |
- [Repository submodules](repository_submodules.md)
- [Resource label events](resource_label_events.md) ### Group resources
- [Runners](runners.md)
- [Search](search.md) The following API resources are available in the group context:
- [Services](services.md)
- [Settings](settings.md) | Resource | Available endpoints |
- [Sidekiq metrics](sidekiq_metrics.md) |:-----------------------------------------------------------------|:---------------------------------------------------------------------------------|
- [System hooks](system_hooks.md) | [Access requests](access_requests.md) | `/groups/:id/access_requests/` (also available for projects) |
- [Tags](tags.md) | [Custom attributes](custom_attributes.md) | `/groups/:id/custom_attributes` (also available for projects and users) |
- [Releases](releases/index.md) | [Discussions](discussions.md) (threaded comments) **[ULTIMATE]** | `/groups/:id/epics/.../discussions` (also available for projects) |
- Release Assets | [Epic issues](epic_issues.md) **[ULTIMATE]** | `/groups/:id/epics/.../issues` |
- [Links](releases/links.md) | [Epic links](epic_links.md) **[ULTIMATE]** | `/groups/:id/epics/.../epics` |
- [Todos](todos.md) | [Epics](epics.md) **[ULTIMATE]** | `/groups/:id/epics` |
- [Users](users.md) | [Groups](groups.md) | `/groups`, `/groups/.../subgroups` |
- [Validate CI configuration](lint.md) (linting) | [Group badges](group_badges.md) | `/groups/:id/badges` |
- [Version](version.md) | [Group issue boards](group_boards.md) | `/groups/:id/boards` |
- [Wikis](wikis.md) | [Group labels](group_labels.md) | `/groups/:id/labels` |
| [Group-level variables](group_level_variables.md) | `/groups/:id/variables` |
See also [V3 to V4](v3_to_v4.md). | [Group milestones](group_milestones.md) | `/groups/:id/milestones` |
| [Issues](issues.md) | `/groups/:id/issues` (also available for projects and standalone) |
### Templates API Resources | [Members](members.md) | `/groups/:id/members` (also available for projects) |
| [Merge requests](merge_requests.md) | `/groups/:id/merge_requests` (also available for projects and standalone) |
| [Notes](notes.md) (comments) | `/groups/:id/epics/.../notes` (also available for projects) |
| [Notification settings](notification_settings.md) | `/groups/:id/notification_settings` (also available for projects and standalone) |
| [Resource label events](resource_label_events.md) | `/groups/:id/epics/.../resource_label_events` (also available for projects) |
| [Search](search.md) | `/groups/:id/search` (also available for projects and standalone) |
### Standalone resources
The following API resources are available outside of project and group contexts (including `/users`):
| Resource | Available endpoints |
|:--------------------------------------------------|:------------------------------------------------------------------------|
| [Applications](applications.md) | `/applications` |
| [Avatar](avatar.md) | `/avatar` |
| [Broadcast messages](broadcast_messages.md) | `/broadcast_messages` |
| [Code snippets](snippets.md) | `/snippets` |
| [Custom attributes](custom_attributes.md) | `/users/:id/custom_attributes` (also available for groups and projects) |
| [Deploy keys](deploy_keys.md) | `/deploy_keys` (also available for projects) |
| [Events](events.md) | `/events`, `/users/:id/events` (also available for projects) |
| [Feature flags](features.md) | `/features` |
| [Geo Nodes](geo_nodes.md) **[PREMIUM ONLY]** | `/geo_nodes` |
| [Import repository from GitHub](import.md) | `/import/github` |
| [Issues](issues.md) | `/issues` (also available for groups and projects) |
| [Keys](keys.md) | `/keys` |
| [License](license.md) **[CORE ONLY]** | `/license` |
| [Markdown](markdown.md) | `/markdown` |
| [Merge requests](merge_requests.md) | `/merge_requests` (also available for groups and projects) |
| [Namespaces](namespaces.md) | `/namespaces` |
| [Notification settings](notification_settings.md) | `/notification_settings` (also available for groups and projects) |
| [Pages domains](pages_domains.md) | `/pages/domains` (also available for projects) |
| [Projects](projects.md) | `/users/:id/projects` (also available for projects) |
| [Runners](runners.md) | `/runners` (also available for projects) |
| [Search](search.md) | `/search` (also available for groups and projects) |
| [Settings](settings.md) | `/application/settings` |
| [Sidekiq metrics](sidekiq_metrics.md) | `/sidekiq` |
| [Suggestions](suggestions.md) | `/suggestions` |
| [System hooks](system_hooks.md) | `/hooks` |
| [Todos](todos.md) | `/todos` |
| [Users](users.md) | `/users` |
| [Validate `.gitlab-ci.yml` file](lint.md) | `/lint` |
| [Version](version.md) | `/version` |
### Templates API resources
Endpoints are available for: Endpoints are available for:
- [Dockerfile templates](templates/dockerfiles.md). - [Dockerfile templates](templates/dockerfiles.md).
- [gitignore templates](templates/gitignores.md). - [`.gitignore` templates](templates/gitignores.md).
- [GitLab CI YAML templates](templates/gitlab_ci_ymls.md). - [GitLab CI YAML templates](templates/gitlab_ci_ymls.md).
- [Open source license templates](templates/licenses.md). - [Open source license templates](templates/licenses.md).
...@@ -119,7 +161,7 @@ have been resolved to our satisfaction by the relicensing of the reference ...@@ -119,7 +161,7 @@ have been resolved to our satisfaction by the relicensing of the reference
implementations under MIT, and the use of the OWF license for the GraphQL implementations under MIT, and the use of the OWF license for the GraphQL
specification. specification.
## Compatibility Guidelines ## Compatibility guidelines
The HTTP API is versioned using a single number, the current one being 4. This The HTTP API is versioned using a single number, the current one being 4. This
number symbolizes the same as the major version number as described by number symbolizes the same as the major version number as described by
......
...@@ -414,7 +414,7 @@ Parameters: ...@@ -414,7 +414,7 @@ Parameters:
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/636 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/snippets/11/discussions/636
``` ```
## Epics ## Epics **[ULTIMATE]**
### List group epic discussions ### List group epic discussions
......
# Geo Nodes API # Geo Nodes API **[PREMIUM ONLY]**
In order to interact with Geo node endpoints, you need to authenticate yourself In order to interact with Geo node endpoints, you need to authenticate yourself
as an admin. as an admin.
......
# Issue links API # Issue links API **[STARTER]**
## List issue relations ## List issue relations
......
# License # License **[CORE ONLY]**
In order to interact with license endpoints, you need to authenticate yourself In order to interact with license endpoints, you need to authenticate yourself
as an admin. as an admin.
......
...@@ -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
......
...@@ -382,7 +382,7 @@ Parameters: ...@@ -382,7 +382,7 @@ Parameters:
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/7/notes/1602 curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/7/notes/1602
``` ```
## Epics ## Epics **[ULTIMATE]**
### List all epic notes ### List all epic notes
......
...@@ -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
......
...@@ -88,7 +88,7 @@ Parameters: ...@@ -88,7 +88,7 @@ Parameters:
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events/1 curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events/1
``` ```
## Epics ## Epics **[ULTIMATE]**
### List group epic label events ### List group epic label events
......
# 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