-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathPubCalculationsApi.java
More file actions
692 lines (580 loc) · 93.4 KB
/
Copy pathPubCalculationsApi.java
File metadata and controls
692 lines (580 loc) · 93.4 KB
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
package factset.analyticsapi.engines.api;
import factset.analyticsapi.engines.ApiException;
import factset.analyticsapi.engines.ApiClient;
import factset.analyticsapi.engines.ApiResponse;
import factset.analyticsapi.engines.Configuration;
import factset.analyticsapi.engines.Pair;
import javax.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.io.File;
import factset.analyticsapi.engines.models.CalculationStatusRoot;
import factset.analyticsapi.engines.models.CalculationsSummaryRoot;
import factset.analyticsapi.engines.models.ClientErrorResponse;
import java.io.File;
import factset.analyticsapi.engines.models.PubCalculationParametersRoot;
@javax.annotation.Generated(value = "CustomJavaClientCodegen")
/**
* @deprecated This library is deprecated.Please use https://central.sonatype.com/search?q=com.factset.sdk&smo=true instead.
*/
@Deprecated
public class PubCalculationsApi {
private ApiClient apiClient;
public PubCalculationsApi() {
this(Configuration.getDefaultApiClient());
}
public PubCalculationsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get the API cilent
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API cilent
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Cancel Pub calculation by id
* This is the endpoint to cancel a previously submitted calculation.
* @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 204 </td><td> Expected response, calculation was canceled successfully. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid identifier provided. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> There was no request for the calculation identifier provided, or the request was already canceled for the provided identifier. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public void cancelCalculationById(String id) throws ApiException {
cancelCalculationByIdWithHttpInfo(id);
}
/**
* Cancel Pub calculation by id
* This is the endpoint to cancel a previously submitted calculation.
* @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 204 </td><td> Expected response, calculation was canceled successfully. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid identifier provided. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> There was no request for the calculation identifier provided, or the request was already canceled for the provided identifier. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public ApiResponse<Void> cancelCalculationByIdWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling cancelCalculationById");
}
// create path and map variables
String localVarPath = "/analytics/engines/pub/v3/calculations/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, String> localVarCookieParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
final String[] localVarAccepts = {
"text/plain", "application/json", "text/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "Basic", "Bearer" };
Map<Integer, GenericType> returnTypeMap = new HashMap<Integer, GenericType>();
returnTypeMap.put(400, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(404, new GenericType<ClientErrorResponse>(){});
return apiClient.<Void>invokeAPIWithReturnMap("PubCalculationsApi.cancelCalculationById", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, returnTypeMap, false);
}
/**
* Get all calculations
* This endpoints returns all calculation requests.
* @param pageNumber (optional, default to 1)
@return CalculationsSummaryRoot
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> List of calculation requests. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid page number. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> No calculation found. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 406 </td><td> Unsupported Accept header. Header needs to be set to application/json. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 429 </td><td> Rate limit reached. Wait till the time specified in Retry-After header value to make further requests. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * Retry-After - Time to wait in seconds before making a new request as the rate limit has reached. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public CalculationsSummaryRoot getAllCalculations(Integer pageNumber) throws ApiException {
return getAllCalculationsWithHttpInfo(pageNumber).getData();
}
/**
* Get all calculations
* This endpoints returns all calculation requests.
* @param pageNumber (optional, default to 1)
* @return ApiResponse<CalculationsSummaryRoot>
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> List of calculation requests. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid page number. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> No calculation found. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 406 </td><td> Unsupported Accept header. Header needs to be set to application/json. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 429 </td><td> Rate limit reached. Wait till the time specified in Retry-After header value to make further requests. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * Retry-After - Time to wait in seconds before making a new request as the rate limit has reached. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public ApiResponse<CalculationsSummaryRoot> getAllCalculationsWithHttpInfo(Integer pageNumber) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/analytics/engines/pub/v3/calculations";
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, String> localVarCookieParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageNumber", pageNumber));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "Basic", "Bearer" };
GenericType<CalculationsSummaryRoot> localVarReturnType = new GenericType<CalculationsSummaryRoot>() {};
Map<Integer, GenericType> returnTypeMap = new HashMap<Integer, GenericType>();
returnTypeMap.put(200, new GenericType<CalculationsSummaryRoot>(){});
returnTypeMap.put(400, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(404, new GenericType<ClientErrorResponse>(){});
return apiClient.<CalculationsSummaryRoot>invokeAPIWithReturnMap("PubCalculationsApi.getAllCalculations", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, returnTypeMap, false);
}
/**
* Get Pub calculation parameters by id
* This is the endpoint that returns the calculation parameters passed for a calculation.
* @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
@return PubCalculationParametersRoot
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Expected response, returns the Pub calculation parameters. </td><td> * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header. <br> * Content-Type - Standard HTTP header. <br> * Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified. <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid identifier provided. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> Calculation id not found </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public PubCalculationParametersRoot getCalculationParameters(String id) throws ApiException {
return getCalculationParametersWithHttpInfo(id).getData();
}
/**
* Get Pub calculation parameters by id
* This is the endpoint that returns the calculation parameters passed for a calculation.
* @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
* @return ApiResponse<PubCalculationParametersRoot>
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Expected response, returns the Pub calculation parameters. </td><td> * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header. <br> * Content-Type - Standard HTTP header. <br> * Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified. <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid identifier provided. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> Calculation id not found </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public ApiResponse<PubCalculationParametersRoot> getCalculationParametersWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling getCalculationParameters");
}
// create path and map variables
String localVarPath = "/analytics/engines/pub/v3/calculations/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, String> localVarCookieParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "Basic", "Bearer" };
GenericType<PubCalculationParametersRoot> localVarReturnType = new GenericType<PubCalculationParametersRoot>() {};
Map<Integer, GenericType> returnTypeMap = new HashMap<Integer, GenericType>();
returnTypeMap.put(200, new GenericType<PubCalculationParametersRoot>(){});
returnTypeMap.put(400, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(404, new GenericType<ClientErrorResponse>(){});
return apiClient.<PubCalculationParametersRoot>invokeAPIWithReturnMap("PubCalculationsApi.getCalculationParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, returnTypeMap, false);
}
/**
* Get Pub calculation status by id
* This is the endpoint to check on the progress of a previously requested calculation. If the calculation has finished computing, the location header will point to the result url.
* @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
@return CalculationStatusRoot
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Expected response once calculation is completed. </td><td> * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header. <br> * Content-Type - Standard HTTP header. <br> * Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified. <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 202 </td><td> Expected response returned if the calculation is not yet completed. </td><td> * X-FactSet-Api-PickUp-Progress - FactSet's progress header. <br> * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid identifier provided. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public CalculationStatusRoot getCalculationStatusById(String id) throws ApiException {
return getCalculationStatusByIdWithHttpInfo(id).getData();
}
/**
* Get Pub calculation status by id
* This is the endpoint to check on the progress of a previously requested calculation. If the calculation has finished computing, the location header will point to the result url.
* @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
* @return ApiResponse<CalculationStatusRoot>
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Expected response once calculation is completed. </td><td> * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header. <br> * Content-Type - Standard HTTP header. <br> * Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified. <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 202 </td><td> Expected response returned if the calculation is not yet completed. </td><td> * X-FactSet-Api-PickUp-Progress - FactSet's progress header. <br> * Cache-Control - Standard HTTP header. Header will specify max-age in seconds. Polling can be adjusted based on the max-age value. <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid identifier provided. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public ApiResponse<CalculationStatusRoot> getCalculationStatusByIdWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling getCalculationStatusById");
}
// create path and map variables
String localVarPath = "/analytics/engines/pub/v3/calculations/{id}/status"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, String> localVarCookieParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "Basic", "Bearer" };
GenericType<CalculationStatusRoot> localVarReturnType = new GenericType<CalculationStatusRoot>() {};
Map<Integer, GenericType> returnTypeMap = new HashMap<Integer, GenericType>();
returnTypeMap.put(200, new GenericType<CalculationStatusRoot>(){});
returnTypeMap.put(202, new GenericType<CalculationStatusRoot>(){});
returnTypeMap.put(400, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(404, new GenericType<ClientErrorResponse>(){});
return apiClient.<CalculationStatusRoot>invokeAPIWithReturnMap("PubCalculationsApi.getCalculationStatusById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, returnTypeMap, false);
}
/**
* Get Pub calculation result by id
* This is the endpoint to get the result of a previously requested calculation. If the calculation has finished computing, the body of the response will contain the requested document in the specified format.
* @param id from url, provided from the location header in the Get Pub calculation status by id endpoint (required)
* @param unitId from url, provided from the location header in the Get Pub calculation status by id endpoint (required)
@return File
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Expected response once calculation is completed, returns result in the format specified in the Calculation parameters. </td><td> * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header. <br> * Content-Type - Standard HTTP header. <br> * Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified. <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid identifier provided. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public File getCalculationUnitResultById(String id, String unitId) throws ApiException {
return getCalculationUnitResultByIdWithHttpInfo(id, unitId).getData();
}
/**
* Get Pub calculation result by id
* This is the endpoint to get the result of a previously requested calculation. If the calculation has finished computing, the body of the response will contain the requested document in the specified format.
* @param id from url, provided from the location header in the Get Pub calculation status by id endpoint (required)
* @param unitId from url, provided from the location header in the Get Pub calculation status by id endpoint (required)
* @return ApiResponse<File>
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Expected response once calculation is completed, returns result in the format specified in the Calculation parameters. </td><td> * Content-Encoding - Standard HTTP header. Header value based on Accept-Encoding Request header. <br> * Content-Type - Standard HTTP header. <br> * Transfer-Encoding - Standard HTTP header. Header value will be set to Chunked if Accept-Encoding header is specified. <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid identifier provided. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> Calculation was already returned, provided id was not a requested calculation, or the calculation was cancelled </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public ApiResponse<File> getCalculationUnitResultByIdWithHttpInfo(String id, String unitId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling getCalculationUnitResultById");
}
// verify the required parameter 'unitId' is set
if (unitId == null) {
throw new ApiException(400, "Missing the required parameter 'unitId' when calling getCalculationUnitResultById");
}
// create path and map variables
String localVarPath = "/analytics/engines/pub/v3/calculations/{id}/units/{unitId}/result"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
.replaceAll("\\{" + "unitId" + "\\}", apiClient.escapeString(unitId.toString()));
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, String> localVarCookieParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/x-protobuf", "application/pdf"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "Basic", "Bearer" };
GenericType<File> localVarReturnType = new GenericType<File>() {};
Map<Integer, GenericType> returnTypeMap = new HashMap<Integer, GenericType>();
returnTypeMap.put(200, new GenericType<File>(){});
returnTypeMap.put(400, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(404, new GenericType<ClientErrorResponse>(){});
return apiClient.<File>invokeAPIWithReturnMap("PubCalculationsApi.getCalculationUnitResultById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, returnTypeMap, false);
}
/**
* Create and Run Pub calculation
* This endpoint runs the Pub calculation specified in the POST body parameters. It can take one or more units as input.
* @param xFactSetApiLongRunningDeadline Long running deadline in seconds when only one unit is passed in the POST body. Example value is set to 10s. Please update it as per requirement before triggering a calculation. (optional)
* @param cacheControl Standard HTTP header. Accepts max-stale. (optional)
* @param pubCalculationParametersRoot Calculation Parameters (optional)
@return (For 202 status - CalculationStatusRoot)(For 200 status - CalculationStatusRoot)(For 201 status - File)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> Expected response, contains the poll URL in the Location header. </td><td> * Location - URL to poll for the resulting calculation <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 200 </td><td> Expected response, if the calculation has one unit and is completed with an error. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 201 </td><td> Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid calculation parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> One or more calculation settings were unavailable. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 415 </td><td> Missing/Invalid Content-Type header. Header needs to be set to application/json. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 429 </td><td> Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> * Retry-After - Time to wait in seconds before making a new request as the rate limit has reached. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public Object postAndCalculate(Integer xFactSetApiLongRunningDeadline, String cacheControl, PubCalculationParametersRoot pubCalculationParametersRoot) throws ApiException {
return postAndCalculateWithHttpInfo(xFactSetApiLongRunningDeadline, cacheControl, pubCalculationParametersRoot).getData();
}
/**
* Create and Run Pub calculation
* This endpoint runs the Pub calculation specified in the POST body parameters. It can take one or more units as input.
* @param xFactSetApiLongRunningDeadline Long running deadline in seconds when only one unit is passed in the POST body. Example value is set to 10s. Please update it as per requirement before triggering a calculation. (optional)
* @param cacheControl Standard HTTP header. Accepts max-stale. (optional)
* @param pubCalculationParametersRoot Calculation Parameters (optional)
* @return ApiResponse<Object>(For 202 status - CalculationStatusRoot)(For 200 status - CalculationStatusRoot)(For 201 status - File)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> Expected response, contains the poll URL in the Location header. </td><td> * Location - URL to poll for the resulting calculation <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 200 </td><td> Expected response, if the calculation has one unit and is completed with an error. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 201 </td><td> Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid calculation parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> One or more calculation settings were unavailable. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 415 </td><td> Missing/Invalid Content-Type header. Header needs to be set to application/json. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 429 </td><td> Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> * Retry-After - Time to wait in seconds before making a new request as the rate limit has reached. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> </td></tr>
</table>
*/
public ApiResponse<Object> postAndCalculateWithHttpInfo(Integer xFactSetApiLongRunningDeadline, String cacheControl, PubCalculationParametersRoot pubCalculationParametersRoot) throws ApiException {
Object localVarPostBody = pubCalculationParametersRoot;
// create path and map variables
String localVarPath = "/analytics/engines/pub/v3/calculations";
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, String> localVarCookieParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
if (xFactSetApiLongRunningDeadline != null)
localVarHeaderParams.put("X-FactSet-Api-Long-Running-Deadline", apiClient.parameterToString(xFactSetApiLongRunningDeadline));
if (cacheControl != null)
localVarHeaderParams.put("Cache-Control", apiClient.parameterToString(cacheControl));
final String[] localVarAccepts = {
"application/pdf", "application/vnd.openxmlformats-officedocument.presentationml.presentation"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "Basic", "Bearer" };
GenericType<CalculationStatusRoot> localVarReturnType = new GenericType<CalculationStatusRoot>() {};
Map<Integer, GenericType> returnTypeMap = new HashMap<Integer, GenericType>();
returnTypeMap.put(202, new GenericType<CalculationStatusRoot>(){});
returnTypeMap.put(200, new GenericType<CalculationStatusRoot>(){});
returnTypeMap.put(201, new GenericType<File>(){});
returnTypeMap.put(400, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(404, new GenericType<ClientErrorResponse>(){});
return apiClient.<Object>invokeAPIWithReturnMap("PubCalculationsApi.postAndCalculate", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, returnTypeMap, false);
}
/**
* Create or Update Pub calculation and run it.
* This endpoint updates and run the Pub calculation specified in the PUT body parameters. This also allows creating new Pub calculations with custom ids. It can take one or more units as input. Remarks: * Start and and end date must be within the configuration's min and max date range
* @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
* @param xFactSetApiLongRunningDeadline Long running deadline in seconds when only one unit is passed in the PUT body. Example value is set to 10s. Please update it as per requirement before triggering a calculation. (optional)
* @param cacheControl Standard HTTP header. Accepts max-stale. (optional)
* @param pubCalculationParametersRoot Calculation Parameters (optional)
@return (For 202 status - CalculationStatusRoot)(For 200 status - CalculationStatusRoot)(For 201 status - File)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> Expected response, contains the poll URL in the Location header. </td><td> * Location - URL to poll for the resulting calculation <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 200 </td><td> Expected response, if the calculation has one unit and is completed with an error. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 201 </td><td> Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid Calculation Parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> One or more calculation settings were unavailable. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 409 </td><td> Duplicate calculation exists with same parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 415 </td><td> Missing/Invalid Content-Type header. Header needs to be set to application/json. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 429 </td><td> Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> * Retry-After - Time to wait in seconds before making a new request as the rate limit has reached. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> </td></tr>
</table>
*/
public Object putAndCalculate(String id, Integer xFactSetApiLongRunningDeadline, String cacheControl, PubCalculationParametersRoot pubCalculationParametersRoot) throws ApiException {
return putAndCalculateWithHttpInfo(id, xFactSetApiLongRunningDeadline, cacheControl, pubCalculationParametersRoot).getData();
}
/**
* Create or Update Pub calculation and run it.
* This endpoint updates and run the Pub calculation specified in the PUT body parameters. This also allows creating new Pub calculations with custom ids. It can take one or more units as input. Remarks: * Start and and end date must be within the configuration's min and max date range
* @param id from url, provided from the location header in the Create and Run Pub calculation endpoint (required)
* @param xFactSetApiLongRunningDeadline Long running deadline in seconds when only one unit is passed in the PUT body. Example value is set to 10s. Please update it as per requirement before triggering a calculation. (optional)
* @param cacheControl Standard HTTP header. Accepts max-stale. (optional)
* @param pubCalculationParametersRoot Calculation Parameters (optional)
* @return ApiResponse<Object>(For 202 status - CalculationStatusRoot)(For 200 status - CalculationStatusRoot)(For 201 status - File)
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 202 </td><td> Expected response, contains the poll URL in the Location header. </td><td> * Location - URL to poll for the resulting calculation <br> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 200 </td><td> Expected response, if the calculation has one unit and is completed with an error. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 201 </td><td> Expected response if the calculation has one unit and is completed in a short span, returns JSON in the format specified in the Calculation parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 400 </td><td> Invalid Calculation Parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 404 </td><td> One or more calculation settings were unavailable. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 409 </td><td> Duplicate calculation exists with same parameters. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 401 </td><td> Missing or invalid authentication. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> </td></tr>
<tr><td> 403 </td><td> User is forbidden with current credentials </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 415 </td><td> Missing/Invalid Content-Type header. Header needs to be set to application/json. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> </td></tr>
<tr><td> 429 </td><td> Rate limit reached. Cancel older requests using Cancel Calculation endpoint or wait for older requests to finish/expire. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> * X-FactSet-Api-RateLimit-Limit - Number of allowed requests for the time window. <br> * X-FactSet-Api-RateLimit-Remaining - Number of requests left for the time window. <br> * X-FactSet-Api-RateLimit-Reset - Number of seconds remaining till rate limit resets. <br> * Retry-After - Time to wait in seconds before making a new request as the rate limit has reached. <br> </td></tr>
<tr><td> 500 </td><td> Server error. Log the X-DataDirect-Request-Key header to assist in troubleshooting. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> </td></tr>
<tr><td> 503 </td><td> Request timed out. Retry the request in sometime. </td><td> * X-DataDirect-Request-Key - FactSet's request key header. <br> * X-FactSet-Api-Request-Key - Key to uniquely identify an Analytics API request. Only available after successful authentication. <br> * X-FactSet-Api-Calculations-Limit - Maximum FI request limit. <br> * X-FactSet-Api-Calculations-Remaining - Number of FI requests remaining till request limit reached. <br> </td></tr>
</table>
*/
public ApiResponse<Object> putAndCalculateWithHttpInfo(String id, Integer xFactSetApiLongRunningDeadline, String cacheControl, PubCalculationParametersRoot pubCalculationParametersRoot) throws ApiException {
Object localVarPostBody = pubCalculationParametersRoot;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling putAndCalculate");
}
// create path and map variables
String localVarPath = "/analytics/engines/pub/v3/calculations/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, String> localVarCookieParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
if (xFactSetApiLongRunningDeadline != null)
localVarHeaderParams.put("X-FactSet-Api-Long-Running-Deadline", apiClient.parameterToString(xFactSetApiLongRunningDeadline));
if (cacheControl != null)
localVarHeaderParams.put("Cache-Control", apiClient.parameterToString(cacheControl));
final String[] localVarAccepts = {
"application/pdf"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "Basic", "Bearer" };
GenericType<CalculationStatusRoot> localVarReturnType = new GenericType<CalculationStatusRoot>() {};
Map<Integer, GenericType> returnTypeMap = new HashMap<Integer, GenericType>();
returnTypeMap.put(202, new GenericType<CalculationStatusRoot>(){});
returnTypeMap.put(200, new GenericType<CalculationStatusRoot>(){});
returnTypeMap.put(201, new GenericType<File>(){});
returnTypeMap.put(400, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(404, new GenericType<ClientErrorResponse>(){});
returnTypeMap.put(409, new GenericType<ClientErrorResponse>(){});
return apiClient.<Object>invokeAPIWithReturnMap("PubCalculationsApi.putAndCalculate", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, returnTypeMap, false);
}
}