Scroll

5.4: CcaWebAPI: create a sample list

5.4: CcaWebAPI: create a sample list

Follow

To create a list using external data source you can send the json object below using POST to the /Lists controller

The code below does only contain the necessary properties is you want the create a list using an external datasource.

 

{

    "ExternalDataDSN": "KDW_SampleData;UID=sa;PWD=sa",

    "ExternalDataPath": "",

    "ExternalDataTable": "KDW_LIST1",

    "ExternalDataType": 2,

    "Fields": [

      {

        "Dynamic": false,

        "Exported": false,

        "ListFieldRoles": [],

        "Name": "gender",

        "Size": 50,

        "Type": 10

      },

      {

        "Dynamic": false,

        "Exported": false,

        "ListFieldRoles": [

          {

            "Param": -1,

            "Role": 1

          }

        ],

        "Name": "id",

        "Size": 0,

        "Type": 4

      },

      {

        "Dynamic": false,

        "Exported": false,

        "ListFieldRoles": [],

        "Name": "language",

        "Size": 50,

        "Type": 10

      },

      {

        "Dynamic": false,

        "Exported": false,

        "ListFieldRoles": [

          {

            "Param": -1,

            "Role": 2

          }

        ],

        "Name": "telephonenr",

        "Size": 50,

        "Type": 10

      }

    ],

    "HasEmailAddressField": false,

    "HasExternalUniqueIdField": true,

    "HasPhoneNumberField": true,

    "ListOrderType": 2,

    "Description": "",

    "Name": "KDW_LIST1"

  }

 

 

Some more info

  • "ExternalDataType": 2 > 2 is for ODBC
  • "Fields":
    • “Type” : datatype of the field
    • "ListFieldRoles":
      • "Param": -1 à used to define the order of this role, eg. multiple phonenumbers may be available in the external data source
      • "Role":  è defines the role of the field, eg. phone number, external Id, email address and so on
Have more questions? Submit a request

Comments