Watson Marketing Insights Profile API Service

Beta

Watson Marketing Insights Profile API Service

+ Day(s) remaining in the trial

Overview

Use the Profile API to store customer attribute data. WMI uses this data in conjunction with the use cases defined in Model API to evaluation customer behavior. Tasks may include:

  • Get a list of profiles or details about a profile
  • Add or update a profile
  • Exploring available fields
  • Adding a custom field

Security

Keys

Pick a key to use with this API. Make sure you are logged in with your IBM id for your keys to be populated in the dropdown below. By selecting a key, it will be pre-filled for each endpoint in the Documentation section that can be used with the built-in testing. If you want to change which key to use for a particular endpoint, you can do so at the endpoint in the Documentation section.
You can manage your API keys in the <MyAPIs> section. API keys authenticate you to your subscription, so make sure to keep them secret. Do not share the X-IBM-Client-Secret portion of any API key in publicly accessible places such as GitHub, or client-side code.



Manage your keys
 

Documentation

Watson Marketing Insights Profile API Service:

Column

Column
ADD New Column
Creates a new custom column to profile table. 1. Checks if column name already exists. 2. Required fields are 'columnName', 'dataType', 'displayScale', 'displayOrder', 'format', 'label', 'category', 'displaySortColumn', 'isHidden', 'isExportEssential' 3. dataType values allowed are BOOLEAN, DATE, DATETIME, TIMESTAMP, DOUBLE_PRECISION, INTEGER, SEQUENCE, VARCHAR, and DATE 4. If dataType is VARCHAR, stringLength has to be passed with value greater than 0 and less than or equal 512 5. label and description must be a string 6. Boolean fields must have a value of either true orfalse7. displayScale and displayOrder must have a numeric value 8. columnName cannot start with X_

POST   /{profileUniqueName}/column

			https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/{profileUniqueName}/column
		
Keys
Path and Query parameters

profileUniqueName

URL , required

Profile table name to add new column to

Request code
								
HttpResponse<String> response = Unirest.post("https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/{profileUniqueName_string}/column") .header("accept", "application/json") .header("content-type", "application/json") .header("authorization", "APIKey yourapikeyvalue") .body("{\"category\":\"string\",\"columnDescription\":\"string\",\"columnName\":\"string\",\"dataType\":\"string\",\"displayOrder\":0,\"displayScale\":0,\"displaySortColumn\":\"string\",\"format\":\"string\",\"isExportEssential\":true,\"isHidden\":true,\"label\":\"string\",\"stringLength\":0}") .asString();
Request model

isHidden

BOOLEAN , required

isExportEssential

BOOLEAN , required

dataType

STRING , required

category

STRING , required

displaySortColumn

STRING , required

Pass a blank value or do not include if the column to add is the sort column

columnDescription

STRING , optional

stringLength

DOUBLE , optional

columnName

STRING , required

Has to be unique, cannot start with X_

displayOrder

DOUBLE , required

displayScale

DOUBLE , required

label

STRING , required

format

STRING , required

Request example
{
  "isHidden": undefined,
  "isExportEssential": undefined,
  "dataType": "undefined",
  "category": "undefined",
  "displaySortColumn": "undefined",
  "columnDescription": "undefined",
  "stringLength": undefined,
  "columnName": "undefined",
  "displayOrder": undefined,
  "displayScale": undefined,
  "label": "undefined",
  "format": "undefined"
}
Response model

200

JSON Object of newly added column

Body

isExportEssential

BOOLEAN , required

label

STRING , required

displayScale

DOUBLE , required

format

STRING , required

isHidden

BOOLEAN , required

dataType

STRING , required

category

STRING , required

stringLength

DOUBLE , required

columnDescription

STRING , required

tableName

STRING , required

displayOrder

DOUBLE , required

columnName

STRING , required

isMeasure

BOOLEAN , required

400

Request body does not satisfy the requirements in the description

Body

error

STRING , required

500

Database connection error

Body

error

STRING , required

Response example

200

JSON Object of newly added column

								{
  "isExportEssential" : boolean,
  "label" : string,
  "displayScale" : double,
  "format" : string,
  "isHidden" : boolean,
  "dataType" : string,
  "category" : string,
  "stringLength" : double,
  "columnDescription" : string,
  "tableName" : string,
  "displayOrder" : double,
  "columnName" : string,
  "isMeasure" : boolean
}
							

400

Request body does not satisfy the requirements in the description

								{
  "error" : string
}
							

500

Database connection error

								{
  "error" : string
}
							
GET Column
Returns Column Object

GET   /{profileUniqueName}/column/{columnUniqueName}

			https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/{profileUniqueName}/column/{columnUniqueName}
		
Keys
Path and Query parameters

columnUniqueName

URL , required

Column ID

profileUniqueName

URL , required

Profile ID

Request code
								
HttpResponse<String> response = Unirest.get("https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/{profileUniqueName_string}/column/{columnUniqueName_string}") .header("accept", "application/json") .header("authorization", "APIKey yourapikeyvalue") .asString();
Response model

200

A column object

Body

isExportEssential

BOOLEAN , required

label

STRING , required

displayScale

DOUBLE , required

format

STRING , required

isHidden

BOOLEAN , required

dataType

STRING , required

category

STRING , required

stringLength

DOUBLE , required

columnDescription

STRING , required

tableName

STRING , required

displayOrder

DOUBLE , required

columnName

STRING , required

isMeasure

BOOLEAN , required

404

Column requested does not exist

Body

error

STRING , required

500

Cannot connect to database

Body

error

STRING , required

Response example

200

A column object

								{
  "isExportEssential" : boolean,
  "label" : string,
  "displayScale" : double,
  "format" : string,
  "isHidden" : boolean,
  "dataType" : string,
  "category" : string,
  "stringLength" : double,
  "columnDescription" : string,
  "tableName" : string,
  "displayOrder" : double,
  "columnName" : string,
  "isMeasure" : boolean
}
							

404

Column requested does not exist

								{
  "error" : string
}
							

500

Cannot connect to database

								{
  "error" : string
}
							
GET Profile Columns
Returns a list of specific profile columns

GET   /{profileUniqueName}/column

			https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/{profileUniqueName}/column
		
Keys
Path and Query parameters

category

STRING , optional

Return either TRANSACTIONAL, DEMOGRAPHIC, BEHAVIORAL or MODEL attributes

isExportEssential

BOOLEAN , optional

Whether a column is essential

isHidden

BOOLEAN , optional

Whether a column is hidden

isMeasure

BOOLEAN , optional

Whether a column is a measure

profileUniqueName

URL , required

Specific profile unique name to address a profile for columns.

showDetails

BOOLEAN , optional

Whether to return full column metadata

sortBy

STRING , optional

Sort by fields separated by comma ','

Request code
								
HttpResponse<String> response = Unirest.get("https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/{profileUniqueName_string}/column?category=string&isExportEssential=true&isHidden=true&isMeasure=true&showDetails=true&sortBy=string") .header("accept", "application/json") .header("authorization", "APIKey yourapikeyvalue") .asString();
Response model

200

A JSON array of profile column object

Body

AllColumnsResponse

OBJECT , optional

AllColumnsResponse

OBJECT , optional

columns

ARRAY , required

requestTimestamp

STRING , required

responseTimestamp

STRING , required

isExportEssential

BOOLEAN , required

label

STRING , required

displayScale

DOUBLE , required

format

STRING , required

isHidden

BOOLEAN , required

dataType

STRING , required

category

STRING , required

stringLength

DOUBLE , required

columnDescription

STRING , required

tableName

STRING , required

displayOrder

DOUBLE , required

columnName

STRING , required

isMeasure

BOOLEAN , required

Response example

200

A JSON array of profile column object

								{
  "AllColumnsResponse" : {
    "requestTimestamp" : string,
    "responseTimestamp" : string
  },
  "AllColumnsResponse" : object,
  "columns" : [{
    "isExportEssential" : boolean,
    "label" : string,
    "displayScale" : double,
    "format" : string,
    "isHidden" : boolean,
    "dataType" : string,
    "category" : string,
    "stringLength" : double,
    "columnDescription" : string,
    "tableName" : string,
    "displayOrder" : double,
    "columnName" : string,
    "isMeasure" : boolean
  }]
}
							
PATCH Column
Returns confirmation that column was updated

PATCH   /{profileUniqueName}/column/{columnUniqueName}

			https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/{profileUniqueName}/column/{columnUniqueName}
		
Keys
Path and Query parameters

columnUniqueName

URL , required

Column ID

profileUniqueName

URL , required

Profile ID

Request code
								
HttpResponse<String> response = Unirest.patch("https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/{profileUniqueName_string}/column/{columnUniqueName_string}") .header("accept", "application/json") .header("content-type", "application/json") .header("authorization", "APIKey yourapikeyvalue") .body("{\"category\":\"string\",\"columnDescription\":\"string\",\"displayOrder\":0,\"displayScale\":0,\"displaySortColumn\":\"string\",\"format\":\"string\",\"isExportEssential\":true,\"isHidden\":true,\"label\":\"string\"}") .asString();
Request model

isHidden

BOOLEAN , optional

isExportEssential

BOOLEAN , optional

category

STRING , optional

displaySortColumn

STRING , optional

columnDescription

STRING , optional

displayOrder

DOUBLE , optional

displayScale

DOUBLE , optional

label

STRING , optional

format

STRING , optional

Request example
{
  "isHidden": undefined,
  "isExportEssential": undefined,
  "category": "undefined",
  "displaySortColumn": "undefined",
  "columnDescription": "undefined",
  "displayOrder": undefined,
  "displayScale": undefined,
  "label": "undefined",
  "format": "undefined"
}
Response model

200

A confirmation

Body

isExportEssential

BOOLEAN , required

label

STRING , required

displayScale

DOUBLE , required

format

STRING , required

isHidden

BOOLEAN , required

dataType

STRING , required

category

STRING , required

stringLength

DOUBLE , required

columnDescription

STRING , required

tableName

STRING , required

displayOrder

DOUBLE , required

columnName

STRING , required

isMeasure

BOOLEAN , required

400

Field not supported or invalid value

Body

error

STRING , required

500

Error connecting to the database

Body

error

STRING , required

Response example

200

A confirmation

								{
  "isExportEssential" : boolean,
  "label" : string,
  "displayScale" : double,
  "format" : string,
  "isHidden" : boolean,
  "dataType" : string,
  "category" : string,
  "stringLength" : double,
  "columnDescription" : string,
  "tableName" : string,
  "displayOrder" : double,
  "columnName" : string,
  "isMeasure" : boolean
}
							

400

Field not supported or invalid value

								{
  "error" : string
}
							

500

Error connecting to the database

								{
  "error" : string
}
							

Loading content...