API Explorer 935 endpoints

Create Scope for a Consumer

POST /obp/v7.0.0/consumers/CONSUMER_ID/scopes

OBPv7.0.0-addScope Roles: CanCreateScopeAtOneBank(per bank),CanCreateScopeAtAnyBank ScopeConsumer

Grant a Role to a Consumer (App), as a Scope.

For a system Role (e.g. CanGetAnyUser) set bank_id to an empty string. For a bank Role set it to a bank id, or to SYS for the system space of Dynamic Entities, where the Definition Roles (e.g. CanGetDynamicEntityDefinitions) and the Record Roles of system entities are held.

The caller needs CanCreateScopeAtAnyBank, or CanCreateScopeAtOneBank at that bank_id.

User Authentication is Required. The User must be logged in. The Application must also be authenticated.

URL Parameters:

CONSUMER_ID: 7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh

JSON request body fields (2)
bank_id
gh.29.uk
role_name
JSON response body fields (3)
bank_id
gh.29.uk
role_name
scope_id
Example request body
{
  "bank_id": "SYS",
  "role_name": "CanGetDynamicEntityDefinitions"
}
Example success response
{
  "scope_id": "88f52c12-38ab-4c5f-8ef1-8a0f63a84a44",
  "role_name": "CanGetDynamicEntityDefinitions",
  "bank_id": "SYS"
}
Possible errors (10)
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-30019: Consumer not found. Please specify a valid value for CONSUMER_ID.
  • OBP-10001: Incorrect json format.
  • OBP-10007: Incorrect Role name:
  • OBP-30205: This entitlement is a Bank Role. Please set bank_id to a valid bank id.
  • OBP-30206: This entitlement is a System Role. Please set bank_id to empty string.
  • OBP-20006: User is missing one or more roles:
  • OBP-30001: Bank not found. Please specify a valid value for BANK_ID.
  • OBP-30216: Entitlement already exists for the user.
  • OBP-50000: Unknown Error.
Implemented by OBPv7.0.0 addScope