Since you have landed here, we assume you already have or requested for Apigee developer portal.
The intent of this document is to create a customized openbank developer portal from default Apigee developer Portal.
To know more about Apigee developer portal, refer http://apigee.com/docs/developer-services/content/what-developer-portal.
On successful deployment of customized developer portal, you will be able to access following:
- Apigee Edge Developer Portal with a customized theme for OpenBank.
- Openbank API Documentation for easy understanding.
- OpenBank Sandbox for trying out openbank APIs
- App Gallery to promote App ecosystem of your API program.
Your portal after the openbank customization will look like openbank.apigee.com
- You have an Apigee OpenBank APIs deployed on your Apigee org(If not, click here).
- Apigee dev-portal admin access.
- Access to your site’s repo.
- If you have dev portal setup on cloud, you must have pantheon access for the portal. If you don't have it already, you will need to connect with Apigee team to request to associate your pantheon account(Sign Up) with Apigee developer portal. Working with panthoen.
- If you have dev portal setup on-premise, you already have access to your site repo at /var/html/www
- Clone this openbank git repo.
- /openbank/src/developerportal contains the custom openbank portal code.
clone the default portal code. You will find relevant instructions on how to clone, in the pantheon UI or click here.
You will find the default developer code at /var/www/html/sites on the portal instance.
A backup of default portal’s code is recommended before importing custom changes.
Login Pantheon -> goto your portal site -> Backups -> and create a new backup.
Take backup of /var/www/html/sites directory.
In order to update the swagger files (src/devportal/all/modules/custom/openbank_swagger) with the parameters such as host, client ID, client secret, you need to execute the /openbank/init_portal.js script.
- APIGEE edge org should have 'PISP_App' and 'AISP_App' apps(the deploy script would have created it by default).
$ cd openbank
$ npm install
$ node init_portal.js
- Provide the APIGEE edge org, env, username password etc when prompted while executing the script.
- Replace the sites/all folder of default portal repo with the git repo openbank/src/devportal/all.
$ cp -r openbank/src/devportal/all <path to pantheon cloned repo>/sites
you will need to push the changes back to the pantheon git repo.
cd <path to pantheon cloned repo>
git add sites/all
git commit -m "replacing all folder"
git push origin master
Please provide pantheon username and password if prompted. Alternatively you can update the pantheon profile with your SSH key.
The changes are already there in /var/html/www, which will automatically reflect on the portal.
Please log in to the portal with the admin credentials. Once you have logged in with admin credentials, you will find the admin menu for making portal customizations.
- Go to admin menu Configuration -> SmartDocs -> Advanced settings.
- Click on Choose File button to select the .hbr file from cloned/downloaded openbank source code i.e. /openbank/src/developerportal/smartdocs-openbank.hbr
This theme contains all openbank related customisation for the portal, and hence needs to be enabled and set as default.
- Goto {your_portal_site}/admin/appearance.
- Choose dbank responsive theme, enable it and set it as default.
All the required images are zipped in openbank repo here - openbank/src/devportal/opebank.zip and need to be imported on the portal.
- Goto {your_portal_site}/file/add/upload/archive
- Upload the zip openbank/src/devportal/opebank.zip
- Click submit.
All the required files will be automatically available, and can be found in admin -> content -> Files
Smartdocs methods provide a template for configuring and making API calls through the portal. Hence each API needs a smartdoc method associated with it. In order to create smartdocs for the APIS, one needs to import respective Open API json files which will get converted to smartdocs method internally. In order to do so, follow the steps below:
4.4.1 Enable the openbank swagger modules
To enable openbank swagger or any other module, go to admin -> modules and enable them.
- Select openbank_swagger module from the list of modules, enable it.
- Select smartdocs_auth module from the list, enable it.
- Save the configuration.
4.4.2 Create models and import all openbank API’s swagger files Import of all openbank API’s swagger files need to be done for creation of the respective smartdocs. In order to do so,
- Goto address bar > enter {your_portal_site}/swagger/import
- Creation of models and import of swagger will start and the progress can be seen on UI.
4.4.3 Render and publish all API’s methods
- Goto address bar > enter {your_portal_site}/swagger/publish
- Rendering and publishing of models will start and the progress of the same will be seen on UI.
- You’ll find list of all OpenBank APIs models, rendered and published in admin menu -> Content -> SmartDocs.
4.4.4 Configure OAuth 2.0 authentication This section is applicable to accounts and userinfo openbank resources only i.e. should not be applied to OAuth and Basepath API documentation. OAuth 2.0 authentication can be used to secure the access to the API. Following steps need to be done to accomplish this.
4.4.4.1 Update Security Scheme
- Select Content > SmartDocs.
- For accountapis and userinfoapis API models, select settings from Operations drop-down.
- Select Edit for aisp_auth security scheme.
- Select Authorisation code for Grant type.
- In Advanced Settings section set Authorization Request Method to Header.
- Select Submit.
4.4.4.2 Configure Template Authentication Scheme
- Select Content > SmartDocs.
- For the accountsapis API models, select Settings from Operations drop-down.
- In Template authentication schemes, set Client Id & Client Secret to the Client Id & Client Secret of 'AISP_App' app, which was created during deployment. (https://enterprise.apigee.com/platform/{org}/apps)
- For the userinfoapis API models, select Settings from Operations drop-down.
- In Template authentication schemes, set Client Id & Client Secret to the Client Id & Client Secret of 'AISP_App' app, which was created during deployment.
- Ensure that the callback URL fetched on Saving the Template Auth for accountsapis and userinfoapis models is already present in the 'AISP_App's' list of comma seperated values for callback URL. If not, do the same.
- Goto {your_portal_site}/admin/modules
- Enable each of the following modules ONE BY ONE SEQUENTIALLY
- Enable home_page_blocks
- Click Save Configuration (note: You need to save configuration after you enable each module)
- Enable all_component_features
- Save the configuration
- Enable openbank_install module
- Save the configuration
- Goto admin-> configuration -> Development -> performance.
- Click "clear all caches"
- Goto admin menu -> structure -> context.
- Select Edit for "custom_home".
- Select "Blocks" from the Reactions section.
- Select block drop down, and select Home Page blocks, API CATALOGUE desc and Reference Apps.
- Assign row weights to the blocks.
- Click on save.
Visit the portal.
Go through the documentation, create your own Apps and explore the APIS.
Note:
- In order to Get started, click on getting-started on the main page.
- For exploring and trying the APIs click on the APIs on the main menu, select from the list of APIs available, and get started.
one can go and create own developer app and register it. In order to accomplish this:
- Goto MY ACCOUNT -> My Apps.
- Click on Add a new App and specify the following values.
- Specify any Name.
- Select a product type from the list of products depending on the requirement of the app.
one can go and change the default logo for the portal by following the steps below:
- Goto admin menu Appearance -> settings -> dbank Responsive theme.
- Goto Logo image settings section.
- Uncheck default Logo opetion.
- Upload new logo for the portal.
- Uncheck Shortcut icon settings.
- Upload new Shortcut icon for the portal.
- Save the changes.
- Goto admin menu Configuration -> System -> Site Information.
- Goto site details section and make required changes.
- Save the changes.
- In order to create new smartdocs for the portal, one can go to admin menu -> content -> smartdocs, create new model, import respective open api files and render.
- To manage user registration, goto admin menu -> configuration -> people -> account settings, and make respective changes.