Active User Web Service

From FMR Knowledge Base
Jump to navigation Jump to search

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"
  ]
}