Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Consent rest api

Download OpenAPI (YAML)Version v1.0

Base URL: https://localhost:9446/api/openbanking/consent

Validate​

Validation endpoint used for consent enforcement​

POST /validate

Request body (required): application/jwt

JWT data of request being validated

Schema: OBConsentValidateDetail

7 properties
NameTypeRequiredDescription
headersobject

Object containing keys and values of request headers received to the gateway

payloadobject

Object containing the request payload received to the gateway

electedResourcestring

String value of the request path received in the request

consentIdstring

The consent ID of the consent being valdiated

userIdstring

The consent ID of the consent being valdiated

clientIdstring

The consent ID of the consent being valdiated

resourceParamsobject

The context including query parameters of the request

Responses

CodeDescriptionSchema
200

OK

OBConsentValidateOKResponse
400

Required parameters unavailable

OBConsentErrorCommon
500

Internal Server Error

OBConsentErrorCommon

Admin​

Search consent information​

GET /admin/search

Parameters

NameInTypeRequiredDescription
consentIDsqueryarray of stringYes
clientIDsqueryarray of stringYes
consentTypesqueryarray of stringYes
consentStatusesqueryarray of stringYes
userIDsqueryarray of stringYes
fromTimequeryintegerYes
toTimequeryintegerYes
limitqueryintegerYes
offsetqueryintegerYes

Responses

CodeDescriptionSchema
200

OK

OBConsentSearchOKResponse
500

Internal Server Error

OBConsentErrorCommon

Revoke consents​

DEL /admin/revoke

Parameters

NameInTypeRequiredDescription
consentIDquerystringYes
userIDquerystring

Responses

CodeDescriptionSchema
204

No content. Successful revoke

400

Required parameters unavailable

OBConsentErrorCommon
500

Internal Server Error

OBConsentErrorCommon

Trigger consent expiration​

GET /admin/expire-consents

Responses

CodeDescriptionSchema
204

Consent expiration successful

401

Authorization not provided

500

Internal Server Error

Manage​

Post endpoint for manage​

POST /manage/account-access-consents

Parameters

NameInTypeRequiredDescription
x-wso2-client-idheaderstringYes

Request body (required): application/json

Payload representing consent that is being created

Schema: OBConsentCreateResource

6 properties
NameTypeRequiredDescription
Dataobject
Data.Permissionsarray of string
Data.ExpirationDateTimestring (date-time)
Data.TransactionFromDateTimestring (date-time)
Data.TransactionToDateTimestring (date-time)
Riskobject

Responses

CodeDescriptionSchema
500

Internal Server Error

Get endpoint for manage​

GET /manage/account-access-consents/{consent-id}

Parameters

NameInTypeRequiredDescription
consent-idpathstringYes

The consent ID for the created consent

x-wso2-client-idheaderstringYes

Responses

CodeDescriptionSchema
500

Internal Server Error

Delete endpoint for manage​

DEL /manage/account-access-consents/{consent-id}

Parameters

NameInTypeRequiredDescription
consent-idpathstringYes

The consent ID for the created consent

x-wso2-client-idheaderstringYes

Responses

CodeDescriptionSchema
500

Internal Server Error

Authorize​

Retrieve data for consent page​

GET /authorize/retrieve/{session-data-key}

Parameters

NameInTypeRequiredDescription
session-data-keypathstringYes

The session data key of the consent page

Responses

CodeDescriptionSchema
200

OK

500

Internal Server Error

OBConsentErrorCommon

Persist user consent​

PATCH /authorize/persist/{session-data-key}

Parameters

NameInTypeRequiredDescription
session-data-keypathstringYes

The session data key of the consent page (used for retrieve)

Request body (required): application/json

Payload representing whether the user approved the consent and selected accounts

Schema: OBConsentPersistResource

2 properties
NameTypeRequiredDescription
approvalboolean
accountIdsarray of string

Responses

CodeDescriptionSchema
302

Post consent redirect

400

Required parameters unavailable

OBConsentErrorCommon
500

Internal Server Error

OBConsentErrorCommon

Schemas​

OBConsentValidateDetail​

Type: object

7 properties
NameTypeRequiredDescription
headersobject

Object containing keys and values of request headers received to the gateway

payloadobject

Object containing the request payload received to the gateway

electedResourcestring

String value of the request path received in the request

consentIdstring

The consent ID of the consent being valdiated

userIdstring

The consent ID of the consent being valdiated

clientIdstring

The consent ID of the consent being valdiated

resourceParamsobject

The context including query parameters of the request

OBConsentErrorCommon​

Type: object

3 properties
NameTypeRequiredDescription
statusstring

Error status code

titlestring

Error title

descriptionstring

Error description

OBConsentValidateOKResponse​

Type: object

5 properties
NameTypeRequiredDescription
isValidstring

Consent validation result

modifiedPayloadstring

Modified payload for in flow

errorCodestring

Error code to be sent

errorMessagestring

Error message to be sent

httpCodestring

HTTP error code

OBConsentSearchOKResponse​

Type: object

2 properties
NameTypeRequiredDescription
dataarray of OBConsentDetail

Detailed consent objects. Search results

meatadataOBConsentSearchMetadata

OBConsentDetail​

Type: object

13 properties
NameTypeRequiredDescription
clientIdstring

Client ID associated with the consent

currentStatusstring

Current status of the consent

createdTimestampstring

Consent created timestamp

recurringIndicatorstring

Recurring indicator of the consent

authorizationResourcesarray of OBConsentAuthorizationResource

Authorization resources associated with the consent

updatedTimestampstring

Last updated timestamp

validityPeriodstring

Consent validity period

consentAttributesobject

Key value pairs of consent attributes

consentIdstring

Consent ID

consentMappingResourcesarray of OBConsentMappingResource

Account mapping resources associated with the consent

consentTypestring

Consent type

receiptobject

Consent receipt

consentFrequencystring

Consent Frequency

OBConsentSearchMetadata​

Type: object

4 properties
NameTypeRequiredDescription
totalinteger

Total number of results available despite pagination

offsetinteger

Pagination offset of result

countinteger

Count sent in current response

limitinteger

Limit applied for current result

OBConsentAuthorizationResource​

Type: object

6 properties
NameTypeRequiredDescription
updatedTimeinteger

Authorization updated time

consentIDstring

Consent ID of the authorization

authorizationIDstring

Authorization ID

authorizationTypestring

Type of authorization

userIDstring

User ID

authorizationStatusstring

Current status of the authorization

OBConsentMappingResource​

Type: object

5 properties
NameTypeRequiredDescription
mappingIdstring

Mapping ID

mappingStatusstring

Status of the mapping

accountIdstring

Accoung ID of the mapping resource

authorizationIDstring

Authorization ID associated with the mapping

permissionstring

Mapping permission

OBConsentPersistResource​

Type: object

2 properties
NameTypeRequiredDescription
approvalboolean
accountIdsarray of string

OBConsentCreateResource​

Type: object

6 properties
NameTypeRequiredDescription
Dataobject
Data.Permissionsarray of string
Data.ExpirationDateTimestring (date-time)
Data.TransactionFromDateTimestring (date-time)
Data.TransactionToDateTimestring (date-time)
Riskobject

Was this page helpful?