Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-16 18:09:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-16 18:09:23 +0300
commit01a8b31afeac9ac1eaf64d781de5ee8f15eb1897 (patch)
tree3c4404c0c68ca2cb8fa9564727a95bcbad7ab086 /doc/api/invitations.md
parent127e6d9610b96f470ef4da2f7b5936211974fd17 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/invitations.md')
-rw-r--r--doc/api/invitations.md43
1 files changed, 42 insertions, 1 deletions
diff --git a/doc/api/invitations.md b/doc/api/invitations.md
index ecdc58f3e03..6fd2b26d80f 100644
--- a/doc/api/invitations.md
+++ b/doc/api/invitations.md
@@ -6,7 +6,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Invitations API
-Use the Invitations API to send email to users you want to join a group or project.
+Use the Invitations API to send email to users you want to join a group or project, and to list pending
+invitations.
## Valid access levels
@@ -64,3 +65,43 @@ When there was any error sending the email:
}
}
```
+
+## List all invitations pending for a group or project
+
+Gets a list of invited group or project members viewable by the authenticated user.
+Returns invitations to direct members only, and not through inherited ancestors' groups.
+
+This function takes pagination parameters `page` and `per_page` to restrict the list of users.
+
+```plaintext
+GET /groups/:id/invitations
+GET /projects/:id/invitations
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `page` | integer | no | Page to retrieve |
+| `per_page`| integer | no | Number of member invitations to return per page |
+| `query` | string | no | A query string to search for invited members by invite email. Query text must match email address exactly. When empty, returns all invitations. |
+
+```shell
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/:id/invitations?query=member@example.org"
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:id/invitations?query=member@example.org"
+```
+
+Example response:
+
+```json
+ [
+ {
+ "id": 1,
+ "invite_email": "member@example.org",
+ "invited_at": "2020-10-22T14:13:35Z",
+ "access_level": 30,
+ "expires_at": "2020-11-22T14:13:35Z",
+ "user_name": "Raymond Smith",
+ "created_by_name": "Administrator"
+ },
+]
+```