Skip to Content

Create a Repository Using the Onboarding API for Google Drive

Create your repository to Document Management Service, Integration Option as it's required for establishing a connection with Google Drive.
You will learn
  • How to onboard a repository using API.
Vikramkulkarni01Vikram KulkarniJune 19, 2023
Created by
Vikramkulkarni01
June 13, 2023
Contributors
Vikramkulkarni01

Prerequisites

  • Step 1

    Copy the url: parameter from the generated service key.

    Copy_URL
  • Step 2
    1. Open the Postman. Click on New and then select HTTP Request to open a new tab on Postman to work on.

      Postman
    2. Select the POST method and enter the request URL as like this:
      "url">/rest/v2/repositories.

      Example: You must ensure that you are adding the parameter /rest/v2/repositories as suffix to the request URL. So that the final sample request URL looks like this: https://api-abc-de.cfapps.sap.hana.ondemand.com/rest/v2/repositories

      req
    3. Navigate to Authorization tab and select the type Bearer Token. Enter the JSON web token that you generate in this tutorial Generating the JSON Web Token (JWT).

      AuthorizationDetails
    4. Navigate to the Body tab and copy paste the following code snippet.

      JSON
      Copy
      {
        "repository": {
          "displayName": "MytestReposiory",
          "description": "Onboarding as part of the tutorial",
          "repositoryType": "external",
          "externalId": "MyTutONBRepo",
          "repositoryCategory": "GoogleWorkspace",
          "repositoryId": "GoogleConnectorEntry"
        },
        "connection": {
          "destinationName": "MyTest"
        }
      }
      

      Note Please modify the details according to your needs. It is not necessary to follow the same code snippet. A few details, such as display name, and destination names, may change. It is important that you read the Prerequisites again.

      EnterCodeSnippet

      Click Send.

    5. When a successful response is received, the status is 200 OK.

      Results

      Results
  • Step 3

    If your response is successful, what is the response status code you receive?

Back to top