Skip to content
Snippets Groups Projects
Commit d94ed2a4 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent e56fd471
No related branches found
No related tags found
No related merge requests found
Showing
with 123 additions and 110 deletions
Loading
Loading
@@ -166,6 +166,7 @@ export default {
:href="lineHref"
@click="setHighlightedRow(lineCode)"
>
{{ lineNumber }}
</a>
<diff-gutter-avatars
v-if="shouldShowAvatarsOnGutter"
Loading
Loading
Loading
Loading
@@ -485,10 +485,6 @@ table.code {
}
}
}
&:not(.js-unfold-bottom) a::before {
content: attr(data-linenumber);
}
}
 
&.line_content {
Loading
Loading
---
title: Replace line diff number css selector with actual HTML inside MRs
merge_request:
author: Oregand
type: other
---
title: Disable Marginalia line backtrace in production
merge_request: 26199
author:
type: performance
Loading
Loading
@@ -9,7 +9,13 @@ require 'marginalia'
# Refer: https://github.com/basecamp/marginalia/blob/v1.8.0/lib/marginalia/railtie.rb#L67
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(Gitlab::Marginalia::ActiveRecordInstrumentation)
 
Marginalia::Comment.components = [:application, :controller, :action, :correlation_id, :jid, :job_class, :line]
Marginalia::Comment.components = [:application, :controller, :action, :correlation_id, :jid, :job_class]
# As mentioned in https://github.com/basecamp/marginalia/pull/93/files,
# adding :line has some overhead because a regexp on the backtrace has
# to be run on every SQL query. Only enable this in development because
# we've seen it slow things down.
Marginalia::Comment.components << :line if Rails.env.development?
 
Gitlab::Marginalia.set_application_name
 
Loading
Loading
doc/administration/troubleshooting/img/AzureAD-basic_SAML.png

134 KiB | W: 503px | H: 583px

doc/administration/troubleshooting/img/AzureAD-basic_SAML.png

93.8 KiB | W: 592px | H: 700px

doc/administration/troubleshooting/img/AzureAD-basic_SAML.png
doc/administration/troubleshooting/img/AzureAD-basic_SAML.png
doc/administration/troubleshooting/img/AzureAD-basic_SAML.png
doc/administration/troubleshooting/img/AzureAD-basic_SAML.png
  • 2-up
  • Swipe
  • Onion skin
Loading
Loading
@@ -355,7 +355,7 @@ curl --head --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example
 
The response will then be:
 
```
```http
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 1103
Loading
Loading
@@ -415,7 +415,7 @@ curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab
 
The response header includes a link to the next page. For example:
 
```
```http
HTTP/1.1 200 OK
...
Link: <https://gitlab.example.com/api/v4/projects?pagination=keyset&per_page=50&order_by=id&sort=asc&id_after=42>; rel="next"
Loading
Loading
@@ -540,7 +540,7 @@ Such errors appear in two cases:
 
When an attribute is missing, you will get something like:
 
```
```http
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
Loading
Loading
@@ -551,7 +551,7 @@ Content-Type: application/json
When a validation error occurs, error messages will be different. They will
hold all details of validation errors:
 
```
```http
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
Loading
Loading
@@ -589,7 +589,7 @@ follows:
 
When you try to access an API URL that does not exist you will receive 404 Not Found.
 
```
```http
HTTP/1.1 404 Not Found
Content-Type: application/json
{
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ You can read more about [triggering pipelines through the API](../ci/triggers/RE
 
Get a list of project's build triggers.
 
```
```plaintext
GET /projects/:id/triggers
```
 
Loading
Loading
@@ -14,7 +14,7 @@ GET /projects/:id/triggers
|-----------|---------|----------|---------------------|
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
 
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers"
```
 
Loading
Loading
@@ -36,7 +36,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
 
Get details of project's build trigger.
 
```
```plaintext
GET /projects/:id/triggers/:trigger_id
```
 
Loading
Loading
@@ -45,7 +45,7 @@ GET /projects/:id/triggers/:trigger_id
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `trigger_id` | integer | yes | The trigger id |
 
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/5"
```
 
Loading
Loading
@@ -65,7 +65,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
 
Create a trigger for a project.
 
```
```plaintext
POST /projects/:id/triggers
```
 
Loading
Loading
@@ -74,7 +74,7 @@ POST /projects/:id/triggers
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `description` | string | yes | The trigger name |
 
```
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers"
```
 
Loading
Loading
@@ -94,7 +94,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form descrip
 
Update a trigger for a project.
 
```
```plaintext
PUT /projects/:id/triggers/:trigger_id
```
 
Loading
Loading
@@ -104,7 +104,7 @@ PUT /projects/:id/triggers/:trigger_id
| `trigger_id` | integer | yes | The trigger id |
| `description` | string | no | The trigger name |
 
```
```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form description="my description" "https://gitlab.example.com/api/v4/projects/1/triggers/10"
```
 
Loading
Loading
@@ -124,7 +124,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form descript
 
Remove a project's build trigger.
 
```
```plaintext
DELETE /projects/:id/triggers/:trigger_id
```
 
Loading
Loading
@@ -133,6 +133,6 @@ DELETE /projects/:id/triggers/:trigger_id
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `trigger_id` | integer | yes | The trigger id |
 
```
```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/triggers/5"
```
Loading
Loading
@@ -9,7 +9,7 @@ GitLab supports links links to `http`, `https`, and `ftp` assets.
 
Get assets as links from a Release.
 
```
```plaintext
GET /projects/:id/releases/:tag_name/assets/links
```
 
Loading
Loading
@@ -47,7 +47,7 @@ Example response:
 
Get an asset as a link from a Release.
 
```
```plaintext
GET /projects/:id/releases/:tag_name/assets/links/:link_id
```
 
Loading
Loading
@@ -78,7 +78,7 @@ Example response:
 
Create an asset as a link from a Release.
 
```
```plaintext
POST /projects/:id/releases/:tag_name/assets/links
```
 
Loading
Loading
@@ -114,7 +114,7 @@ Example response:
 
Update an asset as a link from a Release.
 
```
```plaintext
PUT /projects/:id/releases/:tag_name/assets/links/:link_id
```
 
Loading
Loading
@@ -150,7 +150,7 @@ Example response:
 
Delete an asset as a link from a Release.
 
```
```plaintext
DELETE /projects/:id/releases/:tag_name/assets/links/:link_id
```
 
Loading
Loading
Loading
Loading
@@ -751,7 +751,7 @@ Search within the specified project.
 
If a user is not a member of a project and the project is private, a `GET` request on that project will result to a `404` status code.
 
```
```plaintext
GET /projects/:id/search
```
 
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ administrator in order to perform this action.
List the current [application settings](#list-of-settings-that-can-be-accessed-via-api-calls)
of the GitLab instance.
 
```
```plaintext
GET /application/settings
```
 
Loading
Loading
@@ -90,7 +90,7 @@ the `file_template_project_id`, `deletion_adjourned_period`, or the `geo_node_al
Use an API call to modify GitLab instance
[application settings](#list-of-settings-that-can-be-accessed-via-api-calls).
 
```
```plaintext
PUT /application/settings
```
 
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ of Sidekiq, its jobs, queues, and processes.
List information about all the registered queues, their backlog and their
latency.
 
```
```plaintext
GET /sidekiq/queue_metrics
```
 
Loading
Loading
@@ -35,7 +35,7 @@ Example response:
 
List information about all the Sidekiq workers registered to process your queues.
 
```
```plaintext
GET /sidekiq/process_metrics
```
 
Loading
Loading
@@ -77,7 +77,7 @@ Example response:
 
List information about the jobs that Sidekiq has performed.
 
```
```plaintext
GET /sidekiq/job_stats
```
 
Loading
Loading
@@ -102,7 +102,7 @@ Example response:
 
List all the currently available information about Sidekiq.
 
```
```plaintext
GET /sidekiq/compound_metrics
```
 
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ administrator in order to perform this action.
NOTE: **Note:**
These statistics are approximate.
 
```
```plaintext
GET /application/statistics
```
 
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@ Every API call to suggestions must be authenticated.
Applies a suggested patch in a merge request. Users must be
at least [Developer](../user/permissions.md) to perform such action.
 
```
```plaintext
PUT /suggestions/:id/apply
```
 
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@ Read more about [system hooks](../system_hooks/system_hooks.md).
 
Get a list of all system hooks.
 
```
```plaintext
GET /hooks
```
 
Loading
Loading
@@ -42,7 +42,7 @@ Example response:
 
Add a new system hook.
 
```
```plaintext
POST /hooks
```
 
Loading
Loading
@@ -81,7 +81,7 @@ Example response:
 
## Test system hook
 
```
```plaintext
GET /hooks/:id
```
 
Loading
Loading
@@ -112,7 +112,7 @@ Example response:
 
Deletes a system hook.
 
```
```plaintext
DELETE /hooks/:id
```
 
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ Get a list of repository tags from a project, sorted by name in reverse
alphabetical order. This endpoint can be accessed without authentication if the
repository is publicly accessible.
 
```
```plaintext
GET /projects/:id/repository/tags
```
 
Loading
Loading
@@ -57,7 +57,7 @@ Parameters:
Get a specific repository tag determined by its name. This endpoint can be
accessed without authentication if the repository is publicly accessible.
 
```
```plaintext
GET /projects/:id/repository/tags/:tag_name
```
 
Loading
Loading
@@ -104,7 +104,7 @@ Example Response:
 
Creates a new tag in the repository that points to the supplied ref.
 
```
```plaintext
POST /projects/:id/repository/tags
```
 
Loading
Loading
@@ -164,7 +164,7 @@ status code `405` with an explaining error message is returned.
 
Deletes a tag of a repository with given name.
 
```
```plaintext
DELETE /projects/:id/repository/tags/:tag_name
```
 
Loading
Loading
@@ -178,7 +178,7 @@ Parameters:
Add release notes to the existing Git tag. If there
already exists a release for the given tag, status code `409` is returned.
 
```
```plaintext
POST /projects/:id/repository/tags/:tag_name/release
```
 
Loading
Loading
@@ -210,7 +210,7 @@ Response:
 
Updates the release notes of a given release.
 
```
```plaintext
PUT /projects/:id/repository/tags/:tag_name/release
```
 
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@ information on Dockerfiles, see the
 
Get all Dockerfile templates.
 
```
```plaintext
GET /templates/dockerfiles
```
 
Loading
Loading
@@ -99,7 +99,7 @@ Example response:
 
Get a single Dockerfile template.
 
```
```plaintext
GET /templates/dockerfiles/:key
```
 
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ resources available online.
 
Get all license templates.
 
```
```plaintext
GET /templates/licenses
```
 
Loading
Loading
@@ -110,7 +110,7 @@ Example response:
Get a single license template. You can pass parameters to replace the license
placeholder.
 
```
```plaintext
GET /templates/licenses/:key
```
 
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@
Returns a list of todos. When no filter is applied, it returns all pending todos
for the current user. Different filters allow the user to precise the request.
 
```
```plaintext
GET /todos
```
 
Loading
Loading
@@ -184,7 +184,7 @@ Example Response:
Marks a single pending todo given by its ID for the current user as done. The
todo marked as done is returned in the response.
 
```
```plaintext
POST /todos/:id/mark_as_done
```
 
Loading
Loading
@@ -280,7 +280,7 @@ Example Response:
 
Marks all pending todos for the current user as done. It returns the HTTP status code `204` with an empty response.
 
```
```plaintext
POST /todos/mark_as_done
```
 
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ This function takes pagination parameters `page` and `per_page` to restrict the
 
### For normal users
 
```
```plaintext
GET /users
```
 
Loading
Loading
@@ -39,13 +39,13 @@ You can also search for users by name or primary email using `?search=`. For exa
 
In addition, you can lookup users by username:
 
```
```plaintext
GET /users?username=:username
```
 
For example:
 
```
```plaintext
GET /users?username=jack_smith
```
 
Loading
Loading
@@ -53,11 +53,11 @@ In addition, you can filter users based on states eg. `blocked`, `active`
This works only to filter users who are `blocked` or `active`.
It does not support `active=false` or `blocked=false`.
 
```
```plaintext
GET /users?active=true
```
 
```
```plaintext
GET /users?blocked=true
```
 
Loading
Loading
@@ -66,7 +66,7 @@ Username search is case insensitive.
 
### For admins
 
```
```plaintext
GET /users
```
 
Loading
Loading
@@ -187,13 +187,13 @@ the `group_saml` provider option:
 
You can lookup users by external UID and provider:
 
```
```plaintext
GET /users?extern_uid=:extern_uid&provider=:provider
```
 
For example:
 
```
```plaintext
GET /users?extern_uid=1234567&provider=github
```
 
Loading
Loading
@@ -201,19 +201,19 @@ You can search for users who are external with: `/users?external=true`
 
You can search users by creation date time range with:
 
```
```plaintext
GET /users?created_before=2001-01-02T00:00:00.060Z&created_after=1999-01-02T00:00:00.060
```
 
You can filter by [custom attributes](custom_attributes.md) with:
 
```
```plaintext
GET /users?custom_attributes[key]=value&custom_attributes[other_key]=other_value
```
 
You can include the users' [custom attributes](custom_attributes.md) in the response with:
 
```
```plaintext
GET /users?with_custom_attributes=true
```
 
Loading
Loading
@@ -223,7 +223,7 @@ Get a single user.
 
### For user
 
```
```plaintext
GET /users/:id
```
 
Loading
Loading
@@ -253,7 +253,7 @@ Parameters:
 
### For admin
 
```
```plaintext
GET /users/:id
```
 
Loading
Loading
@@ -340,7 +340,7 @@ see the `group_saml` option:
 
You can include the user's [custom attributes](custom_attributes.md) in the response with:
 
```
```plaintext
GET /users/:id?with_custom_attributes=true
```
 
Loading
Loading
@@ -358,7 +358,7 @@ over `password`. In addition, `reset_password` and
NOTE: **Note:**
From [GitLab 12.1](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/29888/), `private_profile` will default to `false`.
 
```
```plaintext
POST /users
```
 
Loading
Loading
@@ -399,7 +399,7 @@ Parameters:
 
Modifies an existing user. Only administrators can change attributes of a user.
 
```
```plaintext
PUT /users/:id
```
 
Loading
Loading
@@ -445,7 +445,7 @@ For example, when renaming the email address to some existing one.
 
Deletes a user's authentication identity using the provider name associated with that identity. Available only for administrators.
 
```
```plaintext
DELETE /users/:id/identities/:provider
```
 
Loading
Loading
@@ -459,7 +459,7 @@ Parameters:
Deletes a user. Available only for administrators.
This returns a `204 No Content` status code if the operation was successfully, `404` if the resource was not found or `409` if the user cannot be soft deleted.
 
```
```plaintext
DELETE /users/:id
```
 
Loading
Loading
@@ -474,7 +474,7 @@ Parameters:
 
Gets currently authenticated user.
 
```
```plaintext
GET /user
```
 
Loading
Loading
@@ -522,7 +522,7 @@ Parameters:
 
- `sudo` (optional) - the ID of a user to make the call in their place
 
```
```plaintext
GET /user
```
 
Loading
Loading
@@ -571,7 +571,7 @@ GET /user
 
Get the status of the currently signed in user.
 
```
```plaintext
GET /user/status
```
 
Loading
Loading
@@ -593,7 +593,7 @@ Example response:
 
Get the status of a user.
 
```
```plaintext
GET /users/:id_or_username/status
```
 
Loading
Loading
@@ -619,7 +619,7 @@ Example response:
 
Set the status of the current user.
 
```
```plaintext
PUT /user/status
```
 
Loading
Loading
@@ -652,7 +652,7 @@ Get the counts (same as in top right menu) of the currently signed in user.
| --------- | ---- | ----------- |
| `merge_requests` | number | Merge requests that are active and assigned to current user. |
 
```
```plaintext
GET /user_counts
```
 
Loading
Loading
@@ -676,7 +676,7 @@ Please refer to the [List of user projects](projects.md#list-user-projects).
 
Get a list of currently authenticated user's SSH keys.
 
```
```plaintext
GET /user/keys
```
 
Loading
Loading
@@ -705,7 +705,7 @@ Parameters:
 
Get a list of a specified user's SSH keys.
 
```
```plaintext
GET /users/:id_or_username/keys
```
 
Loading
Loading
@@ -717,7 +717,7 @@ GET /users/:id_or_username/keys
 
Get a single key.
 
```
```plaintext
GET /user/keys/:key_id
```
 
Loading
Loading
@@ -738,7 +738,7 @@ Parameters:
 
Creates a new key owned by the currently authenticated user.
 
```
```plaintext
POST /user/keys
```
 
Loading
Loading
@@ -776,7 +776,7 @@ error occurs a `400 Bad Request` is returned with a message explaining the error
 
Create new key owned by specified user. Available only for admin
 
```
```plaintext
POST /users/:id/keys
```
 
Loading
Loading
@@ -791,7 +791,7 @@ Parameters:
Deletes key owned by currently authenticated user.
This returns a `204 No Content` status code if the operation was successfully or `404` if the resource was not found.
 
```
```plaintext
DELETE /user/keys/:key_id
```
 
Loading
Loading
@@ -803,7 +803,7 @@ Parameters:
 
Deletes key owned by a specified user. Available only for admin.
 
```
```plaintext
DELETE /users/:id/keys/:key_id
```
 
Loading
Loading
@@ -816,7 +816,7 @@ Parameters:
 
Get a list of currently authenticated user's GPG keys.
 
```
```plaintext
GET /user/gpg_keys
```
 
Loading
Loading
@@ -840,7 +840,7 @@ Example response:
 
Get a specific GPG key of currently authenticated user.
 
```
```plaintext
GET /user/gpg_keys/:key_id
```
 
Loading
Loading
@@ -868,7 +868,7 @@ Example response:
 
Creates a new GPG key owned by the currently authenticated user.
 
```
```plaintext
POST /user/gpg_keys
```
 
Loading
Loading
@@ -898,7 +898,7 @@ Example response:
 
Delete a GPG key owned by currently authenticated user.
 
```
```plaintext
DELETE /user/gpg_keys/:key_id
```
 
Loading
Loading
@@ -918,7 +918,7 @@ Returns `204 No Content` on success, or `404 Not found` if the key cannot be fou
 
Get a list of a specified user's GPG keys. Available only for admins.
 
```
```plaintext
GET /users/:id/gpg_keys
```
 
Loading
Loading
@@ -948,7 +948,7 @@ Example response:
 
Get a specific GPG key for a given user. Available only for admins.
 
```
```plaintext
GET /users/:id/gpg_keys/:key_id
```
 
Loading
Loading
@@ -977,7 +977,7 @@ Example response:
 
Create new GPG key owned by the specified user. Available only for admins.
 
```
```plaintext
POST /users/:id/gpg_keys
```
 
Loading
Loading
@@ -1008,7 +1008,7 @@ Example response:
 
Delete a GPG key owned by a specified user. Available only for admins.
 
```
```plaintext
DELETE /users/:id/gpg_keys/:key_id
```
 
Loading
Loading
@@ -1027,7 +1027,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitl
 
Get a list of currently authenticated user's emails.
 
```
```plaintext
GET /user/emails
```
 
Loading
Loading
@@ -1052,7 +1052,7 @@ Parameters:
 
Get a list of a specified user's emails. Available only for admin
 
```
```plaintext
GET /users/:id/emails
```
 
Loading
Loading
@@ -1064,7 +1064,7 @@ Parameters:
 
Get a single email.
 
```
```plaintext
GET /user/emails/:email_id
```
 
Loading
Loading
@@ -1083,7 +1083,7 @@ Parameters:
 
Creates a new email owned by the currently authenticated user.
 
```
```plaintext
POST /user/emails
```
 
Loading
Loading
@@ -1115,7 +1115,7 @@ error occurs a `400 Bad Request` is returned with a message explaining the error
 
Create new email owned by specified user. Available only for admin
 
```
```plaintext
POST /users/:id/emails
```
 
Loading
Loading
@@ -1130,7 +1130,7 @@ Parameters:
Deletes email owned by currently authenticated user.
This returns a `204 No Content` status code if the operation was successfully or `404` if the resource was not found.
 
```
```plaintext
DELETE /user/emails/:email_id
```
 
Loading
Loading
@@ -1142,7 +1142,7 @@ Parameters:
 
Deletes email owned by a specified user. Available only for admin.
 
```
```plaintext
DELETE /users/:id/emails/:email_id
```
 
Loading
Loading
@@ -1155,7 +1155,7 @@ Parameters:
 
Blocks the specified user. Available only for admin.
 
```
```plaintext
POST /users/:id/block
```
 
Loading
Loading
@@ -1170,7 +1170,7 @@ Will return `201 OK` on success, `404 User Not Found` is user cannot be found or
 
Unblocks the specified user. Available only for admin.
 
```
```plaintext
POST /users/:id/unblock
```
 
Loading
Loading
@@ -1187,7 +1187,7 @@ Will return `201 OK` on success, `404 User Not Found` is user cannot be found or
 
Deactivates the specified user. Available only for admin.
 
```
```plaintext
POST /users/:id/deactivate
```
 
Loading
Loading
@@ -1209,7 +1209,7 @@ Returns:
 
Activates the specified user. Available only for admin.
 
```
```plaintext
POST /users/:id/activate
```
 
Loading
Loading
@@ -1234,7 +1234,7 @@ Please refer to the [Events API documentation](events.md#get-user-contribution-e
It retrieves every impersonation token of the user. Use the pagination
parameters `page` and `per_page` to restrict the list of impersonation tokens.
 
```
```plaintext
GET /users/:user_id/impersonation_tokens
```
 
Loading
Loading
@@ -1245,7 +1245,7 @@ Parameters:
| `user_id` | integer | yes | The ID of the user |
| `state` | string | no | filter tokens based on state (`all`, `active`, `inactive`) |
 
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/impersonation_tokens
```
 
Loading
Loading
@@ -1286,7 +1286,7 @@ Example response:
 
It shows a user's impersonation token.
 
```
```plaintext
GET /users/:user_id/impersonation_tokens/:impersonation_token_id
```
 
Loading
Loading
@@ -1297,7 +1297,7 @@ Parameters:
| `user_id` | integer | yes | The ID of the user |
| `impersonation_token_id` | integer | yes | The ID of the impersonation token |
 
```
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/impersonation_tokens/2
```
 
Loading
Loading
@@ -1328,7 +1328,7 @@ You are only able to create impersonation tokens to impersonate the user and per
both API calls and Git reads and writes. The user will not see these tokens in their profile
settings page.
 
```
```plaintext
POST /users/:user_id/impersonation_tokens
```
 
Loading
Loading
@@ -1339,7 +1339,7 @@ POST /users/:user_id/impersonation_tokens
| `expires_at` | date | no | The expiration date of the impersonation token in ISO format (`YYYY-MM-DD`)|
| `scopes` | array | yes | The array of scopes of the impersonation token (`api`, `read_user`) |
 
```
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --data "name=mytoken" --data "expires_at=2017-04-04" --data "scopes[]=api" https://gitlab.example.com/api/v4/users/42/impersonation_tokens
```
 
Loading
Loading
@@ -1367,11 +1367,11 @@ Example response:
 
It revokes an impersonation token.
 
```
```plaintext
DELETE /users/:user_id/impersonation_tokens/:impersonation_token_id
```
 
```
```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/users/42/impersonation_tokens/1
```
 
Loading
Loading
@@ -1398,7 +1398,7 @@ The activities that update the timestamp are:
By default, it shows the activity for all users in the last 6 months, but this can be
amended by using the `from` parameter.
 
```
```plaintext
GET /user/activities
```
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment