REST API for Unica Discover

Description

APIs for objects - DataExport and SearchAPI etc. in Discover.

DataExport

Methods

post: /token
API call to get bearer token.
API to add bearer token. After successful execution, it returns the bearer token.

Parameters

grant_type (required)
Form Parameter grant_type
username (required)
Form Parameter username
password (required)
Form Parameter password

Return type

Example data

Content-Type: application/json

{
"value" : ""
}


get: /api/DataExport/GetPortalURL
Returns the URL of the Discover Portal.
Returns the URL of the Discover Portal.

Return type

Example data

Content-Type: application/json

{
"value" : ""
}


get: /api/DataExport/GetSessionReplayLink
Redirects the requester to the Portal to replay the specified session via the specified replay client.
Redirects the requester to the Portal to replay the specified session via the specified replay client.

Parameters

SessionType (required)

ACTIVE = 1,
CLOSED = 2,
ALL = 3
LinkType (required)
LinkType
BBR = 1
Field (required)
Field
Value (required)
Value
MD5 (required)
MD5
SessionPreference (required)
SessionPreference
EARLIEST = 1,
LATEST = 2,
ANY = 3,
CLOSEST = 4, }
Redirect (required)
Redirect
SessionDate (optional)
SessionDate
Session Date e.g. YYYY-MM-DD OR ISO format

Return type

Example data

Content-Type: application/json

{
"value" : ""
}


get: /api/DataExport/UploadSessionSegmentSimple
Uploads the Session Segment to be processed by the Discover Segment Builder service based on config setting.
Uploads the Session Segment to be processed by the Discover Segment Builder service based on config setting.

Parameters

SegmentData (required)
SegmentData
IncludesConfigSettings (required)
IncludesConfigSettings

Return type

Example data

Content-Type: application/json
	
		true/false
	

get: /api/DataExport/UploadSessionSegment
Uploads the Session Segment to be processed by the Discover Segment Builder service based on multiple parameters.
Uploads the Session Segment to be processed by the Discover Segment Builder service based on multiple parameters.

Parameters

SegmentData (required)
SegmentData
SegmentName (required)
SegmentName
UseValuePrefix (required)
UseValuePrefix

Return type

Example data

Content-Type: application/json
	
		true/false
	


Search API

get: /api/SearchAPI/GetPortalURL
Returns the URL of the Discover Portal.
Returns the URL of the Discover Portal.

Return type

Example data

Content-Type: application/json

{
"value" : ""
}


get: /api/SearchAPI/GetSessionAnnotations
Returns the annotates associated with the specified session.
Returns the annotates associated with the specified session.

Parameters

SessionType (required)

ACTIVE = 1,
CLOSED = 2,
ALL = 3
Field (required)
Field
Value (required)
Value
MD5 (required)
MD5
SessionPreference (required)
SessionPreference
EARLIEST = 1,
LATEST = 2,
ANY = 3,
CLOSEST = 4, }
Redirect (required)
Redirect
SessionDate (optional)
SessionDate
Session Date e.g. YYYY-MM-DD OR ISO format

Return type

Example data

Content-Type: application/json

	[
	{
	"Username": "string",
	"Timestamp": "2021-07-29T08:55:10.792Z",
	"Text": "string"
	}
	]


get: /api/SearchAPI/GetSearchSortFields
Returns a list of SortField objects representing the description/ID of acceptable search sort fields. Returns null on error.
Returns a list of SortField objects representing the description/ID of acceptable search sort fields. Returns null on error.

Return type

Example data

Content-Type: application/json

	[
	{
	"SortID": 0,
	"Description": "string"
	}
	]


get: /api/SearchAPI/StartSearch
Initiate a search for both active and completed sessions. Dates must supply the time and be ISO formatted. Returns the new query ID for the search. Return -1 on error.
Initiate a search for both active and completed sessions. Dates must supply the time and be ISO formatted. Returns the new query ID for the search. Return -1 on error.

Parameters

StartDate (required)
StartDate
Start Date e.g. YYYY-MM-DD OR ISO format
EndDate (required)
EndDate
End Date e.g. YYYY-MM-DD OR ISO format
SortField (required)
SortField
ActiveQuery (required)
ActiveQuery
ArchiveQuery (required)
ArchiveQuery

Return type

Example data

Content-Type: application/json

1


get: /api/SearchAPI/StartDBSearch
Initiate a search in canister for both active and completed sessions. Dates must supply the time and be ISO formatted. Returns the new query ID for the search. Return -1 on error.
Initiate a search in canister for both active and completed sessions. Dates must supply the time and be ISO formatted. Returns the new query ID for the search. Return -1 on error.

Parameters

SessionFilter (required)
SessionFilter
StartDate (required)
StartDate
Start Date e.g. YYYY-MM-DD OR ISO format
EndDate (required)
EndDate
End Date e.g. YYYY-MM-DD OR ISO format
AndParameters (required)
AndParameters
Attr1Index (required)
Attr1Index
Param1Op (required)
Param1Op
Param1Value (required)
Param1Value
Attr2Index (required)
Attr2Index
Param2Op (required)
Param2Op
Param2Value (required)
Param2Value
Attr3Index (required)
Attr3Index
Param3Op (required)
Param3Op
Param3Value (required)
Param3Value
Attr4Index (required)
Attr4Index
Param4Op (required)
Param4Op
Param4Value (required)
Param4Value
Attr5Index (required)
Attr5Index
Param5Op (required)
Param5Op
Param15Value (required)
Param5Value

Return type

Example data

Content-Type: application/json

1


get: /api/SearchAPI/CancelSearch
Cancels/aborts a running search. No results will be returned.
Cancels/aborts a running search. No results will be returned.

Parameters

SearchID (required)
SearchID

Return type

Example data

Content-Type: application/json

{
"value" : ""
}


get: /api/SearchAPI/StopSearch
Stops a running search. When available (the search status will be marked as done after all searches have stopped and the results have been collated), the sessions found thus far will be made available.
Stops a running search. When available (the search status will be marked as done after all searches have stopped and the results have been collated), the sessions found thus far will be made available.

Parameters

SearchID (required)
SearchID

Return type

Example data

Content-Type: application/json

{
"value" : ""
}


get: /api/SearchAPI/GetSearchStatus
Check the current status of a search. Only request results once 'Done' 'DownloadComplete' are both true. Returns null on error.
Check the current status of a search. Only request results once 'Done' 'DownloadComplete' are both true. Returns null on error.

Parameters

SearchID (required)
SearchID

Return type

Example data

Content-Type: application/json

	{
	"Name": "string",
	"DocumentsFound": 0,
	"HitsFound": 0,
	"IndexName": "string",
	"PercentDone": 0,
	"Done": true,
	"CancelState": 0,
	"IndexesSearched": 0,
	"IndexesTotal": 0,
	"SearchTime": 0,
	"NumOfChunks": 0,
	"Error": "string",
	"DownloadComplete": true,
	"NextUpdate": 0
	}




get: /api/SearchAPI/GetSearchResults
Returns a list of session objects returned from the search, null on error.
Returns a list of session objects returned from the search, null on error.

Parameters

SearchID (required)
SearchID
MaxResults (required)
MaxResults

Return type

Example data

Content-Type: application/json

	[
	{
	"LastError": "string",
	"IsActiveSession": true,
	"SessionListIndex": 0,
	"SessionId": 0,
	"Score": 0,
	"CanisterName": "string",
	"AppErrors": 0,
	"ClientErrors": 0,
	"ServerErrors": 0,
	"TimeErrors": 0,
	"SizeErrors": 0,
	"TltSid": "string",
	"TltUid": "string",
	"Interesting": true,
	"IpAddress": "string",
	"NumHits": 0,
	"NumReqs": 0,
	"NumRsps": 0,
	"NumTxtPages": 0,
	"NumImgPages": 0,
	"NumMiscPages": 0,
	"NumSumHits": 0,
	"UsrSts0": 0,
	"UsrSts1": 0,
	"FirstUse": 0,
	"LastUse": 0,
	"ConnType": 0,
	"Browser": "string",
	"Domain": "string",
	"BigReqSize": 0,
	"SmlReqSize": 0,
	"SumReqSize": 0,
	"AvgReqSize": 0,
	"BigRspSize": 0,
	"SmlRspSize": 0,
	"SumRspSize": 0,
	"AvgRspSize": 0,
	"BigPageTime": 0,
	"SmlPageTime": 0,
	"SumPageTime": 0,
	"AvgPageTime": 0,
	"CanisterServer": "string",
	"SessionAttribute0": "string",
	"SessionAttribute1": "string",
	"SessionAttribute2": "string",
	"SessionAttribute3": "string",
	"SessionAttribute4": "string",
	"SessionAttribute5": "string",
	"SessionAttribute6": "string",
	"SessionAttribute7": "string",
	"SessionAttribute8": "string",
	"SessionAttribute9": "string",
	"SessionAttribute10": "string",
	"SessionAttribute11": "string",
	"SessionAttribute12": "string",
	"SessionAttribute13": "string",
	"SessionAttribute14": "string",
	"SessionAttribute15": "string",
	"SessionAttribute16": "string",
	"SessionAttribute17": "string",
	"SessionAttribute18": "string",
	"SessionAttribute19": "string",
	"SessionAttribute20": "string",
	"SessionAttribute21": "string",
	"SessionAttribute22": "string",
	"SessionAttribute23": "string",
	"SessionAttribute24": "string",
	"SessionAttribute25": "string",
	"SessionAttribute26": "string",
	"SessionAttribute27": "string",
	"SessionAttribute28": "string",
	"SessionAttribute29": "string",
	"SessionAttribute30": "string",
	"SessionAttribute31": "string",
	"SessionAttribute32": "string",
	"SessionAttribute33": "string",
	"SessionAttribute34": "string",
	"SessionAttribute35": "string",
	"SessionAttribute36": "string",
	"SessionAttribute37": "string",
	"SessionAttribute38": "string",
	"SessionAttribute39": "string",
	"SessionAttribute40": "string",
	"SessionAttribute41": "string",
	"SessionAttribute42": "string",
	"SessionAttribute43": "string",
	"SessionAttribute44": "string",
	"SessionAttribute45": "string",
	"SessionAttribute46": "string",
	"SessionAttribute47": "string",
	"SessionAttribute48": "string",
	"SessionAttribute49": "string",
	"SessionAttribute50": "string",
	"SessionAttribute51": "string",
	"SessionAttribute52": "string",
	"SessionAttribute53": "string",
	"SessionAttribute54": "string",
	"SessionAttribute55": "string",
	"SessionAttribute56": "string",
	"SessionAttribute57": "string",
	"SessionAttribute58": "string",
	"SessionAttribute59": "string",
	"SessionAttribute60": "string",
	"SessionAttribute61": "string",
	"SessionAttribute62": "string",
	"SessionAttribute63": "string",
	"Events": [
	{
	"EventID": 0,
	"ImageURL": "string",
	"Description": "string"
	}
	],
	"ReplayLinkBBR": "string"
	}
	]


get: /api/SearchAPI/GetSessionPagesList
Returns a list of pages for a given session, null on error.
Returns a list of pages for a given session, null on error.

Parameters

SearchID (required)
SearchID
SessionListIndex (required)
SessionListIndex

Return type

Example data

Content-Type: application/json

	[
	{
	"LastError": "string",
	"HitNumber": 0,
	"PageNumber": 0,
	"PageDisplayNumber": 0,
	"Index": 0,
	"CaptureType": 0,
	"CaptureSource": "string",
	"SessionId": 0,
	"CanisterName": "string",
	"UserAgent": "string",
	"LocalAddress": "string",
	"RemoteAddress": "string",
	"RemoteHost": "string",
	"ServerName": "string",
	"ServerPort": 0,
	"ServerSoftware": "string",
	"VirtualUrl": "string",
	"ScriptName": "string",
	"Url": "string",
	"UrlFull": "string",
	"QueryString": "string",
	"RequestMethod": "string",
	"StatusCode": 0,
	"StatusCodeText": "string",
	"ResponseType": "string",
	"Referer": "string",
	"Cookie": "string",
	"RequestSize": 0,
	"ResponseSize": 0,
	"ReqStartTime": "string",
	"ReqEndTime": "string",
	"RspStartTime": "string",
	"RspEndTime": "string",
	"RspAckTime": "string",
	"RspTimeToFirstByteOut": 0,
	"RspTimeToLastByteOut": 0,
	"RspTimeToLastAck": 0,
	"ReqAckSum": 0,
	"RspAckSum": 0,
	"IsHttps": true,
	"Duration": 0,
	"ConnType": "string",
	"ConnSpeed": 0,
	"ReqCancelled": 0,
	"TltServer": "string",
	"TltHostName": "string",
	"TltAppName": "string",
	"WsGenTime": 0,
	"WsGenGrade": "string",
	"NtGenTime": 0,
	"NtGenGrade": "string",
	"RtGenTime": 0,
	"RtGenGrade": "string",
	"RoundTripTime": 0,
	"NetTime": 0,
	"GenTime": 0,
	"ViewTime": 0,
	"IamieSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"EnvSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"AppDataSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"UrlFieldSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"CookiesSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"TimeStampSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"RefSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"RspHeadersSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"RawRequestSection": [
	{
	"Name": "string",
	"Value": "string"
	}
	],
	"HighlightPage": true
	}
	]




get: /api/SearchAPI/GetPageResponse
Returns the page content type and response, null on error.
Returns the page content type and response, null on error.

Parameters

SearchID (required)
SearchID
SessionListIndex (required)
SessionListIndex
HitNumber (required)
HitNumber

Return type

Example data

Content-Type: application/json

	{
	"ContentType": "string",
	"Response": "string"
	}