summaryrefslogtreecommitdiffstats
path: root/development/requests-code.http
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:44:19 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:44:19 +0000
commitcdc670c5a1c25b0b0ab460b1711a0a42f270b1f3 (patch)
tree41ac6c0e7a52505fd1d0de057df6d5328a853cd0 /development/requests-code.http
parent1a9b563662e9a9dd1f89e04ce0026e2cc5c4771d (diff)
Upload bff
Issue-ID: PORTAL-1083 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I50f0a2db2dab28354c32c1ebf5a5e22afb0faade
Diffstat (limited to 'development/requests-code.http')
-rw-r--r--development/requests-code.http109
1 files changed, 109 insertions, 0 deletions
diff --git a/development/requests-code.http b/development/requests-code.http
new file mode 100644
index 0000000..cec50e9
--- /dev/null
+++ b/development/requests-code.http
@@ -0,0 +1,109 @@
+# Use this with the REST Client extension in VSCode
+###
+# @name login
+@access_token = {{login.response.body.access_token}}
+@id_token = {{login.response.body.id_token}}
+POST http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/token
+Content-Type: application/x-www-form-urlencoded
+Authorization: Basic admin:password
+
+grant_type=password&scope=openid&client_id=portal-app&username=onap-admin&password=password
+
+###
+# @name userinfo
+@user_id = {{userinfo.response.body.sub}}
+@user_name = {{userinfo.response.body.preferred_username}}
+GET http://localhost:8080/auth/realms/ONAP/protocol/openid-connect/userinfo
+Authorization: Bearer {{access_token}}
+X-Auth-Identity: Bearer {{id_token}}
+
+###
+
+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}}