-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgsuite.http
44 lines (34 loc) · 1.04 KB
/
gsuite.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@baseUrl = https://www.googleapis.com
@authAssertion = ...
@testUserId = 101895279326331084119
###
# @name getToken
POST {{baseUrl}}/oauth2/v4/token HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"assertion": "{{authAssertion}}",
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer"
}
###
# @name getAllUsers
GET {{baseUrl}}/admin/directory/v1/users?fields=users%28id%2Cname%2CprimaryEmail%29%2CnextPageToken&domain=scienceleadership.org&maxResults=500 HTTP/1.1
Authorization: Bearer {{getToken.response.body.$.access_token}}
Accept: application/json
###
# @name getPerson
GET {{baseUrl}}/admin/directory/v1/users/{{testUserId}} HTTP/1.1
Authorization: Bearer {{getToken.response.body.$.access_token}}
Accept: application/json
###
# @name patchPerson
PATCH {{baseUrl}}/admin/directory/v1/users/{{testUserId}} HTTP/1.1
Authorization: Bearer {{getToken.response.body.$.access_token}}
Accept: application/json
Content-Type: application/json
{
"name": {
"givenName": "Test",
"familyName": "Demo"
}
}