Difference between revisions of "Active User Web Service"

From FMR Knowledge Base
Jump to navigation Jump to search
(Example)
 
(2 intermediate revisions by one other user not shown)
Line 15: Line 15:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
|style="background-color:#eaecf0"|<b>Entry Point</b> || style="min-width:500px;" | <b> /ws/fusion/info/product</b>
+
|style="background-color:#eaecf0"|<b>Entry Point</b> || style="min-width:500px;" | <b> /ws/public/currentuser/user</b>
 
|-
 
|-
 
|style="background-color:#eaecf0"|<b>Access</b> || Public </span>
 
|style="background-color:#eaecf0"|<b>Access</b> || Public </span>
Line 27: Line 27:
  
 
=Example=
 
=Example=
[[File:ProductInfoJSON.PNG]]
+
 
 +
This is the response for the root user:
 +
 
 +
<pre>
 +
{
 +
  "isRoot": true,
 +
  "isAdmin": true,
 +
  "name": "Root",
 +
  "username": "root",
 +
  "auth": [
 +
    "ROLE_ROOT"
 +
  ],
 +
  "modifyStatus": "loggedInWithModifyPermissions",
 +
  "providers": [],
 +
  "agencies": []
 +
}
 +
</pre>
 +
 
 +
An example response for a user with modify permissions for the agencies BIS and ECB:
 +
 
 +
<pre>
 +
{
 +
  "isRoot": false,
 +
  "isAdmin": false,
 +
  "name": "User 1",
 +
  "username": "user1",
 +
  "auth": [
 +
    "ROLE_USER",
 +
    "ROLE_AGENCY"
 +
  ],
 +
  "roles": [
 +
    "PUBLIC",
 +
    "bisusers",
 +
    "ecbusers"
 +
  ],
 +
  "email": "user1@examplecom",
 +
  "modifyStatus": "loggedInWithModifyPermissions",
 +
  "providers": [],
 +
  "agencies": [
 +
    "urn:sdmx:org.sdmx.infomodel.base.Agency=SDMX:AGENCIES(1.0).BIS",
 +
    "urn:sdmx:org.sdmx.infomodel.base.Agency=SDMX:AGENCIES(1.0).ECB"
 +
  ]
 +
}
 +
</pre>

Latest revision as of 07:53, 5 November 2024

Overview

The Active User web service can be used by an authenticated user to return details of their account.

Returns JSON describing:

  • Root user permissions (if any)
  • Admin permissions (if any)
  • User name
  • Registered email address
  • Modify permissions
  • SDMX Data Consumer organisation membership
  • SDMX Data Provider organisation membership
  • SDMX Agency membership
Entry Point /ws/public/currentuser/user
Access Public
Http Method GET
Response Format application/json (array of objects)
Response Statuses

200 - Query Ok

Example

This is the response for the root user:

{
  "isRoot": true,
  "isAdmin": true,
  "name": "Root",
  "username": "root",
  "auth": [
    "ROLE_ROOT"
  ],
  "modifyStatus": "loggedInWithModifyPermissions",
  "providers": [],
  "agencies": []
}

An example response for a user with modify permissions for the agencies BIS and ECB:

{
  "isRoot": false,
  "isAdmin": false,
  "name": "User 1",
  "username": "user1",
  "auth": [
    "ROLE_USER",
    "ROLE_AGENCY"
  ],
  "roles": [
    "PUBLIC",
    "bisusers",
    "ecbusers"
  ],
  "email": "user1@examplecom",
  "modifyStatus": "loggedInWithModifyPermissions",
  "providers": [],
  "agencies": [
    "urn:sdmx:org.sdmx.infomodel.base.Agency=SDMX:AGENCIES(1.0).BIS",
    "urn:sdmx:org.sdmx.infomodel.base.Agency=SDMX:AGENCIES(1.0).ECB"
  ]
}