API Explorer 936 endpoints

Get My Role

GET /obp/v7.0.0/banks/BANK_ID/my/roles/ROLE_NAME

OBPv7.0.0-getMyRole No role required RoleEntitlementScope

Returns how the caller holds one Role, and so whether an endpoint that needs it would let the caller in.

For a system Role, use SYS as BANK_ID: it then means no bank. A bank Role is looked up at BANK_ID, where SYS is the system space of Dynamic Entities.

Use it from a service that receives an OBP-API token (for example API Explorer II, the Portal or API Manager) and must decide, as OBP-API would, whether that token may see something the service guards with an OBP Role.

  • caller: the User and Consumer of the token. application_only is true when no person is behind it (a client-credentials token, whose User is a pseudo-user named after the Consumer's client id).
  • held_by.user: the User holds the Role as an Entitlement, or as a virtual Role from super_admin_user_ids or oidc_operator_user_ids.
  • held_by.consumer: the Consumer holds the Role as a Scope.
  • scopes_required: the props require_scopes_for_all_roles or require_scopes_for_listed_roles make every endpoint need both.
  • allowed_for_auth_modes: the endpoint auth modes (UserOnly, ApplicationOnly, UserOrApplication, UserAndApplication) under which an endpoint that needs this Role would let the caller in. An endpoint that accepts several Roles lets the caller in if any one of them is allowed.

Just-in-time Entitlements (create_just_in_time_entitlements) are not granted here: an endpoint may still grant one when it is called.

No Role is required: a caller may always learn what it holds. The caller must be identifiable as a Consumer. An unknown Role name gets 404.

User Authentication is Optional. The User need not be logged in.

This endpoint supports User OR Application authentication. You can authenticate either as a logged-in User (with Entitlements) or as an Application using a Consumer Key (with Scopes). See here for more information.

This endpoint supports User OR Application authentication. You can authenticate either as a logged-in User (with Entitlements) or as an Application using a Consumer Key (with Scopes). See here for more information.

This endpoint supports User OR Application authentication. You can authenticate either as a logged-in User (with Entitlements) or as an Application using a Consumer Key (with Scopes). See here for more information.

URL Parameters:

BANK_ID: gh.29.uk

ROLE_NAME:

JSON response body fields (11)
allowed_for_auth_modes
allowed_for_auth_modes
application_only
application_only
bank_id
gh.29.uk
caller
caller
consumer
consumer
consumer_id
7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh
held_by
held_by
role_name
scopes_required
scopes_required
user
user_id
9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1
Example success response
{
  "role_name": "CanGetSystemLogCacheError",
  "bank_id": "SYS",
  "caller": {
    "user_id": "9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1",
    "consumer_id": "7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh",
    "application_only": true
  },
  "held_by": {
    "user": false,
    "consumer": true
  },
  "scopes_required": false,
  "allowed_for_auth_modes": [
    "ApplicationOnly",
    "UserOrApplication"
  ]
}
Possible errors (5)
  • OBP-20200: The application cannot be identified.
  • OBP-30001: Bank not found. Please specify a valid value for BANK_ID.
  • OBP-10007: Incorrect Role name:
  • OBP-30206: This entitlement is a System Role. Please set bank_id to empty string.
  • OBP-50000: Unknown Error.
Implemented by OBPv7.0.0 getMyRole