Create a Service Connection

You can create service connections by selecting a service in your catalog, by providing a specification document for a service, or by providing the location of a service endpoint. After specifying the service you want to use you can select which service endpoints you want to expose.

You can create service connections to REST services that support both the OpenAPI 3.0 and Swagger 2.0 specifications. If the service description that you use to create the service connection includes an error, VB Studio displays it.

Create a Service Connection from the Catalog

You create a connection from the Service Catalog when you have access to one of the backend services that are available in the Service Catalog, namely Oracle Cloud Applications and Oracle Integration.

Creating a connection to a service from the Service Catalog saves you time as common configuration tasks like authentication, connection type, headers are predefined for you so you can browse through the various endpoints available in a particular backend service.

The Services Catalog is automatically populated with a list of services and endpoints available to you from your associated Oracle Cloud Applications, Integrations or other service instances. To access a service that is not listed in your catalog, you can try to create the service connection by using a service specification (ADF BC REST, OpenAPI/Swagger) or by specifying an endpoint URL.

If you do not see any services in the Service Catalog, you should confirm the following:

  • You have supplied all the details for a given backend service including base URL, required headers, authentication, and connection type. If you are connecting to an Oracle Cloud Applications or Integrations service instance, use the Services tab in the app's Settings editor to check the URL and authentication mechanism in the backend service.

  • You are authorized to access the service with your credentials. Contact the service's administrator to confirm that your credentials are authorized.

  • The service is currently available. Check the connection status of the service manually using a tool such as cURL or Postman.

To create a connection to a service in the catalog:

  1. Open Service Connections in the Navigator and click Create Service Connection ( Create Service Connection icon ).
  2. Click Select from Catalog in the Select Source step of the Create Service Connection wizard.
  3. Click the tile for the service catalog.

    The window displays tiles for the available service catalogs.



  4. Select the service and endpoints you want to add. Click Create.

    When you add connection to Integrations, you can select any of the activated REST endpoints provided by your Integrations service. When you add connections to Oracle Cloud Applications services, you first choose a service in the catalog and then select the REST endpoints.


    Description of service-connections-create-catalogselect.png follows
    Description of the illustration service-connections-create-catalogselect.png

    The Select Endpoints pane displays a list of the endpoints available for each resource provided by the service.


    Description of service-connections-create-catalogendpoints.png follows
    Description of the illustration service-connections-create-catalogendpoints.png

    Tip:

    You can select a top-level object to select all endpoints for that object, or select individual endpoints to improve performance.

After a service connection is created, you can select it in the Navigator to open the connection in the editor and edit the endpoints associated with the service and other connection details. VB Studio also creates additional endpoints, where necessary, to provide access to the data that you may require in your web or mobile application for lists of values.


Description of service-connections-editortabs.png follows
Description of the illustration service-connections-editortabs.png

The connection details are generated automatically by the wizard. You should exercise caution when editing the connection details to avoid changing details that would cause the connection to fail.

Create a Service Connection from a Service Specification

You create a connection from a service specification when you know the URL of the OpenAPI/Swagger or ADF file that describes the service, or you can upload the describe file from your local system.

To create a connection from a service specification:

  1. Open Service Connections in the Navigator and click Create Service Connection ( Create Service Connection icon ).
  2. Click Define by Specification in the Select Source pane of the Create Service Connection wizard.
  3. Type a name for the connection in the Service Id field.
    The Service Id is the display name for the connection in your application.
    Description of service-connections-create-specifyservice.png follows
    Description of the illustration service-connections-create-specifyservice.png
  4. Select the API Type and the location of the Service Specification document. Click Next.
    If you select Web Address for Service Specification, enter the URL of the service description on the text field. If you select Document, upload the file describing the service from your local system by dragging the file into the dialog box or by navigating to the location in your local file browser.
  5. Select the resources and endpoints you want to add. Click Create.

    Tip:

    The Select Endpoints pane displays a list of the endpoints and child objects available for each resource provided by the service. You can select a top-level object to select all endpoints for that object, or expand the top-level object node and select individual endpoints to improve performance.

After a service connection is created, you can select it in the Navigator to open the connection in the editor and edit the endpoints associated with the service and other connection details.

Create a Service Connection from an Endpoint

You create a connection from an endpoint when you know the base URI of a service and can provide the necessary parameters for connecting to the service, such as authentication details and an example of the body of the Response.

To create a service connection from the URL of an endpoint:

  1. Open Service Connections in the Navigator and click Create Service Connection ( Create Service Connection icon ).
  2. Click Define by Endpoint in the Select Source pane of the Create Service Connection wizard.
  3. Select the HTTP method and type the URL of the endpoint. Click Next.

    If you know what type of action you want to perform, select it in the Action Hint dropdown list.

    Description of service-connections-create-specifyendpoint.png follows
    Description of the illustration service-connections-create-specifyendpoint.png
  4. In the Service tab, confirm that the Service name, title and version. Optionally, enter a description.
  5. Open the Server tab and select an authentication option from the Authentication for logged-in users dropdown, if required.

    Authentication is None by default and the connection type is Dynamic, the service supports CORS by default. Within the Server tab, you can also specify an application profile if you want to use the server that is specified here for a specific phase of an application’s development. You can also add custom and secure headers to be used when the service connection connects to the REST service using this server. Finally, you can choose a connection type.

  6. Open the Operation tab to view the Endpoint ID that VB Studio will use to identify the REST API endpoint you specified at the start of this task.
  7. Open the Request tab to add Headers and URL parameters to the request.
    Depending on the endpoint, you might want to add custom headers or path or query parameters that are passed as part of the request.Create Service Connection Dialog
  8. Open the Response tab and enter the response body for the endpoint.

    The Response tab contains a text area where you can paste in an example of the body of the response. The example in the Response is the definition of the structure of the returned object. If you do not have an example, you can use the Test tab to send a request to the service and save the response as an example using the Save as Example Response button. You can edit the response body in the text area in the Response tab.



  9. Open the Test tab to test your request and view the response from the endpoint.

    Click Send to view the Response body and headers that will be received to confirm that you will receive the data you want.

    Send Response Dialog

    You can experiment with the different request parameters until you achieve the response you want.

    You use the Test tab to test the service and view the response to the request that will be sent to the endpoint based on the settings in the other tabs. If your response returns an error you will need to check the details of your connection, for example, to ensure that you are using the correct credentials or that the service uses a valid SSL certificate.

  10. Click Create when you are satisfied with the parameters of your request and the response.

Tip:

After you add an endpoint from the service, you can add more endpoints from the same service by clicking + Endpoints in the Endpoints tab of the connection.