Difference between revisions of "Active User Web Service"

From FMR Knowledge Base
Jump to navigation Jump to search
(Example)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
[[Category:FMR_REST_API_Reference]]
 
[[Category:FMR_REST_API_Reference]]
 
= Overview =
 
= Overview =
The Active User web service can be used to obtain details .
+
The Active User web service can be used by an authenticated user to return details of their account.
  
 
Returns JSON describing:
 
Returns JSON describing:
* Product
+
* Root user permissions (if any)
* Running version and its release date
+
* Admin permissions (if any)
* Web application service URL
+
* User name
* A list of installed plugins
+
* Registered email address
* A list of REST API web service entry points
+
* Modify permissions
 +
* SDMX Data Consumer organisation membership
 +
* SDMX Data Provider organisation membership
 +
* SDMX Agency membership
  
 
{| 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 24: 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"
  ]
}