{"swagger":"2.0","info":{"title":"Open Bank Project API","description":"An Open Source API for Banks. (c) TESOBE GmbH. 2011 - 2024. Licensed under the AGPL and commercial licences.","contact":{"name":"TESOBE GmbH. / Open Bank Project","url":"https://openbankproject.com","email":"contact@tesobe.com"},"version":"v4.0.0"},"host":"apisandbox.openbankproject.com","basePath":"/","schemes":["http","https"],"securityDefinitions":{"directLogin":{"type":"apiKey","description":"https://github.com/OpenBankProject/OBP-API/wiki/Direct-Login","in":"header","name":"Authorization"},"gatewayLogin":{"type":"apiKey","description":"https://github.com/OpenBankProject/OBP-API/wiki/Gateway-Login","in":"header","name":"Authorization"}},"security":[{"directLogin":[],"gatewayLogin":[]}],"paths":{"/obp/v4.0.0/consumers/{CONSUMER_ID}/scope/{SCOPE_ID}":{"delete":{"tags":["Scope","Consumer"],"summary":"Delete Consumer Scope","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"
Delete Consumer Scope specified by SCOPE_ID for an consumer specified by CONSUMER_ID
Authentication is required and the user needs to be a Super Admin.
Super Admins are listed in the Props file.
Authentication is Mandatory
","operationId":"deleteScope","parameters":[{"in":"path","name":"SCOPE_ID","description":"the scope id","required":true,"type":"string"},{"in":"path","name":"CONSUMER_ID","description":"new consumer id","required":true,"type":"string"}],"responses":{"204":{"description":"Success"},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}}},"/obp/v4.0.0/consumers/{CONSUMER_ID}/scopes":{"get":{"tags":["Scope","Consumer"],"summary":"Get Scopes for Consumer","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Get all the scopes for an consumer specified by CONSUMER_ID
Authentication is Mandatory
","operationId":"getScopes","parameters":[{"in":"path","name":"CONSUMER_ID","description":"new consumer id","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/ScopeJsons"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}},"post":{"tags":["Scope","Consumer"],"summary":"Create Scope for a Consumer","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Create Scope. Grant Role to Consumer.
Scopes are used to grant System or Bank level roles to the Consumer (App). (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
","operationId":"addScope","parameters":[{"in":"body","name":"body","description":"CreateScopeJson object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/CreateScopeJson"}},{"in":"path","name":"CONSUMER_ID","description":"new consumer id","required":true,"type":"string"}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/ScopeJson"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}}},"/obp/v4.0.0/management/consumers":{"get":{"tags":["Consumer"],"summary":"Get Consumers","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Get the all Consumers.
Authentication is Mandatory
Possible custom url parameters for pagination:
eg1:?limit=100&offset=0
eg2:?limit=100&offset=0&sort_direction=ASC
Date format parameter: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'(1100-01-01T01:01:01.000Z) ==> time zone is UTC.
eg3:?sort_direction=ASC&limit=100&offset=0&from_date=1100-01-01T01:01:01.000Z&to_date=1100-01-01T01:01:01.000Z
","operationId":"getConsumers","parameters":[],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/ConsumersJsonV310"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}},"post":{"tags":["Consumer"],"summary":"Post a Consumer","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Create a Consumer (Authenticated access).
Authentication is Mandatory
","operationId":"createConsumer","parameters":[{"in":"body","name":"body","description":"ConsumerPostJSON object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/ConsumerPostJSON"}}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/ConsumerJson"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}}},"/obp/v4.0.0/management/consumers/{CONSUMER_ID}":{"get":{"tags":["Consumer"],"summary":"Get Consumer","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Get the Consumer specified by CONSUMER_ID.
Authentication is Mandatory
","operationId":"getConsumer","parameters":[{"in":"path","name":"CONSUMER_ID","description":"new consumer id","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/ConsumerJsonV210"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}},"put":{"tags":["Consumer"],"summary":"Enable or Disable Consumers","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Enable/Disable a Consumer specified by CONSUMER_ID.
Authentication is Mandatory
","operationId":"enableDisableConsumers","parameters":[{"in":"body","name":"body","description":"PutEnabledJSON object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/PutEnabledJSON"}},{"in":"path","name":"CONSUMER_ID","description":"new consumer id","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/PutEnabledJSON"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}}},"/obp/v4.0.0/management/consumers/{CONSUMER_ID}/consumer/call-limits":{"get":{"tags":["Consumer"],"summary":"Get Call Limits for a Consumer","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Get Calls limits per Consumer.
Authentication is Mandatory
Set the API rate limits / call limits for a Consumer:
Rate limiting can be set:
Per Second
Per Minute
Per Hour
Per Week
Per Month
Authentication is Mandatory
","operationId":"callsLimit","parameters":[{"in":"body","name":"body","description":"CallLimitPostJsonV400 object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/CallLimitPostJsonV400"}},{"in":"path","name":"CONSUMER_ID","description":"new consumer id","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/CallLimitPostJsonV400"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}}},"/obp/v4.0.0/management/consumers/{CONSUMER_ID}/consumer/redirect_url":{"put":{"tags":["Consumer"],"summary":"Update Consumer RedirectUrl","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Update an existing redirectUrl for a Consumer specified by CONSUMER_ID.
CONSUMER_ID can be obtained after you register the application.
Or use the endpoint 'Get Consumers' to get it
Authentication is Mandatory
","operationId":"updateConsumerRedirectUrl","parameters":[{"in":"body","name":"body","description":"ConsumerRedirectUrlJSON object that needs to be added.","required":true,"schema":{"$ref":"#/definitions/ConsumerRedirectUrlJSON"}},{"in":"path","name":"CONSUMER_ID","description":"new consumer id","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/ConsumerJsonV210"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}}},"/obp/v4.0.0/management/users/current/consumers":{"get":{"tags":["Consumer"],"summary":"Get Consumers (logged in User)","security":[{"directLogin":[],"gatewayLogin":[]}],"description":"Get the Consumers for logged in User.
Authentication is Mandatory
","operationId":"getConsumersForCurrentUser","parameters":[],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/ConsumersJsonV310"}},"400":{"description":"Error","schema":{"$ref":"#/definitions/ErrorUserNotLoggedIn"}}}}}},"definitions":{"ErrorUserNotLoggedIn":{"properties":{"message":{"type":"string","example":"OBP-20001: User not logged in. Authentication is required!"}}},"ResourceUserJSON":{"required":["provider","email","username","provider_id","user_id"],"properties":{"provider":{"type":"string","example":"http://127.0.0.1:8080"},"email":{"type":"string","example":"felixsmith@example.com"},"username":{"type":"string","example":"felixsmith"},"provider_id":{"type":"string","example":"Chris"},"user_id":{"type":"string","example":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1"}}},"ConsumerJson":{"required":["secret","created_by_user_id","app_type","description","created_by_user","enabled","client_certificate","redirect_url","key","developer_email","consumer_id","app_name","created"],"properties":{"secret":{"type":"string","example":"bwf0ykmwoirip1yjxcn15wnhuyxcziwgtcoaildq"},"created_by_user_id":{"type":"string","example":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1"},"app_type":{"type":"string","example":"Web"},"description":{"type":"string","example":"Account Management"},"created_by_user":{"$ref":"#/definitions/ResourceUserJSON"},"enabled":{"type":"boolean","example":"true"},"client_certificate":{"type":"string","example":"-----BEGIN CERTIFICATE-----\nclient_certificate_content\n-----END CERTIFICATE-----"},"redirect_url":{"type":"string","example":"www.openbankproject.com"},"key":{"type":"string","example":"xwdgylv3vau0n2gkxu1aize4glapftfldp5y1bic"},"developer_email":{"type":"string","example":"felixsmith@example.com"},"consumer_id":{"type":"string","example":"7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh"},"app_name":{"type":"string","example":"SOFI"},"created":{"type":"string","format":"date","example":"1100-01-01T00:00:00Z"}}},"ConsumersJsonV310":{"required":["consumers"],"properties":{"consumers":{"type":"array","items":{"$ref":"#/definitions/ConsumerJsonV310"}}}},"RateLimit":{"properties":{"calls_made":{"type":"integer","format":"int64","example":"-1"},"reset_in_seconds":{"type":"integer","format":"int64","example":"-1"}}},"ConsumerJsonV310":{"required":["app_type","description","created_by_user","enabled","redirect_url","developer_email","consumer_id","app_name","created"],"properties":{"app_type":{"type":"string","example":"Web"},"description":{"type":"string","example":"Account Management"},"created_by_user":{"$ref":"#/definitions/ResourceUserJSON"},"enabled":{"type":"boolean","example":"true"},"redirect_url":{"type":"string","example":"www.openbankproject.com"},"developer_email":{"type":"string","example":"felixsmith@example.com"},"consumer_id":{"type":"string","example":"8e716299-4668-4efd-976a-67f57a9984ec"},"app_name":{"type":"string","example":"SOFI"},"created":{"type":"string","format":"date","example":"1100-01-01T00:00:00Z"}}},"ConsumerJsonV210":{"required":["created_by_user_id","app_type","description","created_by_user","enabled","redirect_url","developer_email","consumer_id","app_name","created"],"properties":{"created_by_user_id":{"type":"string","example":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1"},"app_type":{"type":"string","example":"Web"},"description":{"type":"string","example":"Account Management"},"created_by_user":{"$ref":"#/definitions/ResourceUserJSON"},"enabled":{"type":"boolean","example":"true"},"redirect_url":{"type":"string","example":"www.openbankproject.com"},"developer_email":{"type":"string","example":"felixsmith@example.com"},"consumer_id":{"type":"integer","format":"int64","example":"1213"},"app_name":{"type":"string","example":"SOFI"},"created":{"type":"string","format":"date","example":"1100-01-01T00:00:00Z"}}},"RedisCallLimitJson":{"properties":{"per_week":{"$ref":"#/definitions/RateLimit"},"per_second":{"$ref":"#/definitions/RateLimit"},"per_month":{"$ref":"#/definitions/RateLimit"},"per_day":{"$ref":"#/definitions/RateLimit"},"per_minute":{"$ref":"#/definitions/RateLimit"},"per_hour":{"$ref":"#/definitions/RateLimit"}}},"CallLimitPostJsonV400":{"required":["per_month_call_limit","per_week_call_limit","per_hour_call_limit","per_second_call_limit","from_date","per_minute_call_limit","per_day_call_limit","to_date"],"properties":{"per_month_call_limit":{"type":"string","example":"-1"},"per_week_call_limit":{"type":"string","example":"-1"},"api_version":{"type":"string"},"per_hour_call_limit":{"type":"string","example":"-1"},"bank_id":{"type":"string"},"per_second_call_limit":{"type":"string","example":"-1"},"from_date":{"type":"string","format":"date","example":"1100-01-01T00:00:00Z"},"api_name":{"type":"string"},"per_minute_call_limit":{"type":"string","example":"-1"},"per_day_call_limit":{"type":"string","example":"-1"},"to_date":{"type":"string","format":"date","example":"1100-01-01T00:00:00Z"}}},"CallLimitJson":{"required":["per_month_call_limit","per_week_call_limit","per_hour_call_limit","per_second_call_limit","per_minute_call_limit","per_day_call_limit"],"properties":{"current_state":{"$ref":"#/definitions/RedisCallLimitJson"},"per_month_call_limit":{"type":"string","example":"-1"},"per_week_call_limit":{"type":"string","example":"-1"},"per_hour_call_limit":{"type":"string","example":"-1"},"per_second_call_limit":{"type":"string","example":"-1"},"per_minute_call_limit":{"type":"string","example":"-1"},"per_day_call_limit":{"type":"string","example":"-1"}}},"ConsumerRedirectUrlJSON":{"required":["redirect_url"],"properties":{"redirect_url":{"type":"string","example":"http://localhost:8888"}}},"CreateScopeJson":{"required":["bank_id","role_name"],"properties":{"bank_id":{"type":"string","example":"gh.29.uk"},"role_name":{"type":"string","example":"CanGetEntitlementsForAnyUserAtOneBank"}}},"PutEnabledJSON":{"required":["enabled"],"properties":{"enabled":{"type":"boolean","example":"false"}}},"ScopeJsons":{"required":["list"],"properties":{"list":{"type":"array","items":{"$ref":"#/definitions/ScopeJson"}}}},"ScopeJson":{"required":["scope_id","role_name","bank_id"],"properties":{"scope_id":{"type":"string","example":"88625da4-a671-435e-9d24-e5b6e5cc404f"},"role_name":{"type":"string","example":"CanGetEntitlementsForAnyUserAtOneBank"},"bank_id":{"type":"string","example":"gh.29.uk"}}},"ConsumerPostJSON":{"required":["created_by_user_id","app_type","description","enabled","redirect_url","developer_email","clientCertificate","app_name","created"],"properties":{"created_by_user_id":{"type":"string","example":"createdby"},"app_type":{"type":"string","example":"Test"},"description":{"type":"string","example":"Description"},"enabled":{"type":"boolean","example":"true"},"redirect_url":{"type":"string","example":"redirecturl"},"developer_email":{"type":"string","example":"some@email.com"},"clientCertificate":{"type":"string","example":"-----BEGIN CERTIFICATE-----\nclient_certificate_content\n-----END CERTIFICATE-----"},"app_name":{"type":"string","example":"Test"},"created":{"type":"string","format":"date","example":"2024-03-26T11:02:50Z"}}}}}