Consent rest api
Validate
Validation endpoint used for consent enforcement
POST /validate
Request body (required): application/jwt
JWT data of request being validated
Schema: OBConsentValidateDetail
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
headers | object | Object containing keys and values of request headers received to the gateway | |
payload | object | Object containing the request payload received to the gateway | |
electedResource | string | String value of the request path received in the request | |
consentId | string | The consent ID of the consent being valdiated | |
userId | string | The consent ID of the consent being valdiated | |
clientId | string | The consent ID of the consent being valdiated | |
resourceParams | object | The context including query parameters of the request |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | OBConsentValidateOKResponse |
400 | Required parameters unavailable | OBConsentErrorCommon |
500 | Internal Server Error | OBConsentErrorCommon |
Admin
Search consent information
GET /admin/search
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
consentIDs | query | array of string | Yes | |
clientIDs | query | array of string | Yes | |
consentTypes | query | array of string | Yes | |
consentStatuses | query | array of string | Yes | |
userIDs | query | array of string | Yes | |
fromTime | query | integer | Yes | |
toTime | query | integer | Yes | |
limit | query | integer | Yes | |
offset | query | integer | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | OBConsentSearchOKResponse |
500 | Internal Server Error | OBConsentErrorCommon |
Revoke consents
DEL /admin/revoke
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
consentID | query | string | Yes | |
userID | query | string |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No content. Successful revoke | |
400 | Required parameters unavailable | OBConsentErrorCommon |
500 | Internal Server Error | OBConsentErrorCommon |
Trigger consent expiration
GET /admin/expire-consents
Responses
| Code | Description | Schema |
|---|---|---|
204 | Consent expiration successful | |
401 | Authorization not provided | |
500 | Internal Server Error |
Manage
Post endpoint for manage
POST /manage/account-access-consents
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-wso2-client-id | header | string | Yes |
Request body (required): application/json
Payload representing consent that is being created
Schema: OBConsentCreateResource
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
Data | object | ||
Data.Permissions | array of string | ||
Data.ExpirationDateTime | string (date-time) | ||
Data.TransactionFromDateTime | string (date-time) | ||
Data.TransactionToDateTime | string (date-time) | ||
Risk | object |
Responses
| Code | Description | Schema |
|---|---|---|
500 | Internal Server Error |
Get endpoint for manage
GET /manage/account-access-consents/{consent-id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
consent-id | path | string | Yes | The consent ID for the created consent |
x-wso2-client-id | header | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
500 | Internal Server Error |
Delete endpoint for manage
DEL /manage/account-access-consents/{consent-id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
consent-id | path | string | Yes | The consent ID for the created consent |
x-wso2-client-id | header | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
500 | Internal Server Error |
Authorize
Retrieve data for consent page
GET /authorize/retrieve/{session-data-key}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
session-data-key | path | string | Yes | The session data key of the consent page |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | |
500 | Internal Server Error | OBConsentErrorCommon |
Persist user consent
PATCH /authorize/persist/{session-data-key}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
session-data-key | path | string | Yes | 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
| Name | Type | Required | Description |
|---|---|---|---|
approval | boolean | ||
accountIds | array of string |
Responses
| Code | Description | Schema |
|---|---|---|
302 | Post consent redirect | |
400 | Required parameters unavailable | OBConsentErrorCommon |
500 | Internal Server Error | OBConsentErrorCommon |
Schemas
OBConsentValidateDetail
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
headers | object | Object containing keys and values of request headers received to the gateway | |
payload | object | Object containing the request payload received to the gateway | |
electedResource | string | String value of the request path received in the request | |
consentId | string | The consent ID of the consent being valdiated | |
userId | string | The consent ID of the consent being valdiated | |
clientId | string | The consent ID of the consent being valdiated | |
resourceParams | object | The context including query parameters of the request |
OBConsentErrorCommon
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
status | string | Error status code | |
title | string | Error title | |
description | string | Error description |
OBConsentValidateOKResponse
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
isValid | string | Consent validation result | |
modifiedPayload | string | Modified payload for in flow | |
errorCode | string | Error code to be sent | |
errorMessage | string | Error message to be sent | |
httpCode | string | HTTP error code |
OBConsentSearchOKResponse
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
data | array of OBConsentDetail | Detailed consent objects. Search results | |
meatadata | OBConsentSearchMetadata |
OBConsentDetail
Type: object
13 properties
| Name | Type | Required | Description |
|---|---|---|---|
clientId | string | Client ID associated with the consent | |
currentStatus | string | Current status of the consent | |
createdTimestamp | string | Consent created timestamp | |
recurringIndicator | string | Recurring indicator of the consent | |
authorizationResources | array of OBConsentAuthorizationResource | Authorization resources associated with the consent | |
updatedTimestamp | string | Last updated timestamp | |
validityPeriod | string | Consent validity period | |
consentAttributes | object | Key value pairs of consent attributes | |
consentId | string | Consent ID | |
consentMappingResources | array of OBConsentMappingResource | Account mapping resources associated with the consent | |
consentType | string | Consent type | |
receipt | object | Consent receipt | |
consentFrequency | string | Consent Frequency |
OBConsentSearchMetadata
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
total | integer | Total number of results available despite pagination | |
offset | integer | Pagination offset of result | |
count | integer | Count sent in current response | |
limit | integer | Limit applied for current result |
OBConsentAuthorizationResource
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
updatedTime | integer | Authorization updated time | |
consentID | string | Consent ID of the authorization | |
authorizationID | string | Authorization ID | |
authorizationType | string | Type of authorization | |
userID | string | User ID | |
authorizationStatus | string | Current status of the authorization |
OBConsentMappingResource
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
mappingId | string | Mapping ID | |
mappingStatus | string | Status of the mapping | |
accountId | string | Accoung ID of the mapping resource | |
authorizationID | string | Authorization ID associated with the mapping | |
permission | string | Mapping permission |
OBConsentPersistResource
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
approval | boolean | ||
accountIds | array of string |
OBConsentCreateResource
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
Data | object | ||
Data.Permissions | array of string | ||
Data.ExpirationDateTime | string (date-time) | ||
Data.TransactionFromDateTime | string (date-time) | ||
Data.TransactionToDateTime | string (date-time) | ||
Risk | object |
Was this page helpful?