Generate text analytics Sankey diagram

post/analytics/{jobId}/sankeyDiagrams
Internal-Use Only

Retrieves related text analytics results as a Sankey diagram. There are two types of Sankey diagram: 1) based on the pairs of values extracted from the "from" and "to" fields where nodes represent field values and links represent the objects containing the field values. 2) based on two categories of results where nodes represent the results of each category and links represent the objects containing results of both categories.

Request Samples

1

Response Samples

1{
2 "identifier": "4fa45829-9b75-49c8-99f7-ef15aa838e65",
3 "level": {
4 "category": "organization",
5 "phrase": "sas"
6 },
7 "fromAndTo": true,
8 "maxLinks": 50,
9 "sankeyNodes": [
10 {
11 "identifier": 6,
12 "phrase": "Miles@sas.com",
13 "frequencyCount": 155,
14 "weight": 0,
15 "objectIds": [
16 {
17 "type": "email",
18 "id": "15"
19 }
20 ],
21 "compoundValues": []
22 },
23 {
24 "identifier": 4,
25 "phrase": "Gary@sas.com",
26 "frequencyCount": 538,
27 "weight": 0,
28 "objectIds": [
29 {
30 "type": "email",
31 "id": "2565"
32 }
33 ],
34 "compoundValues": []
35 },
36 {
37 "identifier": 1,
38 "phrase": "Hillary@sas.com",
39 "frequencyCount": 355,
40 "weight": 0,
41 "objectIds": [
42 {
43 "type": "email",
44 "id": "490"
45 }
46 ],
47 "compoundValues": []
48 },
49 {
50 "identifier": 11,
51 "phrase": "Joe@sas.com",
52 "frequencyCount": 7,
53 "weight": 0,
54 "objectIds": [
55 {
56 "type": "email",
57 "id": "22"
58 }
59 ],
60 "compoundValues": []
61 },
62 {
63 "identifier": 2,
64 "phrase": "John@sas.com",
65 "frequencyCount": 88,
66 "weight": 0,
67 "objectIds": [
68 {
69 "type": "email",
70 "id": "491"
71 }
72 ],
73 "compoundValues": []
74 },
75 {
76 "identifier": 3,
77 "phrase": "Rachel@sas.com",
78 "frequencyCount": 3,
79 "weight": 0,
80 "objectIds": [
81 {
82 "type": "email",
83 "id": "2637"
84 }
85 ],
86 "compoundValues": []
87 }
88 ],
89 "sankeyLinks": [
90 {
91 "fromNode": 6,
92 "toNode": 4,
93 "frequencyCount": 3,
94 "objectIds": [
95 {
96 "type": "email",
97 "id": "3000"
98 },
99 {
100 "type": "email",
101 "id": "65"
102 },
103 {
104 "type": "email",
105 "id": "73"
106 }
107 ],
108 "compoundValues": []
109 },
110 {
111 "fromNode": 1,
112 "toNode": 11,
113 "frequencyCount": 2,
114 "objectIds": [
115 {
116 "type": "email",
117 "id": "6"
118 },
119 {
120 "type": "email",
121 "id": "276"
122 }
123 ],
124 "compoundValues": []
125 },
126 {
127 "fromNode": 1,
128 "toNode": 2,
129 "frequencyCount": 1,
130 "objectIds": [
131 {
132 "type": "email",
133 "id": "220"
134 }
135 ],
136 "compoundValues": []
137 },
138 {
139 "fromNode": 3,
140 "toNode": 4,
141 "frequencyCount": 1,
142 "objectIds": [
143 {
144 "type": "email",
145 "id": "2969"
146 }
147 ],
148 "compoundValues": []
149 }
150 ],
151 "links": [
152 {
153 "method": "POST",
154 "rel": "self",
155 "href": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/sankeyDiagrams",
156 "uri": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/sankeyDiagrams",
157 "type": "application/vnd.sas.sand.analytics.sankey.diagram.request",
158 "responseType": "application/vnd.sas.sand.analytics.sankey.diagram"
159 },
160 {
161 "method": "GET",
162 "rel": "getJob",
163 "href": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65",
164 "uri": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65",
165 "type": "application/vnd.sas.sand.analytics.job"
166 },
167 {
168 "method": "GET",
169 "rel": "getState",
170 "href": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/state",
171 "uri": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/state",
172 "type": "text/plain"
173 },
174 {
175 "method": "PUT",
176 "rel": "cancelJob",
177 "href": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/state?value=cancelled",
178 "uri": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/state?value=cancelled",
179 "responseType": "text/plain"
180 },
181 {
182 "method": "DELETE",
183 "rel": "deleteJob",
184 "href": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65",
185 "uri": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65"
186 },
187 {
188 "method": "GET",
189 "rel": "getIdentities",
190 "href": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/identities",
191 "uri": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/identities",
192 "type": "application/vnd.sas.sand.analytics.explore",
193 "responseType": "application/vnd.sas.sand.analytics.identities"
194 },
195 {
196 "method": "POST",
197 "rel": "getCategories",
198 "href": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/categories",
199 "uri": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/categories",
200 "type": "application/vnd.sas.sand.analytics.explore",
201 "responseType": "application/vnd.sas.sand.analytics.categories"
202 },
203 {
204 "method": "POST",
205 "rel": "getResults",
206 "href": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/results",
207 "uri": "/svi-sand/analytics/4fa45829-9b75-49c8-99f7-ef15aa838e65/results",
208 "type": "application/vnd.sas.sand.analytics.explore",
209 "responseType": "application/vnd.sas.sand.analytics.results"
210 },
211 {
212 "method": "GET",
213 "rel": "getLocales",
214 "href": "/svi-sand/analytics/locales",
215 "uri": "/svi-sand/analytics/locales",
216 "type": "application/vnd.sas.collection",
217 "itemType": "application/vnd.sas.sand.analytics.locale"
218 },
219 {
220 "method": "POST",
221 "rel": "startTextAnalytics",
222 "href": "/svi-sand/analytics",
223 "uri": "/svi-sand/analytics",
224 "type": "application/vnd.sas.sand.analytics.request",
225 "responseType": "application/vnd.sas.sand.analytics.job"
226 }
227 ]
228}

Path Parameters

NameTypeRequiredDescription
jobId
string
true

The unique identifier of the text analytics job.

Request Body

The request to /analytics/{jobId}/sankeyDiagrams to generate a Sankey diagram from the text analytics results at the specified exploration level.

NameTypeRequiredDescription
version
integer
false

The representation version (1).

level
AnalyticsExplorationLevel
false

The exploration level within the text analytics results.

fromCategory
string
false

The category of results to use for the "from" nodes.

Allowed values:
unigrambigramtrigrampersonorganizationlocationsignificantTermtopic
toCategory
string
false

The category of results to use for the "to" nodes.

Allowed values:
unigrambigramtrigrampersonorganizationlocationsignificantTermtopic
fromAndTo
boolean
false

Whether to base the diagram on the values extracted from the "from" and "to" fields instead of using the "from" and "to" categories specified above.

maxLinks
integer
false

The maximum number of links to return. Accepts values in the range 1 to 100. The default value is 20.

Responses

StatusMeaningDescription
200OKThe request succeeded.Schema
202AcceptedThe text analytics results are not available yet. For example, the job is still running.Schema
400Bad RequestThe request is malformed or contains invalid parameter values.Schema
404Not FoundThere is no job for the given identifier or there are no results at the specified exploration level.Schema