v5.1.0 filtered by tag: Entitlement (15 APIs)

Bank
Accounts
Views
Counterparties
Transactions

Add Entitlement for a User

Create Entitlement. Grant Role to User.

Entitlements are used to grant System or Bank level roles to Users. (For Account level privileges, see Views)

For a System level Role (.e.g CanGetAnyUser), set bank_id to an empty string i.e. "bank_id":""

For a Bank level Role (e.g. CanCreateAccount), set bank_id to a valid value e.g. "bank_id":"my-bank-id"

Authentication is required and the user needs to be a Super Admin. Super Admins are listed in the Props file.

Authentication is Mandatory

URL Parameters:

USER_ID: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

JSON request body fields:

bank_id: gh.29.uk

role_name:

JSON response body fields:

bank_id: gh.29.uk

entitlement_id:

role_name:

Typical Successful Response:

								
									
{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }
Required Roles:
  • CanCreateEntitlementAtOneBank - Please login to request this Role
  • CanCreateEntitlementAtAnyBank - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20005: User not found. Please specify a valid value for USER_ID.
  • OBP-20050: Current User is not a Super Admin!
  • 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-30216: Entitlement already exists for the user.
  • OBP-50000: Unknown Error.
  • OBP-20006: User is missing one or more roles:
Connector Methods:
Version: OBPv2.0.0, function_name: by addEntitlement, operation_id: OBPv2.0.0-addEntitlement Tags: Role, Entitlement, User,

Create (DAuth) User with Roles

This endpoint is used as part of the DAuth solution to grant Entitlements for Roles to a smart contract on the blockchain.

Put the smart contract address in username

For provider use "dauth"

This endpoint will create the User with username and provider if the User does not already exist.

Then it will create Entitlements i.e. grant Roles to the User.

Entitlements are used to grant System or Bank level roles to Users. (For Account level privileges, see Views)

i.e. Entitlements are used to create / consume system or bank level resources where as views / account access are used to consume / create customer level resources.

For a System level Role (.e.g CanGetAnyUser), set bank_id to an empty string i.e. "bank_id":""

For a Bank level Role (e.g. CanCreateAccount), set bank_id to a valid value e.g. "bank_id":"my-bank-id"

Note: The Roles actually granted will depend on the Roles that the calling user has.

If you try to grant Entitlements to a user that already exist (duplicate entitilements) you will get an error.

For information about DAuth see below:

DAuth

DAuth Introduction, Setup and Usage

DAuth is an experimental authentication mechanism that aims to pin an ethereum or other blockchain Smart Contract to an OBP "User".

In the future, it might be possible to be more specific and pin specific actors (wallets) that are acting within the smart contract, but so far, one smart contract acts on behalf of one User.

Thus, if a smart contract "X" calls the OBP API using the DAuth header, OBP will get or create a user called X and the call will proceed in the context of that User "X".

DAuth is invoked by the REST client (caller) including a specific header (see step 3 below) in any OBP REST call.

When OBP receives the DAuth token, it creates or gets a User with a username based on the smart_contract_address and the provider based on the network_name. The combination of username and provider is unique in OBP.

If you are calling OBP-API via an API3 Airnode, the Airnode will take care of constructing the required header.

When OBP detects a DAuth header / token it first checks if the Consumer is allowed to make such a call. OBP will validate the Consumer ip address and signature etc.

Note: The DAuth flow does not require an explicit POST like Direct Login to create the token.

Permissions may be assigned to an OBP User at any time, via the UserAuthContext, Views, Entitlements to Roles or Consents.

Note: DAuth is NOT enabled on this instance!

Note: The DAuth client is responsible for creating a token which will be trusted by OBP absolutely!

To use DAuth:

1) Configure OBP API to accept DAuth.

Set up properties in your props file

# -- DAuth --------------------------------------
# Define secret used to validate JWT token
# jwt.public_key_rsa=path-to-the-pem-file
# Enable/Disable DAuth communication at all
# In case isn't defined default value is false
# allow_dauth=false
# Define comma separated list of allowed IP addresses
# dauth.host=127.0.0.1
# -------------------------------------- DAuth--

Please keep in mind that property jwt.public_key_rsa is used to validate JWT token to check it is not changed or corrupted during transport.

2) Create / have access to a JWT

The following videos are available:
* DAuth in local environment

HEADER:ALGORITHM & TOKEN TYPE

{
  "alg": "RS256",
  "typ": "JWT"
}

PAYLOAD:DATA

{
  "smart_contract_address": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",
  "network_name": "AIRNODE.TESTNET.ETHEREUM",
  "msg_sender": "0xe12340927f1725E7734CE288F8367e1Bb143E90fhku767",
  "consumer_key": "0x1234a4ec31e89cea54d1f125db7536e874ab4a96b4d4f6438668b6bb10a6adb",
  "timestamp": "2021-11-04T14:13:40Z",
  "request_id": "0Xe876987694328763492876348928736497869273649"
}

VERIFY SIGNATURE

RSASHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),

) your-RSA-key-pair

Here is an example token:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k

3) Try a REST call using the header

Using your favorite http client:

GET https://apisandbox.openbankproject.com/obp/v3.0.0/users/current

Body

Leave Empty!

Headers:

   DAuth: your-jwt-from-step-above

Here is it all together:

GET https://apisandbox.openbankproject.com/obp/v3.0.0/users/current HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.47.0
Accept: /
DAuth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k

CURL example

curl -v -H 'DAuth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k' https://apisandbox.openbankproject.com/obp/v3.0.0/users/current

You should receive a response like:

{
    "user_id": "4c4d3175-1e5c-4cfd-9b08-dcdc209d8221",
    "email": "",
    "provider_id": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",
    "provider": "ETHEREUM",
    "username": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",
    "entitlements": {
        "list": []
    }
}

Under the hood

The file, dauth.scala handles the DAuth,

We:

-> Check if Props allow_dauth is true
  -> Check if DAuth header exists
    -> Check if getRemoteIpAddress is OK
      -> Look for "token"
        -> parse the JWT token and getOrCreate the user
          -> get the data of the user

More information

Parameter names and values are case sensitive.
Each parameter MUST NOT appear more than once per request.


Authentication is Mandatory

JSON request body fields:

bank_id: gh.29.uk

provider: ETHEREUM

role_name:

roles: CanCreateMyUser

username: felixsmith

JSON response body fields:

bank_id: gh.29.uk

entitlement_id:

list:

role_name:

user_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

Typical Successful Response:

								
									
{ "list":[{ "entitlement_id":"", "role_name":"", "bank_id":"gh.29.uk", "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1" }] }
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • 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-30216: Entitlement already exists for the user.
  • OBP-20103: Invalid DAuth User Provider.
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv4.0.0, function_name: by createUserWithRoles, operation_id: OBPv4.0.0-createUserWithRoles Tags: Role, Entitlement, User, DAuth,

Create Entitlement Request for current User

Create Entitlement Request.

Any logged in User can use this endpoint to request an Entitlement

Entitlements are used to grant System or Bank level roles to Users. (For Account level privileges, see Views)

For a System level Role (.e.g CanGetAnyUser), set bank_id to an empty string i.e. "bank_id":""

For a Bank level Role (e.g. CanCreateAccount), set bank_id to a valid value e.g. "bank_id":"my-bank-id"

Authentication is Mandatory

JSON request body fields:

bank_id: gh.29.uk

role_name:

JSON response body fields:

bank_id: gh.29.uk

created:

email: felixsmith@example.com

entitlement_id:

entitlement_request_id:

entitlements:

list:

provider: ETHEREUM

provider_id:

role_name:

user:

user_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

username: felixsmith

Typical Successful Response:

								
									
{ "entitlement_request_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "user":{ "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1", "email":"felixsmith@example.com", "provider_id":"Chris", "provider":"http://127.0.0.1:8080", "username":"felixsmith", "entitlements":{ "list":[{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }] } }, "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk", "created":"1100-01-01T00:00:00Z" }
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20005: User not found. Please specify a valid value for USER_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-30214: Entitlement Request already exists for the user.
  • OBP-30217: Entitlement Request cannot be added.
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv3.0.0, function_name: by addEntitlementRequest, operation_id: OBPv3.0.0-addEntitlementRequest Tags: Role, Entitlement, User,

Delete Entitlement

Delete Entitlement specified by ENTITLEMENT_ID for an user specified by USER_ID

Authentication is required and the user needs to be a Super Admin.
Super Admins are listed in the Props file.

Authentication is Mandatory

URL Parameters:

ENTITLEMENT_ID:

USER_ID: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

JSON response body fields:

Typical Successful Response:

								
									
{ "jsonString":"{}" }
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-30212: EntitlementId not found
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv2.0.0, function_name: by deleteEntitlement, operation_id: OBPv2.0.0-deleteEntitlement Tags: Role, User, Entitlement,

Delete Entitlement Request

Delete the Entitlement Request specified by ENTITLEMENT_REQUEST_ID for a user specified by USER_ID

Authentication is Mandatory

URL Parameters:

ENTITLEMENT_REQUEST_ID:

JSON response body fields:

Typical Successful Response:

								
									
Required Roles:
  • CanDeleteEntitlementRequestsAtAnyBank - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-50200: Connector cannot return the data we requested.
  • OBP-50000: Unknown Error.
  • OBP-20006: User is missing one or more roles:
Connector Methods:
Version: OBPv3.0.0, function_name: by deleteEntitlementRequest, operation_id: OBPv3.0.0-deleteEntitlementRequest Tags: Role, Entitlement, User,

Get Entitlement Requests for a User

Get Entitlement Requests for a User.

Authentication is Mandatory

URL Parameters:

USER_ID: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

JSON response body fields:

bank_id: gh.29.uk

created:

email: felixsmith@example.com

entitlement_id:

entitlement_request_id:

entitlement_requests:

entitlements:

list:

provider: ETHEREUM

provider_id:

role_name:

user:

user_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

username: felixsmith

Typical Successful Response:

								
									
{ "entitlement_requests":[{ "entitlement_request_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "user":{ "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1", "email":"felixsmith@example.com", "provider_id":"Chris", "provider":"http://127.0.0.1:8080", "username":"felixsmith", "entitlements":{ "list":[{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }] } }, "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk", "created":"1100-01-01T00:00:00Z" }] }
Required Roles:
  • CanGetEntitlementRequestsAtAnyBank - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-50200: Connector cannot return the data we requested.
  • OBP-50000: Unknown Error.
  • OBP-20006: User is missing one or more roles:
Connector Methods:
Version: OBPv3.0.0, function_name: by getEntitlementRequests, operation_id: OBPv3.0.0-getEntitlementRequests Tags: Role, Entitlement, User,

Get Entitlement Requests for the current User

Get Entitlement Requests for the current User.

Authentication is Mandatory

JSON response body fields:

bank_id: gh.29.uk

created:

email: felixsmith@example.com

entitlement_id:

entitlement_request_id:

entitlement_requests:

entitlements:

list:

provider: ETHEREUM

provider_id:

role_name:

user:

user_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

username: felixsmith

Typical Successful Response:

								
									
{ "entitlement_requests":[{ "entitlement_request_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "user":{ "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1", "email":"felixsmith@example.com", "provider_id":"Chris", "provider":"http://127.0.0.1:8080", "username":"felixsmith", "entitlements":{ "list":[{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }] } }, "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk", "created":"1100-01-01T00:00:00Z" }] }
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-50200: Connector cannot return the data we requested.
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv3.0.0, function_name: by getEntitlementRequestsForCurrentUser, operation_id: OBPv3.0.0-getEntitlementRequestsForCurrentUser Tags: Role, Entitlement, User,

Get Entitlements and Permissions for a User

Authentication is Mandatory

URL Parameters:

USER_ID: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

JSON response body fields:

account_id: 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0

bank_id: gh.29.uk

email: felixsmith@example.com

entitlement_id:

entitlements:

list:

provider: ETHEREUM

provider_id:

role_name:

user_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

username: felixsmith

view_id: owner

views:

Typical Successful Response:

								
									
{ "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1", "email":"felixsmith@example.com", "provider_id":"Chris", "provider":"http://127.0.0.1:8080", "username":"felixsmith", "entitlements":{ "list":[{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }] }, "views":{ "list":[{ "bank_id":"gh.29.uk", "account_id":"8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0", "view_id":"owner" }] } }
Required Roles:
  • CanGetEntitlementsForAnyUserAtAnyBank - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20057: User not found by userId.
  • OBP-20006: User is missing one or more roles:
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv5.1.0, function_name: by getEntitlementsAndPermissions, operation_id: OBPv5.1.0-getEntitlementsAndPermissions Tags: Role, Entitlement, User,

Get Entitlements for One Bank

Authentication is Mandatory

URL Parameters:

BANK_ID: gh.29.uk

JSON response body fields:

bank_id: gh.29.uk

entitlement_id:

list:

role_name:

user_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

Typical Successful Response:

								
									
{ "list":[{ "entitlement_id":"", "role_name":"", "bank_id":"gh.29.uk", "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1" }] }
Required Roles:
  • CanGetEntitlementsForOneBank - Please login to request this Role
  • CanGetEntitlementsForAnyBank - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv4.0.0, function_name: by getEntitlementsForBank, operation_id: OBPv4.0.0-getEntitlementsForBank Tags: Role, Entitlement, User,

Get Entitlements for User

Authentication is Mandatory

URL Parameters:

USER_ID: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

JSON response body fields:

bank_id: gh.29.uk

entitlement_id:

list:

role_name:

user_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

Typical Successful Response:

								
									
{ "list":[{ "entitlement_id":"", "role_name":"", "bank_id":"gh.29.uk", "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1" }] }
Required Roles:
  • CanGetEntitlementsForAnyUserAtAnyBank - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv4.0.0, function_name: by getEntitlements, operation_id: OBPv4.0.0-getEntitlements Tags: Role, Entitlement, User,

Get Entitlements for User at Bank

Get Entitlements specified by BANK_ID and USER_ID

Authentication is Mandatory

URL Parameters:

BANK_ID: gh.29.uk

USER_ID: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

JSON response body fields:

bank_id: gh.29.uk

entitlement_id:

list:

role_name:

Typical Successful Response:

								
									
{ "list":[{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }] }
Required Roles:
  • CanGetEntitlementsForAnyUserAtOneBank - Please login to request this Role
  • CanGetEntitlementsForAnyUserAtAnyBank - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv2.1.0, function_name: by getEntitlementsByBankAndUser, operation_id: OBPv2.1.0-getEntitlementsByBankAndUser Tags: Role, Entitlement, User,

Get Entitlements for the current User

Get Entitlements for the current User.

Authentication is Mandatory

JSON response body fields:

bank_id: gh.29.uk

entitlement_id:

list:

role_name:

Typical Successful Response:

								
									
{ "list":[{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }] }
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-50200: Connector cannot return the data we requested.
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv3.0.0, function_name: by getEntitlementsForCurrentUser, operation_id: OBPv3.0.0-getEntitlementsForCurrentUser Tags: Role, Entitlement, User,

Get all Entitlement Requests

Get all Entitlement Requests

Authentication is Mandatory

JSON response body fields:

bank_id: gh.29.uk

created:

email: felixsmith@example.com

entitlement_id:

entitlement_request_id:

entitlement_requests:

entitlements:

list:

provider: ETHEREUM

provider_id:

role_name:

user:

user_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1

username: felixsmith

Typical Successful Response:

								
									
{ "entitlement_requests":[{ "entitlement_request_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "user":{ "user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1", "email":"felixsmith@example.com", "provider_id":"Chris", "provider":"http://127.0.0.1:8080", "username":"felixsmith", "entitlements":{ "list":[{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }] } }, "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk", "created":"1100-01-01T00:00:00Z" }] }
Required Roles:
  • CanGetEntitlementRequestsAtAnyBank - Please login to request this Role
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-50200: Connector cannot return the data we requested.
  • OBP-50000: Unknown Error.
  • OBP-20006: User is missing one or more roles:
Connector Methods:
Version: OBPv3.0.0, function_name: by getAllEntitlementRequests, operation_id: OBPv3.0.0-getAllEntitlementRequests Tags: Role, Entitlement, User,

Get all Entitlements

Login is required.

Possible filter on the role field:

eg: /entitlements?role=CanGetCustomer

Authentication is Mandatory

JSON response body fields:

bank_id: gh.29.uk

entitlement_id:

list:

role_name:

Typical Successful Response:

								
									
{ "list":[{ "entitlement_id":"6fb17583-1e49-4435-bb74-a14fe0996723", "role_name":"CanQueryOtherUser", "bank_id":"gh.29.uk" }] }
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv3.1.0, function_name: by getAllEntitlements, operation_id: OBPv3.1.0-getAllEntitlements Tags: Role, Entitlement,

Get access

Returns the list of the permissions at BANK_ID for account ACCOUNT_ID, with each time a pair composed of the user and the views that he has access to.

Authentication is Mandatory
and the user needs to have access to the owner view.

URL Parameters:

ACCOUNT_ID: 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0

BANK_ID: gh.29.uk

JSON response body fields:

alias:

can_add_comment:

can_add_corporate_location:

can_add_image:

can_add_image_url: true

can_add_more_info: true

can_add_open_corporates_url:

can_add_physical_location:

can_add_private_alias:

can_add_public_alias:

can_add_tag: true

can_add_url:

can_add_where_tag:

can_delete_comment:

can_delete_corporate_location: true

can_delete_image: true

can_delete_physical_location:

can_delete_tag:

can_delete_where_tag: true

can_edit_owner_comment: true

can_see_bank_account_balance:

can_see_bank_account_bank_name: true

can_see_bank_account_currency:

can_see_bank_account_iban:

can_see_bank_account_label: true

can_see_bank_account_national_identifier:

can_see_bank_account_number: true

can_see_bank_account_owners: true

can_see_bank_account_swift_bic:

can_see_bank_account_type:

can_see_comments:

can_see_corporate_location: true

can_see_image_url: true

can_see_images: true

can_see_more_info:

can_see_open_corporates_url:

can_see_other_account_bank_name:

can_see_other_account_iban:

can_see_other_account_kind:

can_see_other_account_metadata:

can_see_other_account_national_identifier: true

can_see_other_account_number: true

can_see_other_account_swift_bic: true

can_see_owner_comment:

can_see_physical_location:

can_see_private_alias:

can_see_public_alias:

can_see_tags:

can_see_transaction_amount: true

can_see_transaction_balance:

can_see_transaction_currency:

can_see_transaction_description: true

can_see_transaction_finish_date:

can_see_transaction_metadata:

can_see_transaction_other_bank_account:

can_see_transaction_start_date:

can_see_transaction_this_bank_account:

can_see_transaction_type:

can_see_url: true

can_see_where_tag: true

description: This an optional field. Maximum length is 2000. It can be any characters here.

display_name:

hide_metadata_if_alias_used:

id: d8839721-ad8f-45dd-9f78-2080414b93f9

is_public: true

permissions:

provider: ETHEREUM

short_name:

user:

views:

Typical Successful Response:

								
									
{ "permissions":[{ "user":{ "id":"5995d6a2-01b3-423c-a173-5481df49bdaf", "provider":"http://127.0.0.1:8080", "display_name":"OBP" }, "views":[{ "id":"123", "short_name":"short_name", "description":"description", "is_public":true, "alias":"None", "hide_metadata_if_alias_used":true, "can_add_comment":true, "can_add_corporate_location":true, "can_add_image":true, "can_add_image_url":true, "can_add_more_info":true, "can_add_open_corporates_url":true, "can_add_physical_location":true, "can_add_private_alias":true, "can_add_public_alias":true, "can_add_tag":true, "can_add_url":true, "can_add_where_tag":true, "can_delete_comment":true, "can_delete_corporate_location":true, "can_delete_image":true, "can_delete_physical_location":true, "can_delete_tag":true, "can_delete_where_tag":true, "can_edit_owner_comment":true, "can_see_bank_account_balance":true, "can_see_bank_account_bank_name":true, "can_see_bank_account_currency":true, "can_see_bank_account_iban":true, "can_see_bank_account_label":true, "can_see_bank_account_national_identifier":true, "can_see_bank_account_number":true, "can_see_bank_account_owners":true, "can_see_bank_account_swift_bic":true, "can_see_bank_account_type":true, "can_see_comments":true, "can_see_corporate_location":true, "can_see_image_url":true, "can_see_images":true, "can_see_more_info":true, "can_see_open_corporates_url":true, "can_see_other_account_bank_name":true, "can_see_other_account_iban":true, "can_see_other_account_kind":true, "can_see_other_account_metadata":true, "can_see_other_account_national_identifier":true, "can_see_other_account_number":true, "can_see_other_account_swift_bic":true, "can_see_owner_comment":true, "can_see_physical_location":true, "can_see_private_alias":true, "can_see_public_alias":true, "can_see_tags":true, "can_see_transaction_amount":true, "can_see_transaction_balance":true, "can_see_transaction_currency":true, "can_see_transaction_description":true, "can_see_transaction_finish_date":true, "can_see_transaction_metadata":true, "can_see_transaction_other_bank_account":true, "can_see_transaction_start_date":true, "can_see_transaction_this_bank_account":true, "can_see_transaction_type":true, "can_see_url":true, "can_see_where_tag":true }] }] }
Validations:
  • Required JSON Validation: No
  • Allowed Authentication Types: Not set
Possible Errors:
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-30001: Bank not found. Please specify a valid value for BANK_ID.
  • OBP-30003: Account not found. Please specify a valid value for ACCOUNT_ID.
  • OBP-50000: Unknown Error.
Connector Methods:
Version: OBPv2.0.0, function_name: by getPermissionsForBankAccount, operation_id: OBPv2.0.0-getPermissionsForBankAccount Tags: View-Custom, Account, User, Entitlement,