Modifying LOVs Using REST API

You can modify LOVs in Design Time Repository (DR) and Runtime Repository (RR) environments by importing multiple LOVs using REST API. The ability to load LOVs using REST API is provided by the LOV Import Service business service, which is available in both DR and RR environments.

To modify LOVs using REST API

  1. Upload multiple LOVs using, for example, an external tool such as SOAP UI.

    To upload multiple LOVs, you must:

    • Use the UpsertLOV method of the LOV Import Service, which is updated in both DR and RR environments.

    • Define the following key attributes in the DR environment because they dictate where the LOVs will be created - these attributes are optional and can be ignored for RR environments (which only have a MAIN Workspace):

      • WorkspaceName. The name of the Workspace where LOVs will be imported to.

      • ParentWorkspaceName. The parent Workspace name under which the Workspace resides.

    • Define additional attributes, such as the field names from the LOVs business component.

    Use the following template as an example, and copy as many as is necessary of the block under List of Values to create the desired number of records:

    {"body":{ 
       "WorkspaceName":"dev_sadmin_ContactCreation",
       "ParentWorkspaceName":"MAIN", 
       "SiebelMessage":{ 
          "MessageId":"",
          "MessageType":"Integration Object",
          "IntObjectName":"List Of Values", 
          "IntObjectFormat":"Siebel Hierarchical",
          "ListOfList Of Values":{ 
          "List Of Values":[ 
          { 
          "Order By":"1", 
          "Name":"REST_LOV_TEST",
          "Replication Level":"All",
          "Type":"LOV_TYPE", 
          "Translate":"Y", 
          "Multilingual":"N",
          "Language":"ENU",
          "Active":"Y", 
          "Description":"REST_LOV_TEST",
          "Sub Type":"",
          "Value":"REST_LOV_TEST" 
          },
           { 
          "Order By":"1", 
          "Name":"REST_LOV_1",
          "Replication Level":"All",
          "Type":"REST_LOV_TEST", 
          "Translate":"Y", 
          "Multilingual":"N",
          "Language":"ENU",
          "Active":"Y", 
          "Description":"REST_LOV_1",
          "Sub Type":"",
          "Value":"REST_LOV_1" 
          },
           { 
          "Order By":"2", 
          "Name":"REST_LOV_2",
          "Replication Level":"All",
          "Type":"REST_LOV_TEST", 
          "Translate":"Y", 
          "Multilingual":"N",
          "Language":"ENU",
          "Active":"Y", 
          "Description":"REST_LOV_2",
          "Sub Type":"",
          "Value":"REST_LOV_2"
          },...
  2. After you run the REST API call, check that the LOVs have loaded into your application.

    For example, to locate the LOVs listed in the sample provided in the previous step, do the following:

    • Navigate to the Administration - Data screen, then the List Of Values view.

    • Click Clear Cache to make sure that it has the most current information.

    • Click New Query and in the Type field, search for the following:
      [Type]=REST_LOV_TYPE or [Name]=REST_LOV_TYPE

      The search results return a list of the LOVs that were loaded, for example, as follows:

      LOV_TYPE Display Value Language-Independent Code Language Name Order Active

      LOV_TYPE

      REST_LOV_TEST

      REST_LOV_TEST

      English-American

      1

      Yes

      REST_LOV_TEST

      REST_LOV_1

      REST_LOV_1

      English-American

      1

      Yes

      REST_LOV_TEST

      REST_LOV_2

      REST_LOV_2

      English-American

      2

      Yes