Commit b1e05164 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs-api-merge-2-ee' into 'master'

Docs: (EE Port) Merge 5 api docs from EE to CE

See merge request gitlab-org/gitlab-ee!13193
parents 3432a4ca 9e41653a
...@@ -70,7 +70,7 @@ The following API resources are available in the project context: ...@@ -70,7 +70,7 @@ The following API resources are available in the project context:
| [Search](search.md) | `/projects/:id/search` (also available for groups and standalone) | | [Search](search.md) | `/projects/:id/search` (also available for groups and standalone) |
| [Services](services.md) | `/projects/:id/services` | | [Services](services.md) | `/projects/:id/services` |
| [Tags](tags.md) | `/projects/:id/repository/tags` | | [Tags](tags.md) | `/projects/:id/repository/tags` |
| [Vulnerabilities](vulnerabilities.md) **[ULTIMATE]** | `/projects/:id/vulnerabilities` | | [Vulnerabilities](vulnerabilities.md) **[ULTIMATE]** | `/projects/:id/vulnerabilities` (also available for groups) |
| [Wikis](wikis.md) | `/projects/:id/wikis` | | [Wikis](wikis.md) | `/projects/:id/wikis` |
### Group resources ### Group resources
...@@ -144,7 +144,7 @@ Endpoints are available for: ...@@ -144,7 +144,7 @@ Endpoints are available for:
- [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).
## SCIM ## SCIM **[SILVER ONLY]**
[GitLab.com Silver and above](https://about.gitlab.com/pricing/) provides an [SCIM API](scim.md) that implements [the RFC7644 protocol](https://tools.ietf.org/html/rfc7644) and provides [GitLab.com Silver and above](https://about.gitlab.com/pricing/) provides an [SCIM API](scim.md) that implements [the RFC7644 protocol](https://tools.ietf.org/html/rfc7644) and provides
the `/Users` endpoint. The base URL is: `/api/scim/v2/groups/:group_path/Users/`. the `/Users` endpoint. The base URL is: `/api/scim/v2/groups/:group_path/Users/`.
...@@ -204,8 +204,6 @@ curl "https://gitlab.example.com/api/v4/projects" ...@@ -204,8 +204,6 @@ curl "https://gitlab.example.com/api/v4/projects"
The API uses JSON to serialize data. You don't need to specify `.json` at the The API uses JSON to serialize data. You don't need to specify `.json` at the
end of an API URL. end of an API URL.
All of the API endpoints that use the `POST`, `PUT` or `PATCH` method support params in the request body, with `Content-Type` `application/x-www-form-urlencoded`, `multipart/form-data` or `application/json`.
## Authentication ## Authentication
Most API requests require authentication, or will only return public data when Most API requests require authentication, or will only return public data when
......
...@@ -368,7 +368,7 @@ curl --output artifacts.zip --header "PRIVATE-TOKEN: <your_access_token>" "https ...@@ -368,7 +368,7 @@ curl --output artifacts.zip --header "PRIVATE-TOKEN: <your_access_token>" "https
``` ```
To use this in a [`script` definition](../ci/yaml/README.md#script) inside To use this in a [`script` definition](../ci/yaml/README.md#script) inside
`.gitlab-ci.yml`, you can use either: `.gitlab-ci.yml` **[PREMIUM]**, you can use either:
- The `JOB-TOKEN` header with the GitLab-provided `CI_JOB_TOKEN` variable. - The `JOB-TOKEN` header with the GitLab-provided `CI_JOB_TOKEN` variable.
For example, the following job will download the artifacts of the job with ID For example, the following job will download the artifacts of the job with ID
...@@ -434,7 +434,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a ...@@ -434,7 +434,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
``` ```
To use this in a [`script` definition](../ci/yaml/README.md#script) inside To use this in a [`script` definition](../ci/yaml/README.md#script) inside
`.gitlab-ci.yml`, you can use either: `.gitlab-ci.yml` **[PREMIUM]**, you can use either:
- The `JOB-TOKEN` header with the GitLab-provided `CI_JOB_TOKEN` variable. - The `JOB-TOKEN` header with the GitLab-provided `CI_JOB_TOKEN` variable.
For example, the following job will download the artifacts of the `test` job For example, the following job will download the artifacts of the `test` job
......
...@@ -19,7 +19,7 @@ GET /search ...@@ -19,7 +19,7 @@ GET /search
Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs, users. Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs, users.
If Elasticsearch is enabled additional scopes available are blobs, wiki_blobs and commits. Find more about [the feature](../integration/elasticsearch.md). If Elasticsearch is enabled additional scopes available are blobs, wiki_blobs and commits. Find more about [the feature](../integration/elasticsearch.md). **[STARTER]**
The response depends on the requested scope. The response depends on the requested scope.
...@@ -283,9 +283,9 @@ Example response: ...@@ -283,9 +283,9 @@ Example response:
] ]
``` ```
### Scope: wiki_blobs ### Scope: wiki_blobs **[STARTER]**
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=wiki_blobs&search=bye curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=wiki_blobs&search=bye
...@@ -308,7 +308,7 @@ Example response: ...@@ -308,7 +308,7 @@ Example response:
] ]
``` ```
### Scope: commits ### Scope: commits **[STARTER]**
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...@@ -341,7 +341,7 @@ Example response: ...@@ -341,7 +341,7 @@ Example response:
] ]
``` ```
### Scope: blobs ### Scope: blobs **[STARTER]**
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...@@ -414,7 +414,7 @@ GET /groups/:id/search ...@@ -414,7 +414,7 @@ GET /groups/:id/search
Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, users. Search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, users.
If Elasticsearch is enabled additional scopes available are blobs, wiki_blobs and commits. Find more about [the feature](../integration/elasticsearch.md). If Elasticsearch is enabled additional scopes available are blobs, wiki_blobs and commits. Find more about [the feature](../integration/elasticsearch.md). **[STARTER]**
The response depends on the requested scope. The response depends on the requested scope.
...@@ -616,7 +616,7 @@ Example response: ...@@ -616,7 +616,7 @@ Example response:
] ]
``` ```
### Scope: wiki_blobs ### Scope: wiki_blobs **[STARTER]**
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...@@ -641,7 +641,7 @@ Example response: ...@@ -641,7 +641,7 @@ Example response:
] ]
``` ```
### Scope: commits ### Scope: commits **[STARTER]**
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...@@ -674,7 +674,7 @@ Example response: ...@@ -674,7 +674,7 @@ Example response:
] ]
``` ```
### Scope: blobs ### Scope: blobs **[STARTER]**
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled. This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
...@@ -744,7 +744,6 @@ GET /projects/:id/search ...@@ -744,7 +744,6 @@ GET /projects/:id/search
| `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 |
| `scope` | string | yes | The scope to search in | | `scope` | string | yes | The scope to search in |
| `search` | string | yes | The search query | | `search` | string | yes | The search query |
| `ref` | string | no | The name of a repository branch or tag to search on. The project's default branch is used by default. This is only applicable for scopes: commits, blobs, and wiki_blobs. |
Search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users. Search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, users.
...@@ -1039,7 +1038,7 @@ Blobs searches are performed on both filenames and contents. Search results: ...@@ -1039,7 +1038,7 @@ Blobs searches are performed on both filenames and contents. Search results:
times in the content. times in the content.
```bash ```bash
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation&ref=feature curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation
``` ```
Example response: Example response:
...@@ -1052,7 +1051,7 @@ Example response: ...@@ -1052,7 +1051,7 @@ Example response:
"data": "```\n\n## Installation\n\nQuick start using the [pre-built", "data": "```\n\n## Installation\n\nQuick start using the [pre-built",
"filename": "README.md", "filename": "README.md",
"id": null, "id": null,
"ref": "feature", "ref": "master",
"startline": 46, "startline": 46,
"project_id": 6 "project_id": 6
} }
......
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