Create a Business Object Catalog from a Data Sample

Use Oracle Visual Builder Add-in for Excel to create a business object catalog from a data sample when you don't have an OpenAPI-compliant service metadata document.

If you have the host, base path, and resource name for the service, the add-in can form the REST endpoint URL and send a GET request to the service to fetch a sample of data. The add-in can then use this sample to produce a list of fields available for that REST resource.

The add-in does this by first analyzing the JSON response to find the first JSON array available. It then selects the first JSON object in that array and, from this object, produces a list of business object fields. The add-in then creates a new business object in the catalog with that list of fields.

This new business object includes best guesses for the following:

  • The Collection Path including GET and POST (create) operations
  • Item Path including GET, PATCH (update), and DELETE operations
  • Field properties such as data type

Note:

These guesses may not match the actual capabilities of the service. It is recommended that you review the business object definition and make sure it matches the service.
  1. Click Manage Catalogs from the Oracle Visual Builder ribbon.
  2. Open the desired catalog or create a new one.

    Make sure the Host and Base Path properties are set correctly.

  3. From the Business Objects tab, click + Add, then select Create a New Business Object from a Data Sample from the list.
  4. Type in the name of the desired resource and click OK.

  5. Review the business object definition to ensure it matches the service.

    Here are some things to watch for:

    • If the service does not support delete, remove that operation from the item path or turn off delete in any layout that uses this business object.
    • If a given field is required or read-only, update the field settings from the General tab of the Business Object Field editor. Date fields may appear as string fields. Adjust the data type of fields as needed.
    • The add-in can't determine the data type of fields with null values. In these cases, the data type is set to "unsupported". These fields are not eligible for layouts, search, and so on. For these fields, correct the data type using the Business Object Field editor.
    • The add-in guesses that the primary key field is named "id". If the primary key field has a different name, use the Business Object Editor to update the item path as well as the parameter on each operation in the item path.