aboutsummaryrefslogtreecommitdiffstats
path: root/development/requests-idea.http
blob: 66284cd21b0ea76be2c60c9b18a688f1bf84a6dc (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# To be used with IntelliJ IDEA
POST http://localhost:8080/realms/ONAP/protocol/openid-connect/token
Content-Type: application/x-www-form-urlencoded

client_id=portal-app&client_secret=&scope=openid&grant_type=password&username=onap-admin&password=password
> {%
 client.global.set("access_token", response.body.access_token);
 client.global.set("id_token", response.body.id_token);
 %}

###

GET http://localhost:8080/realms/ONAP/protocol/openid-connect/userinfo
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}

> {%
 client.global.set("user_id", response.body.sub);
 client.global.set("user_name", response.body.preferred_username);
 %}

###

POST http://localhost:9080/preferences
X-Request-Id: {{$uuid}}
Accept: application/json
Content-Type: application/json
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}


{
  "properties": {
    "dashboard": {
      "apps": {
        "availableTiles": [
          {
            "type": "USER_LAST_ACTION_TILE",
            "displayed": false
          }
        ],
        "lastUserAction": {
          "interval": "1H",
          "filterType": "ALL"
        }
      }
    }
  }
}

###

GET http://localhost:9080/preferences
Accept: application/json
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}
X-Request-Id: {{$uuid}}

###

POST http://localhost:9080/actions/{{user_id}}
X-Request-Id: {{$uuid}}
Accept: application/json
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}
Content-Type: application/json

{
  "userId": "{{user_id}}",
  "actionCreatedAt": "{{$timestamp}}",
  "action": {
    "type": "DELETE",
    "entity": "USERADMINISTRATION",
    "entityParams": {
      "userName": "uli",
      "userId": "{{$randomInt}}"
    }
  }
}

###

GET http://localhost:9080/actions/{{user_id}}?page=1&pageSize=10&showLastHours=1
X-Request-Id: {{$uuid}}
Accept: application/json
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}

###

GET http://localhost:9080/actions?page=1&pageSize=10&showLastHours=1
X-Request-Id: {{$uuid}}
Accept: application/json
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}

### requests to keycloak

GET http://localhost:9080/users
X-Request-Id: {{$uuid}}
Accept: application/json
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}

###

GET http://localhost:9080/users/{{user_id}}
X-Request-Id: {{$uuid}}
Accept: application/json
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}

###

GET http://localhost:9080/users/{{user_id}}/roles
X-Request-Id: {{$uuid}}
Accept: application/json
Authorization: Bearer {{access_token}}
X-Auth-Identity: Bearer {{id_token}}