
From the created base view, it is possible to search for files containing any specific string i n their names: The base view’s schema is created over the data source using the response obtained with the sample value. This is needed to send a sample request to the data source to test the connectivity and, when creating the base view, to introspect the schema. When we create the data source and base view, a dialogue will ask for a value for the name parameter:
Click Ok to fill the remaining fields in the “Authentication” section. In Paste authorization response URL, give the URL retrieved in the previous step. In Generate the authentication URL, click Generate and then Open URL. Check Set the “state” request parameter. Note: To see a list of the other scopes that can be used, check. Otherwise, select Other, and replace the port in the default redirect URI with your web container port. Redirect URI : If your web container port is 9090, then use the default redirect URI. Click Launch the OAuth 2.0 credentials wizard to help you obtain these credentials. Client secret : Give the one obtained from Google Developers Console. Client identifier : Give the one obtained from Google Developers Console. Authorization Grant : Authorization code grant. For the URL, GET requests of this API follow this format: In the “ Authentication” section:. For the Data route, select HTTP Client. In Design Studio, you can hover over the connected virtual database, and click on the three dots to go to New > Data source > JSON. Now that the API is enabled and the authentication is set, a JSON data source can be created in Virtual DataPort to access Google Drive’s REST API.Īs an example, we will create a data source that searches for a filename via a parameterized query using the following request request will return all the folders and files with names containing the string passed as the name parameter. Two values will be used for the OAuth 2.0 authentication, and they are known to Google and the application as: Once the OAuth 2.0 client ID is configured, its details can be found in the Credentials tab. Give a name for the credentials, such as:. In the Google Drive API overview page, click Create Credentials :. Go back to the Dashboard tab, and click on the Google Drive API.
Click on the Library tab, and search for the Google Drive API to enable it:.
Before creating a data source in Virtual DataPort, it is necessary to configure the Google Developer account to be able to authenticate an application using OAuth 2.0 : Google Drive offers a REST API with full capabilities to perform CRUD operations from our applications. We will create a JSON data source specifying the resource we want to access and authenticate ourselves using OAuth 2.0. This document explains how to access Google Drive from Virtual DataPort by taking advantage of the Google Drive API.