2014-05-27 08:12:15 -04:00
# System hooks
2014-02-13 05:55:46 -05:00
Your GitLab instance can perform HTTP POST requests on the following events: `create_project` , `delete_project` , `create_user` , `delete_user` and `change_team_member` .
System hooks can be used, e.g. for logging or changing information in a LDAP server.
2014-04-24 18:48:22 -04:00
## Hooks request example
2014-02-13 05:55:46 -05:00
**Project created:**
```json
{
"created_at": "2012-07-21T07:30:54Z",
"event_name": "project_create",
"name": "StoreCloud",
2014-03-14 00:49:50 -04:00
"owner_email": "johnsmith@gmail.com",
"owner_name": "John Smith",
2014-02-13 05:55:46 -05:00
"path": "stormcloud",
"path_with_namespace": "jsmith/stormcloud",
"project_id": 74,
2014-05-12 05:23:24 -04:00
"project_visibility": "private",
2014-02-13 05:55:46 -05:00
}
```
**Project destroyed:**
```json
{
"created_at": "2012-07-21T07:30:58Z",
"event_name": "project_destroy",
"name": "Underscore",
2014-03-14 00:49:50 -04:00
"owner_email": "johnsmith@gmail.com",
2014-02-13 05:55:46 -05:00
"owner_name": "John Smith",
"path": "underscore",
"path_with_namespace": "jsmith/underscore",
"project_id": 73,
2014-05-12 05:23:24 -04:00
"project_visibility": "internal",
2014-02-13 05:55:46 -05:00
}
```
**New Team Member:**
2014-03-14 00:49:50 -04:00
```json
2014-02-13 05:55:46 -05:00
{
2014-05-12 05:23:24 -04:00
"created_at": "2012-07-21T07:30:56Z",
"event_name": "user_add_to_team",
"project_access": "Master",
"project_id": 74,
"project_name": "StoreCloud",
"project_path": "storecloud",
"user_email": "johnsmith@gmail.com",
"user_name": "John Smith",
"project_visibility": "private",
2014-02-13 05:55:46 -05:00
}
```
**Team Member Removed:**
```json
{
2014-05-12 05:23:24 -04:00
"created_at": "2012-07-21T07:30:56Z",
"event_name": "user_remove_from_team",
"project_access": "Master",
"project_id": 74,
"project_name": "StoreCloud",
"project_path": "storecloud",
"user_email": "johnsmith@gmail.com",
"user_name": "John Smith",
"project_visibility": "private",
2014-02-13 05:55:46 -05:00
}
```
**User created:**
```json
2014-04-24 18:48:22 -04:00
{
2014-02-13 05:55:46 -05:00
"created_at": "2012-07-21T07:44:07Z",
"email": "js@gitlabhq.com",
"event_name": "user_create",
2014-04-24 18:48:22 -04:00
"name": "John Smith",
"user_id": 41
2014-02-13 05:55:46 -05:00
}
```
**User removed:**
```json
2014-04-24 18:48:22 -04:00
{
2014-02-13 05:55:46 -05:00
"created_at": "2012-07-21T07:44:07Z",
"email": "js@gitlabhq.com",
"event_name": "user_destroy",
"name": "John Smith",
2014-04-24 18:48:22 -04:00
"user_id": 41
2014-02-13 05:55:46 -05:00
}
```