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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1c4c79c4
Commit
1c4c79c4
authored
Dec 14, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add API doc
parent
06d05950
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
doc/api/users.md
doc/api/users.md
+55
-0
No files found.
doc/api/users.md
View file @
1c4c79c4
...
@@ -834,3 +834,58 @@ Example response:
...
@@ -834,3 +834,58 @@ Example response:
}
}
]
]
```
```
### Get user activities (admin only)
>**Note:** This API endpoint is only available on 8.15 EE and above.
Get the last activity date for all users, sorted from oldest to newest.
The activities that update the timestamp are:
-
Git HTTP/SSH activities (such as clone, push)
-
User logging in into GitLab
The data is stored in Redis and it depends on it for being recorded and displayed
over time. This means that we will lose the data if Redis gets flushed, or a custom
TTL is reached.
By default, it shows the activity for all users in the last 6 months, but this can be
amended by using the
`from`
parameter.
This function takes pagination parameters
`page`
and
`per_page`
to restrict the list of users.
```
GET /user/activities
```
Parameters:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
|
`from`
| string | no | Date time string in the format YEAR-MONTH-DAY, e.g.
`2016-03-11`
. Defaults to 6 months ago. |
```
bash
curl
--header
"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK"
https://gitlab.example.com/api/v3/user/activities
```
Example response:
```
json
[
{
"username"
:
"user1"
,
"last_activity_at"
:
"2015-12-14 01:00:00"
},
{
"username"
:
"user2"
,
"last_activity_at"
:
"2015-12-15 01:00:00"
},
{
"username"
:
"user3"
,
"last_activity_at"
:
"2015-12-16 01:00:00"
}
]
```
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