-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
776 lines (657 loc) · 51.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>API Reference</title>
<link href="stylesheets/screen.css" rel="stylesheet" type="text/css" media="screen" />
<link href="stylesheets/print.css" rel="stylesheet" type="text/css" media="print" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="javascripts/all.js" type="text/javascript"></script>
<script>
$(function() {
setupLanguages(["shell","python"]);
});
</script>
</head>
<body class="index">
<a href="#" id="nav-button">
<span>
NAV
<img src="images/navbar.png" />
</span>
</a>
<div class="tocify-wrapper">
<img src="logo.png" />
<div class="lang-selector">
<a href="#" data-language-name="shell">shell</a>
<a href="#" data-language-name="python">python</a>
</div>
<div class="search">
<input type="text" class="search" id="input-search" placeholder="Search">
</div>
<ul class="search-results"></ul>
<div id="toc">
</div>
<ul class="toc-footer">
<li><a href='#'>Sign Up for a Developer Key</a></li>
<li><a href='http://github.com/tripit/slate'>Documentation Powered by Slate</a></li>
</ul>
</div>
<div class="page-wrapper">
<div class="dark-box"></div>
<div class="content">
<h1 id="crusher">Crusher</h1>
<p>Crusher allows you to look at the on-site activity user and determine how the on-site activity is influenced by a users off-site browsing activity.
These are the APIs that power crusher and make it possible to analyze on-site versus off-site activity.</p>
<h2 id="background">Background</h2>
<p>Crusher is a collection of analytics, machine learning and ad-buying technologies that make it possible for a user to: </p>
<ul>
<li>collect information about on-site and off-site activity</li>
<li>classify and understand how these behaviors influence each other</li>
<li>target ads based on these different classifications </li>
</ul>
<h2 id="important-terms">Important Terms</h2>
<p>These are standard terms that are used when referring to different components within crusher.
They allow us to use common language when thinking about how different pieces of crusher are related to on another.</p>
<h3 id="event">Event</h3>
<pre class="highlight plaintext"><code># Example of an event
</code></pre>
<p>An event is an atomic unit of interaction on an advertisers website. Currently this is limited to page views and conversions but may expand in the future to include javascript triggered events such as expanding images, scrolling, etc. </p>
<h3 id="action">Action</h3>
<pre class="highlight plaintext"><code># Example of an action
</code></pre>
<p>An action is a group of events that are all related to the same functionality. For instance, an action may be used to describe all landing pages, even though the individual url for each landing page is different. </p>
<h3 id="funnel">Funnel</h3>
<pre class="highlight plaintext"><code># Example of a funnel
</code></pre>
<p>A funnel is a group of actions that occur (often sequentially) that is used to predict a goal. For instance, a user that visits a landing page, a product page and converts would represent a funnel.</p>
<h1 id="authentication">Authentication</h1>
<h2 id="authorization">Authorization</h2>
<p>Most of our APIs require authentication. We demonstrate here how to login using cookie-based authentication.</p>
<p>To log in, send a <code class="prettyprint">POST</code> request to <code class="prettyprint">crusher.getrockerbox.com/login</code> with an object containing the username and password assigned to you by Rockerbox.</p>
<blockquote>
<p>Use the <code class="prettyprint">/login</code> endpoint, saving your cookie in a file to use for future requests</p>
</blockquote>
<pre class="highlight shell"><code>cat <span class="sh"><<EOF > creds
{
"username": "my_user",
"password": "my_pw"
}
EOF
</span>curl -b cookie -c cookie -X POST -d @creds <span class="s2">"crusher.getrockerbox.com/login"</span>
</code></pre>
<h3 id="http-request">HTTP Request</h3>
<p><code class="prettyprint">POST http://crusher.getrockerbox.com/login</code></p>
<h3 id="request-payload">Request Payload</h3>
<p>Formatted as a json object, you must include the following values as part of your <code class="prettyprint">POST</code>:</p>
<table><thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr>
<td>username</td>
<td>the username that was provided by Rockerbox upon receiving your account</td>
</tr>
<tr>
<td>password</td>
<td>the password that was provided by Rockerbox upon receiving your account</td>
</tr>
</tbody></table>
<h4 id="cookie-based">Cookie-based</h4>
<p>For cookie-based login, you will need to have the cookies that we set as a result of this request included on future requests.
If using curl, use the <code class="prettyprint">-b</code> and <code class="prettyprint">-c</code> options to read/write your cookie from disk.</p>
<h4 id="header-based">Header-based</h4>
<p>Rick doesn’t like APIs that don’t have this as an option, so we’re going to make this a thing…at some point.</p>
<h2 id="permissions">Permissions</h2>
<blockquote>
<p>Request</p>
</blockquote>
<pre class="highlight shell"><code>curl -b cookie -c cookie <span class="s2">"crusher.getrockerbox.com/account/permissions"</span>
</code></pre>
<blockquote>
<p>Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"results"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"external_advertiser_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">987654</span><span class="p">,</span><span class="w">
</span><span class="nt">"pixel_source_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"examle_advertiser_1"</span><span class="p">,</span><span class="w">
</span><span class="nt">"advertiser_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Example Advertiser One"</span><span class="p">,</span><span class="w">
</span><span class="nt">"selected"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"external_advertiser_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">123456</span><span class="p">,</span><span class="w">
</span><span class="nt">"pixel_source_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"example_advertiser_2"</span><span class="p">,</span><span class="w">
</span><span class="nt">"advertiser_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Example Advertiser Two"</span><span class="p">,</span><span class="w">
</span><span class="nt">"selected"</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>Once authenticated, you can use <code class="prettyprint">/account/permissions</code> to view the advertisers you have access to.</p>
<h1 id="apis">APIs</h1>
<h3 id="generic-anatomy-of-a-response">Generic anatomy of a Response</h3>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:</span><span class="w"> </span><span class="p">[],</span><span class="w">
</span><span class="nt">"summary"</span><span class="p">:</span><span class="w"> </span><span class="p">{},</span><span class="w">
</span><span class="nt">"errors"</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>Each json response with have a similar format. Below we outline the high level stucture a user can expect from a JSON response.</p>
<table><thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr>
<td>response</td>
<td>(required) This is where the data relevant to the response lives. This will typically be an array of objects</td>
</tr>
<tr>
<td>summary</td>
<td>(optional) This is where any summary information about the request and response lives</td>
</tr>
<tr>
<td>errors</td>
<td>(optional) This is where any errors associated with the request live. This will typically be an array of objects</td>
</tr>
</tbody></table>
<h1 id="action">Action</h1>
<blockquote>
<p>Example action</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ok"</span><span class="p">,</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="w">
</span><span class="nt">"action_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
</span><span class="nt">"action_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"checkout"</span><span class="p">,</span><span class="w">
</span><span class="nt">"acvertiser"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my_advertiser"</span><span class="p">,</span><span class="w">
</span><span class="nt">"url_pattern"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"checkout"</span><span class="p">],</span><span class="w">
</span><span class="nt">"featured"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="w">
</span><span class="s2">"has_filter"</span><span class="err">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
</span><span class="nt">"filter_pattern"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"checkout/complete"</span><span class="p">,</span><span class="w"> </span><span class="s2">"checkout/receipt"</span><span class="p">]</span><span class="w">
</span><span class="p">}]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>Actions are our fundamental block for understand both on-site and off-site user behavior.
Actions allow the user to specify a series of patterns that correspond to central idea or theme of on-site behavior.
Below we take you through how to view, create, update and delete an action.</p>
<p>All activities related to actions require the user to be logged in.</p>
<p>Every action will have the following items in its response:</p>
<table><thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr>
<td>action_id</td>
<td>this is an auto generated identifier for the action. this identifier will be use later to relate actions to funnels</td>
</tr>
<tr>
<td>url_pattern</td>
<td>this is an array of strings that are used to match against the url associated with an event</td>
</tr>
<tr>
<td>advertiser</td>
<td>this is the advertiser that the action is associated with</td>
</tr>
<tr>
<td>action_name</td>
<td>the name that appears as the segment title in the UI</td>
</tr>
<tr>
<td>has_filter</td>
<td>binary whether or not the segment has sub filters</td>
</tr>
<tr>
<td>filter_pattern</td>
<td>(optional) if has filter then these are the patterns that comprise the sub filter, the patterns that further filter the segment</td>
</tr>
<tr>
<td>featured</td>
<td>The first segment to appear when the dashboard loads in the UI</td>
</tr>
</tbody></table>
<h2 id="get-all-actions">Get all actions</h2>
<blockquote>
<p>Request All</p>
</blockquote>
<pre class="highlight shell"><code>curl http://hindsight.getrockerbox.com/crusher/funnel/action?format<span class="o">=</span>json
</code></pre>
<blockquote>
<p>Response All</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ok"</span><span class="p">,</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"action_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
</span><span class="nt">"filter_id"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w">
</span><span class="nt">"campaign_id"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="nt">"action_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"checkout"</span><span class="p">,</span><span class="w">
</span><span class="nt">"acvertiser"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my_advertiser"</span><span class="p">,</span><span class="w">
</span><span class="nt">"parameters"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nt">"num_users"</span><span class="p">:</span><span class="mi">25000</span><span class="p">,</span><span class="nt">"submitted_by"</span><span class="p">:</span><span class="s2">"add_to_workqueue.py"</span><span class="p">,</span><span class="nt">"skip_datasets"</span><span class="p">:</span><span class="s2">"uid_urls,url_to_action,corpus,domains"</span><span class="p">,</span><span class="nt">"num_days"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="nt">"prevent_sample"</span><span class="p">:</span><span class="s2">"true"</span><span class="p">},</span><span class="w">
</span><span class="nt">"override_parameters"</span><span class="p">:{},</span><span class="w">
</span><span class="nt">"url_pattern"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"checkout"</span><span class="p">],</span><span class="w">
</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"action"</span><span class="p">,</span><span class="w">
</span><span class="nt">"featured"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="w">
</span><span class="s2">"has_filter"</span><span class="err">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w">
</span><span class="nt">"filter_pattern"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"checkout/complete"</span><span class="p">,</span><span class="w"> </span><span class="s2">"checkout/receipt"</span><span class="p">]</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"advertiser"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my_advertiser"</span><span class="p">,</span><span class="w">
</span><span class="nt">"parameters"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nt">"num_users"</span><span class="p">:</span><span class="mi">25000</span><span class="p">,</span><span class="nt">"submitted_by"</span><span class="p">:</span><span class="s2">"add_to_workqueue.py"</span><span class="p">,</span><span class="nt">"skip_datasets"</span><span class="p">:</span><span class="s2">"uid_urls,url_to_action,corpus,domains"</span><span class="p">,</span><span class="nt">"num_days"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="nt">"prevent_sample"</span><span class="p">:</span><span class="s2">"true"</span><span class="p">},</span><span class="w">
</span><span class="nt">"override_parameters"</span><span class="p">:{},</span><span class="w">
</span><span class="nt">"action_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"necklaces utm"</span><span class="p">,</span><span class="w">
</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"action"</span><span class="p">,</span><span class="w">
</span><span class="nt">"url_pattern"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="s2">"utm"</span><span class="w"> </span><span class="p">],</span><span class="w">
</span><span class="nt">"action_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">15</span><span class="p">,</span><span class="w">
</span><span class="nt">"filter_id"</span><span class="p">:</span><span class="mi">15</span><span class="w">
</span><span class="s2">"has_filter"</span><span class="err">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="nt">"campaign_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="nt">"featured"</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nt">"advertiser"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my_advertiser"</span><span class="p">,</span><span class="w">
</span><span class="nt">"parameters"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nt">"num_users"</span><span class="p">:</span><span class="mi">25000</span><span class="p">,</span><span class="nt">"submitted_by"</span><span class="p">:</span><span class="s2">"add_to_workqueue.py"</span><span class="p">,</span><span class="nt">"skip_datasets"</span><span class="p">:</span><span class="s2">"uid_urls,url_to_action,corpus,domains"</span><span class="p">,</span><span class="nt">"num_days"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="nt">"prevent_sample"</span><span class="p">:</span><span class="s2">"true"</span><span class="p">,</span><span class="w"> </span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"served"</span><span class="p">},</span><span class="w">
</span><span class="nt">"override_parameters"</span><span class="p">:{</span><span class="nt">"type"</span><span class="p">:</span><span class="s2">"served},
"</span><span class="err">action_name</span><span class="s2">": "</span><span class="err">Served</span><span class="w"> </span><span class="err">data</span><span class="s2">",
"</span><span class="err">type</span><span class="s2">":"</span><span class="err">campaign</span><span class="s2">",
"</span><span class="err">url_pattern</span><span class="s2">": [],
"</span><span class="err">action_id</span><span class="s2">": 0,
"</span><span class="err">filter_id</span><span class="s2">":"</span><span class="mi">1012</span><span class="err">abdaasdklajsd</span><span class="s2">"
"</span><span class="err">has_filter</span><span class="s2">": 0,
"</span><span class="err">campaign_id</span><span class="s2">": 1234,
"</span><span class="err">featured":</span><span class="w"> </span><span class="mi">0</span><span class="w">
</span><span class="p">},</span><span class="w">
</span><span class="err">]</span><span class="w">
</span><span class="err">}</span><span class="w">
</span></code></pre>
<p>To view all the actions that you have created, you can simply send a get request to the action endpoint with the format query string parameter set to json.</p>
<p><code class="prettyprint">GET http://hindsight.getrockerbox.com/crusher/funnel/action?format=json</code></p>
<p>The response will consist of a list of action objects, which are defined above in the <strong>Anatomy of an action</strong>.</p>
<h2 id="creating-an-onsite-action">Creating an Onsite Action</h2>
<blockquote>
<p>Create</p>
</blockquote>
<pre class="highlight shell"><code>cat <span class="sh"><<EOF > action
{
"action_name": "checkout",
"url_pattern": [ "checkout" ],
}
EOF
</span>curl -X POST -d @action http://hindsight.getrockerbox.com/crusher/funnel/action
</code></pre>
<blockquote>
<p>Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ok"</span><span class="p">,</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:{</span><span class="w">
</span><span class="nt">"advertiser"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my_advertiser"</span><span class="p">,</span><span class="w">
</span><span class="nt">"action_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"checkout"</span><span class="p">,</span><span class="w">
</span><span class="nt">"url_pattern"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="s2">"checkout"</span><span class="w"> </span><span class="p">],</span><span class="w">
</span><span class="nt">"action_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>To create a new action, post a json object that has a name to identify the action, <code class="prettyprint">action_name</code>, and a list of patterns you want to match in the <code class="prettyprint">url_pattern</code>.</p>
<p><code class="prettyprint">POST http://hindsight.getrockerbox.com/crusher/funnel/action?format=json</code></p>
<p>The response from this endpoint will be a standard action json object described above in the anatomy of an action.</p>
<h2 id="creating-vendor-based-actions">Creating Vendor Based Actions</h2>
<blockquote>
<p>Create</p>
</blockquote>
<pre class="highlight shell"><code>cat <span class="sh"><<EOF > action
{
"action_name": "served",
"type": "campaign"
}
EOF
</span>curl -X POST -d @action http://hindsight.getrockerbox.com/crusher/funnel/action
</code></pre>
<blockquote>
<p>Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ok"</span><span class="p">,</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:{</span><span class="w">
</span><span class="nt">"advertiser"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my_advertiser"</span><span class="p">,</span><span class="w">
</span><span class="nt">"action_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"served"</span><span class="p">,</span><span class="w">
</span><span class="nt">"filter_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1aaaaabbbbbbcc1234"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>To create a new action, post a json object that has a name to identify the <code class="prettyprint">action_name</code> and type. If type is not supplied then it will be assumed an onsite based action of type <code class="prettyprint">action</code>. If type is <code class="prettyprint">action</code> then url_pattern is a required parameter. If type is of <code class="prettyprint">campaign</code> then 3 scenarios are possible. For vendor based actions do not pass in a campaign_id parameter or goup_ids parameter and a vendor based segment will be created. By default the vendor will be set to rockerbox althugh this can be changed in requests by passing in the URL parameter vendor (outside the scope of action creation). The value for filter_id will be an int if type is <code class="prettyprint">action</code> and a varchar is type is <code class="prettyprint">campaign</code></p>
<p><code class="prettyprint">POST http://hindsight.ai/crusher/funnel/action?format=json</code></p>
<h2 id="creating-campaign-based-actions">Creating Campaign Based Actions</h2>
<blockquote>
<p>Create</p>
</blockquote>
<pre class="highlight shell"><code>cat <span class="sh"><<EOF > action
{
"action_name": "served",
"type": "campaign",
"campaign_id":12345
}
EOF
</span>curl -X POST -d @action http://hindsight.getrockerbox.com/crusher/funnel/action
</code></pre>
<blockquote>
<p>Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ok"</span><span class="p">,</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:{</span><span class="w">
</span><span class="nt">"advertiser"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my_advertiser"</span><span class="p">,</span><span class="w">
</span><span class="nt">"action_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"served"</span><span class="p">,</span><span class="w">
</span><span class="nt">"filter_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1aaaaasdfdsfbcc1234"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>To create a new action, post a json object that has a name to identify the <code class="prettyprint">action_name</code> and type. If type is not supplied then it will be assumed an onsite based action of type <code class="prettyprint">action</code>. If type is <code class="prettyprint">action</code> then url_pattern is a required parameter. If type is of <code class="prettyprint">campaign</code> then 3 scenarios are possible. If campaign_id is included then a segment based on a specific campaign id will be created. The value for filter_id will be an int if type is <code class="prettyprint">action</code> and a varchar is type is <code class="prettyprint">campaign</code></p>
<p><code class="prettyprint">POST http://hindsight.ai/crusher/funnel/action?format=json</code></p>
<h2 id="creating-campaign-line-item-actions">Creating Campaign Line Item Actions</h2>
<blockquote>
<p>Create</p>
</blockquote>
<pre class="highlight shell"><code>cat <span class="sh"><<EOF > action
{
"action_name": "served",
"type": "campaign",
"group_ids":[12]
}
EOF
</span>curl -X POST -d @action http://hindsight.getrockerbox.com/crusher/funnel/action
</code></pre>
<blockquote>
<p>Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ok"</span><span class="p">,</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:{</span><span class="w">
</span><span class="nt">"advertiser"</span><span class="p">:</span><span class="w"> </span><span class="s2">"my_advertiser"</span><span class="p">,</span><span class="w">
</span><span class="nt">"action_name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"served"</span><span class="p">,</span><span class="w">
</span><span class="nt">"filter_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1aaafgasfsdfdsfbcc1234"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>To create a new action, post a json object that has a name to identify the <code class="prettyprint">action_name</code> and type. If type is not supplied then it will be assumed an onsite based action of type <code class="prettyprint">action</code>. If type is <code class="prettyprint">action</code> then url_pattern is a required parameter. If type is of <code class="prettyprint">campaign</code> then 3 scenarios are possible. If group_ids is specified a filter will be used to filter for only those served ads that match the campaign ids present in the line item hierarchy group ids passed in as the group_ids parameter. The group_ids parameter must be an array. The value for filter_id will be an int if type is <code class="prettyprint">action</code> and a varchar is type is <code class="prettyprint">campaign</code></p>
<p><code class="prettyprint">POST http://hindsight.ai/crusher/funnel/action?format=json</code></p>
<h2 id="deleting-an-action">Deleting an action</h2>
<blockquote>
<p>DELETE</p>
</blockquote>
<pre class="highlight shell"><code>curl -X DELETE http://hindsight.getrockerbox.com/crusher/funnel/action?id<span class="o">=</span>1
</code></pre>
<blockquote>
<p>Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"status"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ok"</span><span class="p">,</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:{</span><span class="w">
</span><span class="nt">"action_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>To delete an action, send a delete request to the endpoint with the <code class="prettyprint">action_id</code> qs parameter corresponding to the object you want to delete.</p>
<p><code class="prettyprint">DELETE http://hindsight.getrockerbox.com/crusher/funnel/action?format=json&id=<ACTION_ID></code></p>
<p>The response will be an object with only the action_id of the deleted object.</p>
<h1 id="activity-data-apis">Activity Data APIs</h1>
<p>These APIs allow us to search for a particular pattern or group of patterns that occur on the query string of the on-page url.
The search APIs give us the ability to look at the following characterstics about a patterns:</p>
<ul>
<li>URLs: these are the URLs that match the pattern</li>
<li>UIDs: these are the UIDs that match the pattern</li>
<li>Count: this gives us a summary about the pattern</li>
</ul>
<h1 id="udf">UDF</h1>
<blockquote>
<p>Example Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:</span><span class="w"> </span><span class="p">[{}],</span><span class="w">
</span><span class="nt">"search"</span><span class="p">:</span><span class="w"> </span><span class="p">[[</span><span class="s2">"/"</span><span class="p">]],</span><span class="w">
</span><span class="nt">"summary"</span><span class="p">:</span><span class="w"> </span><span class="p">{},</span><span class="w">
</span><span class="nt">"after"</span><span class="p">:</span><span class="w"> </span><span class="p">[{}],</span><span class="w">
</span><span class="nt">"before"</span><span class="p">:</span><span class="w"> </span><span class="p">[{}]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>UDF or User Defined Functions are the core way for which we return data. A standard set of datasets containing information about the users` onsite and offsite behavior as well as user and domain level data arre passed into the user defined function. The function then analyses and aggregated the data to create the response.</p>
<p>The UDF requested is determined by the RESTful URL schema . See the examples below for samples of existing udfs and schema acess pattern.</p>
<p>All response are in JSON format.</p>
<p>Every UDF will have the following items in its response:</p>
<table><thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr>
<td>response</td>
<td>this is an auto generated identifier for the action. this identifier will be use later to relate actions to funnels</td>
</tr>
<tr>
<td>search</td>
<td>this is an array of strings that are used to match against the url associated with an event</td>
</tr>
<tr>
<td>summary</td>
<td>(optional) by default, this should only be set to “or”. The behavior associated with an “and” operator can be achieved by comma seperating strings</td>
</tr>
<tr>
<td>before</td>
<td>(optional) this is the advertiser that the action is associated with</td>
</tr>
<tr>
<td>after</td>
<td>(optional) this is the advertiser that the action is associated with</td>
</tr>
</tbody></table>
<h2 id="get-udf">Get UDF</h2>
<blockquote>
<p>Request UDF</p>
</blockquote>
<pre class="highlight shell"><code>curl http://hindsight.getrockerbox.com/crusher/v1/visitor/<UDF>?url_pattern<span class="o">=</span>/&filter_id<span class="o">=</span>1
curl http://hindsight.getrockerbox.com/crusher/v1/visitor/domains?url_pattern<span class="o">=</span>/&filter_id<span class="o">=</span>1
</code></pre>
<blockquote>
<p>Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:[</span><span class="w">
</span><span class="p">{</span><span class="nt">"count"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="nt">"domain"</span><span class="p">:</span><span class="s2">"recipes.com"</span><span class="p">,</span><span class="nt">"uniques"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="nt">"time to site"</span><span class="p">:</span><span class="mf">5.7666666667</span><span class="p">,</span><span class="nt">"Importance"</span><span class="p">:</span><span class="mf">24690.3333333333</span><span class="p">,</span><span class="nt">"rank"</span><span class="p">:</span><span class="mf">24690.3333333333</span><span class="p">,</span><span class="nt">"num_users"</span><span class="p">:</span><span class="mf">1000000.0</span><span class="p">,</span><span class="nt">"parent_category_name"</span><span class="p">:</span><span class="s2">"Food & Drink"</span><span class="p">,</span><span class="nt">"idf"</span><span class="p">:</span><span class="mf">24690.3333333333</span><span class="p">,</span><span class="nt">"category_name"</span><span class="p">:</span><span class="s2">"Cooking & Recipes"</span><span class="p">},</span><span class="w">
</span><span class="p">{</span><span class="err">...</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>To view all the actions that you have created, you can simply send a get request to the action endpoint with the format query string parameter set to json.</p>
<h2 id="datasets">Datasets</h2>
<h1 id="cached-udf-aggregate-endpoint">Cached UDF (Aggregate) Endpoint</h1>
<blockquote>
<p>Example response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{}</span><span class="w">
</span><span class="p">],</span><span class="w">
</span><span class="nt">"search"</span><span class="p">:</span><span class="w"> </span><span class="p">[[</span><span class="s2">"/"</span><span class="p">]],</span><span class="w">
</span><span class="nt">"summary"</span><span class="p">:</span><span class="w"> </span><span class="p">{},</span><span class="w">
</span><span class="nt">"after"</span><span class="p">:</span><span class="w"> </span><span class="p">[{}],</span><span class="w">
</span><span class="nt">"before"</span><span class="p">:</span><span class="w"> </span><span class="p">[{}]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>Every action will have the following items in its response:</p>
<table><thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr>
<td>response</td>
<td>(required) this is an auto generated identifier for the action. this identifier will be use later to relate actions to funnels</td>
</tr>
<tr>
<td>search</td>
<td>(required) the url pattern used to create the aggregate</td>
</tr>
<tr>
<td>summary</td>
<td>(optional) this is an array of strings that are used to match against the url associated with an event</td>
</tr>
<tr>
<td>after</td>
<td>(optional) by default, this should only be set to</td>
</tr>
<tr>
<td>before</td>
<td>(optional) domains full time minute</td>
</tr>
</tbody></table>
<h2 id="dashboard-aggregate-domains-full-time-minute">Dashboard Aggregate (domains full time minute)</h2>
<blockquote>
<p>Request </p>
</blockquote>
<pre class="highlight shell"><code>curl http://hindsight.getrockerbox.com/crusher/v1/visitor/domains_full_time_minute/cache?url_pattern<span class="o">=</span>/&filter_id<span class="o">=</span>100
</code></pre>
<blockquote>
<p>Response </p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"search"</span><span class="w"> </span><span class="p">:[[</span><span class="s2">"/"</span><span class="p">]],</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="nt">"count"</span><span class="p">:</span><span class="mi">60</span><span class="p">,</span><span class="nt">"domain_idf_hour"</span><span class="p">:</span><span class="mf">36.023456</span><span class="p">,</span><span class="nt">"domain"</span><span class="p">:</span><span class="s2">"rockerbox.com.com"</span><span class="p">,</span><span class="nt">"uniques"</span><span class="p">:</span><span class="mi">55</span><span class="p">,</span><span class="nt">"hour"</span><span class="p">:</span><span class="s2">"15"</span><span class="p">,</span><span class="nt">"url"</span><span class="p">:</span><span class="s2">"http://rockerbox.com/welcome"</span><span class="p">,</span><span class="nt">"num_users"</span><span class="p">:</span><span class="mf">1000000.0</span><span class="p">,</span><span class="nt">"parent_category_name"</span><span class="p">:</span><span class="s2">"Internet & Telecom"</span><span class="p">,</span><span class="nt">"idf"</span><span class="p">:</span><span class="mf">1000.2730</span><span class="p">,</span><span class="nt">"category_idf"</span><span class="p">:</span><span class="mf">0.0045615813</span><span class="p">,</span><span class="nt">"category_hour_idf"</span><span class="p">:</span><span class="mf">0.7843631778</span><span class="p">,</span><span class="nt">"minute"</span><span class="p">:</span><span class="mi">40</span><span class="p">,</span><span class="nt">"category_name"</span><span class="p">:</span><span class="s2">"Internet & Telecom"</span><span class="p">},{</span><span class="err">...</span><span class="p">}],</span><span class="w">
</span><span class="nt">"before"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="nt">"domain"</span><span class="p">:</span><span class="s2">"forbes.com"</span><span class="p">,</span><span class="nt">"uniques"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="nt">"url"</span><span class="p">:</span><span class="s2">"forbes.com"</span><span class="p">,</span><span class="nt">"visits"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="nt">"parent_category_name"</span><span class="p">:</span><span class="s2">"News"</span><span class="p">,</span><span class="nt">"time_diff_bucket"</span><span class="p">:</span><span class="mi">600</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="err">..</span><span class="p">}],</span><span class="w">
</span><span class="nt">"after"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="p">[{</span><span class="nt">"domain"</span><span class="p">:</span><span class="s2">"forbes.com"</span><span class="p">,</span><span class="nt">"uniques"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="nt">"url"</span><span class="p">:</span><span class="s2">"forbes.com"</span><span class="p">,</span><span class="nt">"visits"</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="nt">"parent_category_name"</span><span class="p">:</span><span class="s2">"News"</span><span class="p">,</span><span class="nt">"time_diff_bucket"</span><span class="p">:</span><span class="mi">600</span><span class="p">},{</span><span class="err">...</span><span class="p">}],</span><span class="w">
</span><span class="nt">"summary"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nt">"category"</span><span class="p">:[{</span><span class="nt">"count"</span><span class="p">:</span><span class="mi">981</span><span class="p">,</span><span class="nt">"uniques"</span><span class="p">:</span><span class="mi">55</span><span class="p">,</span><span class="nt">"parent_category_name"</span><span class="p">:</span><span class="s2">"Arts & Entertainment"</span><span class="p">},{</span><span class="err">..</span><span class="p">}],</span><span class="nt">"cross_section"</span><span class="p">:[{</span><span class="nt">"count"</span><span class="p">:</span><span class="mi">4</span><span class="p">,</span><span class="nt">"uniques"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="nt">"minute"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="nt">"hour"</span><span class="p">:</span><span class="s2">"00"</span><span class="p">,</span><span class="nt">"parent_category_name"</span><span class="p">:</span><span class="s2">"Arts & Entertainment"</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="err">..</span><span class="p">}]}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<h2 id="domains-full-time-minute">Domains Full Time Minute</h2>
<p>Main user defined function for constructing dashboard ready aggregate. Based on the domains full time minute user defined function. It contains aggregate information regarding a users offsite and onsite behavior for those users who visited a given onsite page (segment). This behavior is aggregated into totals by url visited and domain. As well, this information is also aggregated based on when the user conducted onsite actvity. Offsite behavior is aggregated based on whether the behavior occured before or after an onsite behavior.</p>
<h3 id="other-cached-udfs">Other Cached UDFs</h3>
<blockquote>
<p>Request</p>
</blockquote>
<pre class="highlight shell"><code>curl http://hindsight.getrockerbox.com/crusher/v1/visitor/domains_full/cache?url_pattern<span class="o">=</span>/&filter_id<span class="o">=</span>100
</code></pre>
<blockquote>
<p>Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"search"</span><span class="w"> </span><span class="p">:[[</span><span class="s2">"/"</span><span class="p">]],</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="nt">"count"</span><span class="p">:</span><span class="mi">50</span><span class="p">,</span><span class="nt">"domain"</span><span class="p">:</span><span class="s2">"forbes.com"</span><span class="p">,</span><span class="nt">"uniques"</span><span class="p">:</span><span class="mi">15</span><span class="p">,</span><span class="nt">"url"</span><span class="p">:</span><span class="s2">"https://www.forbes.com/bill-gates"</span><span class="p">,</span><span class="nt">"num_users"</span><span class="p">:</span><span class="mf">200000.0</span><span class="p">,</span><span class="nt">"parent_category_name"</span><span class="p">:</span><span class="s2">"News"</span><span class="p">,</span><span class="nt">"idf"</span><span class="p">:</span><span class="mf">2.8631419342</span><span class="p">,</span><span class="nt">"category_name"</span><span class="p">:</span><span class="s2">"Business News"</span><span class="p">},</span><span class="w"> </span><span class="p">{}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>For the most part User Defined Functions outside of domains full time minute have been deprecated. Older smaller aggregates have been deprecated in favor of the single domains full time minute aggregate. Some of these are still available and can be available upon request. These responses should be identical to the UDF endpoint. However, these endpoints should return the data far quicker than the uncached UDF endpoints. </p>
<h1 id="prototype">Prototype</h1>
<blockquote>
<p>Example Response</p>
</blockquote>
<pre class="highlight json"><code><span class="p">{</span><span class="w">
</span><span class="nt">"response"</span><span class="p">:</span><span class="w"> </span><span class="p">[{}],</span><span class="w">
</span><span class="nt">"search"</span><span class="p">:</span><span class="w"> </span><span class="p">[[</span><span class="s2">"/"</span><span class="p">]],</span><span class="w">
</span><span class="nt">"summary"</span><span class="p">:</span><span class="w"> </span><span class="p">{}</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre>
<p>This a prototype for the future back end of the Hindsight product. In this prototype iteration we are allowing multidemnsional filtering. In the current version of the prototype this means that the offsite data for a clients users can be filtered by both the segment and and an additional offsite condition. Currently, the filter-able offsite conditions are domain and keyword. In this context the prototype can return results for the offsite activity for users who both conduct the onsite action of the segment and visit the domain or url keyword included in the request. Keyword filtering is done based on the keyword being part of the offsite url after the base domain. An example filtering condition would be users who visited a product page onsite and had also visited ebay.com. Another example would be offiste activity for users who purchased onsite and also visited an offsite url containing the keyword <code class="prettyprint">clothing</code></p>
<p>Every Prototype will have the following items in its response:</p>
<table><thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead><tbody>
<tr>
<td>response</td>
<td>this is an auto generated identifier for the action. this identifier will be use later to relate actions to funnels</td>
</tr>
<tr>
<td>search</td>
<td>this is an array of strings that are used to match against the url associated with an event</td>
</tr>
<tr>
<td>summary</td>
<td>(optional) by default, this should only be set to “or”. The behavior associated with an “and” operator can be achieved by comma seperating strings</td>
</tr>
</tbody></table>
<h2 id="get-prototype">Get Prototype</h2>
<blockquote>
<p>Request UDF</p>
</blockquote>
<pre class="highlight shell"><code>curl http://slave97:31682/prototype/domains_full_time_minute?filter_id<span class="o">=</span><FILTER_ID>&domain<span class="o">=</span>nytimes.com
curl http://slave97:31682/prototype/domains_full_time_minute?filter_id<span class="o">=</span><FILTER_ID>&keyword<span class="o">=</span>clothing
</code></pre>
<p>The parameters available for prototype endpoints are <code class="prettyprint">keyword</code>, <code class="prettyprint">filter_id</code> and <code class="prettyprint">domain</code>. The parameter <code class="prettyprint">filter_id</code> is required for all requests along with one of the two other parameters. This is only avialable for a subset of advertisers and you must be logged in as one of those users to access. These is also an optional parameters for limiting the number of records included in the aggregation of the response data. This parameter is <code class="prettyprint">limit</code> the default value is 25000. These means that by default 25000 offsite user events will be included by default. This limit can any integer and a number such as 1000000 should be used for the entirety of the data. However, number greater 100000 typically take upwards of 25-30+ seconds for the full response.</p>
<p>It is also possible to apply a user defined function to the datasets from the prototype. However, there is currently only one udf available for this application at the current time (domains_full_time_minute). Other UDFs may be available in the future with the above access pattern and the same udf name convention as the main Hindsight application.</p>
<h1 id="errors">Errors</h1>
<aside class="notice">This error section is stored in a separate file in `includes/_errors.md`. Slate allows you to optionally separate out your docs into many files…just save them to the `includes` folder and add them to the top of your `index.md`’s frontmatter. Files are included in the order listed.</aside>
<p>The Kittn API uses the following error codes:</p>
<table><thead>
<tr>
<th>Error Code</th>
<th>Meaning</th>
</tr>
</thead><tbody>
<tr>
<td>400</td>
<td>Bad Request – Your request sucks</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorized – Your API key is wrong</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden – The kitten requested is hidden for administrators only</td>
</tr>
<tr>
<td>404</td>
<td>Not Found – The specified kitten could not be found</td>
</tr>
<tr>
<td>405</td>
<td>Method Not Allowed – You tried to access a kitten with an invalid method</td>
</tr>
<tr>
<td>406</td>
<td>Not Acceptable – You requested a format that isn’t json</td>
</tr>
<tr>
<td>410</td>
<td>Gone – The kitten requested has been removed from our servers</td>
</tr>
<tr>
<td>418</td>
<td>I’m a teapot</td>
</tr>
<tr>
<td>429</td>
<td>Too Many Requests – You’re requesting too many kittens! Slow down!</td>
</tr>
<tr>
<td>500</td>
<td>Internal Server Error – We had a problem with our server. Try again later.</td>
</tr>
<tr>
<td>503</td>
<td>Service Unavailable – We’re temporarially offline for maintanance. Please try again later.</td>
</tr>
</tbody></table>
</div>
<div class="dark-box">
<div class="lang-selector">
<a href="#" data-language-name="shell">shell</a>
<a href="#" data-language-name="python">python</a>
</div>
</div>
</div>
</body>
</html>