1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
|
==========================
Data Router (DR) API Guide
==========================
Introduction
------------
The DataRouter(DR) provisioning API is an HTTPS-based, REST-like API for creating and managing DR feeds and subscriptions. The Data Routing System project is intended to provide a common framework by which data producers can make data available to data consumers and a way for potential consumers to find feeds with the data they require.
HTTP Service APIs
-----------------
DMaaP Data Router utilizes an HTTP REST API to service all transactions. HTTP and REST standards are followed so
clients as varied as CURL, Java applications and even Web Browsers will
work to interact with the Data Router.
General HTTP Requirements
=========================
A DMaaP Data Router transactions consists of 4 distinct segments,
HTTP URL, HTTP Header, HTTP Body (POST/PUT) and HTTP Response. The general
considerations for each segment are as follows and are required for each
of the specific transactions described in this section.
HTTP URL
========
http[s]://{serverBaseURL}/{resourcePath}
* The serverBaseURL points to DMaaP Data Router host/port that will service the request.
* The resourcePath specifies the specific service that the client is attempting to reach.
HTTP Header
===========
Specifies HTTP Headers, such as Content-Type, that define the parameters of the HTTP Transaction
HTTP Body
=========
The HTTP Body contains the feed content when creating a feed.
Create a Feed
-------------
**Description**: Creates a unique set of URL's to service the publisher/subscriber model.
Sample Request
==============
curl -v -X POST -H "Content-Type: application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF: {user}" --data-ascii @/opt/app/datartr/addFeed3.txt --post301 --location-trusted -k https:/{host}:{port}
Request Parameters:
===================
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| Name | Description | Param Type | Data Type | MaxLen | Required | Format | Valid/Example Values |
+========================+=================================+==================+============+==============+=============+=====================+======================================+
| name | Feed name | Body | String | <=20 | Y | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| version | Feed version | Body | String | <=20 | Y | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| description | Feed description | Body | String | | Y | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| business description | Business description | Body | String | | Y | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| Authorization | Information for authorizing | Body | Object | | Y | | |
| | publishing requests | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| suspend | Set to true if the feed is in | Body | Boolean | | N | | true |
| | the suspended state | | | | | | false |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| group-id | | Body | Integer | | Y | | |
| | | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| content-type | To specify type of message | Header | String | 20 | N | | application/vnd.att-dr.subscription |
| | (feed,subscriber,publisher) | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| X-ATT-DR-ON-BEHALF-OF | User id of subscriber | Header | String | 1 | N | | username |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
Response/Error Codes
====================
+------------------------+-------------------------------------------+
| Response statusCode | Response Description |
+========================+===========================================+
| 200 | Successful query |
+------------------------+-------------------------------------------+
| 400 | Bad request - The request is defective in |
| | some way. Possible causes: |
| | |
| | * JSON object in request body does not |
| | conform to the spec. |
| | * Invalid parameter value in query string |
+------------------------+-------------------------------------------+
| 401 | Indicates that the request was missing the|
| | Authorization header or, if the header |
| | was presented, the credentials were not |
| | acceptable |
+------------------------+-------------------------------------------+
| 403 | The request failed authorization. |
| | Possible causes: |
| | |
| | * Request originated from an unauthorized |
| | IP address |
| | * Client certificate subject is not on |
| | the API’s authorized list. |
| | * X-ATT-DR-ON-BEHALF-OF identity is not |
| | authorized to perform |
+------------------------+-------------------------------------------+
| 404 | Not Found - The Request-URI does not point|
| | to a resource that is known to the API. |
+------------------------+-------------------------------------------+
| 405 | Method Not Allowed - The HTTP method in |
| | the request is not supported for the |
| | resource addressed by the Request-URI. |
+------------------------+-------------------------------------------+
| 415 | Unsupported Media Type - The media type in|
| | the request’s Content-Type header is not |
| | appropriate for the request. |
+------------------------+-------------------------------------------+
| 500 | Internal Server Error - The DR API server |
| | encountered an internal error and could |
| | not complete the request. |
+------------------------+-------------------------------------------+
| 503 | Service Unavailable - The DR API service |
| | is currently unavailable |
+------------------------+-------------------------------------------+
| -1 | Failed Delivery |
+------------------------+-------------------------------------------+
Sample Body
===========
.. code-block:: json
{
"name": "Jettydemo",
"version": "m1.0",
"description": "Jettydemo",
"business_description": "Jettydemo",
"suspend": false,
"deleted": false,
"changeowner": true,
"authorization": {
"classification": "unclassified",
"endpoint_addrs": [
"172.18.0.3",
],
"endpoint_ids": [
{
"password": "password",
"id": "user"
}
]
},
}
Get a Feed
----------
**Description**: Retrieves a representation of the specified feed.
Request URL
===========
http[s]://{host}:{port}/feed/{feedId}
* {feedId}: Id of the feed you wish to see a representation of
Sample Request
==============
curl -v -X GET -H "X-ATT-DR-ON-BEHALF-OF: {user}" --location-trusted -k https:/{host}:{port}/feed/{feedId}
Response/Error Codes
====================
+------------------------+-------------------------------------------+
| Response statusCode | Response Description |
+========================+===========================================+
| 200 | Successful query |
+------------------------+-------------------------------------------+
| 401 | Indicates that the request was missing the|
| | Authorization header or, if the header |
| | was presented, the credentials were not |
| | acceptable |
+------------------------+-------------------------------------------+
| 403 | The request failed authorization. |
| | Possible causes: |
| | |
| | * Request originated from an unauthorized |
| | IP address |
| | * Client certificate subject is not on |
| | the API’s authorized list. |
| | * X-ATT-DR-ON-BEHALF-OF identity is not |
| | authorized to perform |
+------------------------+-------------------------------------------+
| 404 | Not Found - The Request-URI does not point|
| | to a resource that is known to the API. |
+------------------------+-------------------------------------------+
| 405 | Method Not Allowed - The HTTP method in |
| | the request is not supported for the |
| | resource addressed by the Request-URI. |
+------------------------+-------------------------------------------+
| 415 | Unsupported Media Type - The media type in|
| | the request’s Content-Type header is not |
| | appropriate for the request. |
+------------------------+-------------------------------------------+
| 500 | Internal Server Error - The DR API server |
| | encountered an internal error and could |
| | not complete the request. |
+------------------------+-------------------------------------------+
| 503 | Service Unavailable - The DR API service |
| | is currently unavailable |
+------------------------+-------------------------------------------+
| -1 | Failed Delivery |
+------------------------+-------------------------------------------+
Subscribe to Feed
-----------------
**Description**: Subscribes to a created feed to receive files published to that feed.
Request URL
===========
http[s]://{host}:{port}/subscribe/{feedId}
Sample Request
==============
curl -v -X POST -H "Content-Type: application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF: {user}" --data-ascii @/opt/app/datartr/addSubscriber.txt --post301 --location-trusted -k https://{host}:{port}/subscribe/{feedId}
Request Parameters:
===================
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| Name | Description | Param Type | Data Type | MaxLen | Required | Format | Valid/Example Values |
+========================+=================================+==================+============+==============+=============+=====================+======================================+
| feedId | ID for the feed you are | Path | String | | Y | | |
| | subscribing to | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| delivery | Address and credentials for | Body | Object | | Y | | |
| | delivery | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| follow_redirect | Set to true if feed redirection | Body | Boolean | | Y | | true |
| | is expected | | | | | | false |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| metadata_only | Set to true if subscription is | Body | Boolean | | Y | | true |
| | to receive per-file metadata | | | | | | false |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| suspend | Set to true if the subscription | Body | Boolean | | N | | true |
| | is in the suspended state | | | | | | false |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| group-id | | Body | Integer | | Y | | |
| | | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| content-type | To specify type of message | Header | String | 20 | N | | application/vnd.att-dr.subscription |
| | (feed,subscriber,publisher) | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| X-ATT-DR-ON-BEHALF-OF | User id of subscriber | Header | String | 1 | N | | username |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
Response/Error Codes
====================
+------------------------+-------------------------------------------+
| Response statusCode | Response Description |
+========================+===========================================+
| 200 | Successful query |
+------------------------+-------------------------------------------+
| 400 | Bad request - The request is defective in |
| | some way. Possible causes: |
| | |
| | * JSON object in request body does not |
| | conform to the spec. |
| | * Invalid parameter value in query string |
+------------------------+-------------------------------------------+
| 401 | Indicates that the request was missing the|
| | Authorization header or, if the header |
| | was presented, the credentials were not |
| | acceptable |
+------------------------+-------------------------------------------+
| 403 | The request failed authorization. |
| | Possible causes: |
| | |
| | * Request originated from an unauthorized |
| | IP address |
| | * Client certificate subject is not on |
| | the API’s authorized list. |
| | * X-ATT-DR-ON-BEHALF-OF identity is not |
| | authorized to perform |
+------------------------+-------------------------------------------+
| 404 | Not Found - The Request-URI does not point|
| | to a resource that is known to the API. |
+------------------------+-------------------------------------------+
| 405 | Method Not Allowed - The HTTP method in |
| | the request is not supported for the |
| | resource addressed by the Request-URI. |
+------------------------+-------------------------------------------+
| 415 | Unsupported Media Type - The media type in|
| | the request’s Content-Type header is not |
| | appropriate for the request. |
+------------------------+-------------------------------------------+
| 500 | Internal Server Error - The DR API server |
| | encountered an internal error and could |
| | not complete the request. |
+------------------------+-------------------------------------------+
| 503 | Service Unavailable - The DR API service |
| | is currently unavailable |
+------------------------+-------------------------------------------+
| -1 | Failed Delivery |
+------------------------+-------------------------------------------+
Sample Body
===========
.. code-block:: json
{
"delivery" :{
"url" : "http://172.18.0.3:7070/",
"user" : "LOGIN",
"password" : "PASSWORD",
"use100" : true
},
"metadataOnly" : false,
"suspend" : false,
"groupid" : 29,
"subscriber" : "sg481n"
}
Get a Subscription
------------------
**Description**: Retrieves a representation of the specified subscription.
Request URL
===========
http[s]://{host}:{port}/subscribe/{subId}
* {subId}: Id of the subscription you wish to see a representation of
Sample Request
==============
curl -v -X GET -H "X-ATT-DR-ON-BEHALF-OF: {user}" --location-trusted -k https:/{host}:{port}/subscribe/{subId}
Response/Error Codes
====================
+------------------------+-------------------------------------------+
| Response statusCode | Response Description |
+========================+===========================================+
| 200 | Successful query |
+------------------------+-------------------------------------------+
| 401 | Indicates that the request was missing the|
| | Authorization header or, if the header |
| | was presented, the credentials were not |
| | acceptable |
+------------------------+-------------------------------------------+
| 403 | The request failed authorization. |
| | Possible causes: |
| | |
| | * Request originated from an unauthorized |
| | IP address |
| | * Client certificate subject is not on |
| | the API’s authorized list. |
| | * X-ATT-DR-ON-BEHALF-OF identity is not |
| | authorized to perform |
+------------------------+-------------------------------------------+
| 404 | Not Found - The Request-URI does not point|
| | to a resource that is known to the API. |
+------------------------+-------------------------------------------+
| 405 | Method Not Allowed - The HTTP method in |
| | the request is not supported for the |
| | resource addressed by the Request-URI. |
+------------------------+-------------------------------------------+
| 415 | Unsupported Media Type - The media type in|
| | the request’s Content-Type header is not |
| | appropriate for the request. |
+------------------------+-------------------------------------------+
| 500 | Internal Server Error - The DR API server |
| | encountered an internal error and could |
| | not complete the request. |
+------------------------+-------------------------------------------+
| 503 | Service Unavailable - The DR API service |
| | is currently unavailable |
+------------------------+-------------------------------------------+
| -1 | Failed Delivery |
+------------------------+-------------------------------------------+
Publish to Feed
---------------
**Description**: Publish a file to a created feed so that it can be shared to any subscribers of that feed
Request URL
===========
http[s]://{host}:{port}/publish/{feedId}/{fileName}
* {feedId} is the id of the feed you are publishing to.
* {fileId} is the id of the file you are publishing onto the feed.
Request parameters
==================
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| Name | Description | Param Type | Data Type | MaxLen | Required | Format | Valid/Example Values |
+========================+=================================+==================+============+==============+=============+=====================+======================================+
| feedId | ID of the feed you are | Path | String | | Y | | |
| | publishing to | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| fileId | Name of the file when it is | Path | String | | Y | | |
| | published to subscribers | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| content-type | To specify type of message | Header | String | 20 | N | | application/octet-stream |
| | format | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
Response/Error Codes
====================
+------------------------+---------------------------------+
| Response statusCode | Response Description |
+========================+=================================+
| 204 | Successful PUT or DELETE |
+------------------------+---------------------------------+
| 400 | Failure - Malformed request |
+------------------------+---------------------------------+
| 401 | Failure - Request was missing |
| | authorization header, or |
| | credentials were not accepted |
+------------------------+---------------------------------+
| 403 | Failure - User could not be |
| | authenticated, or was not |
| | authorized to make the request |
+------------------------+---------------------------------+
| 404 | Failure - Path in the request |
| | URL did not point to a valid |
| | feed publishing URL |
+------------------------+---------------------------------+
| 500 | Failure - DR experienced an |
| | internal problem |
+------------------------+---------------------------------+
| 503 | Failure - DR is not currently |
| | available |
+------------------------+---------------------------------+
Sample Request
==============
curl -v -X PUT --user {user}:{password} -H "Content-Type: application/octet-stream" --data-binary @/opt/app/datartr/sampleFile.txt --post301 --location-trusted -k https://{host}:{port}/publish/{feedId}/sampleFile.txt
Feed logging
------------
**Description**: View logging information for specified feeds, which can be narrowed down with further parameters
Request URL
===========
http[s]://{host}:{port}/feedlog/{feedId}?{queryParameter}
* {feedId} is the id of the feed you wish to get logs from
* {queryParameter} a parameter passed through to narrow the returned logs. multiple parameters can be passed
Request parameters
==================
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| Name | Description | Param Type | Data Type | MaxLen | Required | Format | Valid/Example Values |
+========================+=================================+==================+============+==============+=============+=====================+======================================+
| feedId | Id of the feed you want | Path | String | | N | | 1 |
| | logs from | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| type | Select records of the | Path | String | | N | | * pub: Publish attempt |
| | specified type | | | | | | * del: Delivery attempt |
| | | | | | | | * exp: Delivery expiry |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| publishId | Select records with specified | Path | String | | N | | |
| | publish id, carried in the | | | | | | |
| | X-ATT-DR-PUBLISH-ID header from | | | | | | |
| | original publish request | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| start | Select records created at or | Path | String | | N | | A date-time expressed in the format |
| | after specified date | | | | | | specified by RFC 3339 |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| end | Select records created at or | Path | String | | N | | A date-time expressed in the format |
| | before specified date | | | | | | specified by RFC 3339 |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| statusCode | Select records with the | Path | String | | N | | An HTTP Integer status code or one |
| | specified statusCode field | | | | | | of the following special values: |
| | | | | | | | |
| | | | | | | | * Success: Any code between 200-299 |
| | | | | | | | * Redirect: Any code between 300-399 |
| | | | | | | | * Failure: Any code > 399 |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| expiryReason | Select records with the | Path | String | | N | | |
| | specified expiry reason | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
Response Parameters
===================
+------------------------+-------------------------------------------+
| Name | Description |
+========================+===========================================+
| type | Record type: |
| | |
| | * pub: publication attempt |
| | * del: delivery attempt |
| | * exp: delivery expiry |
+------------------------+-------------------------------------------+
| date | The UTC date and time at which the record |
| | was generated, with millisecond resolution|
| | in the format specified by RFC 3339 |
+------------------------+-------------------------------------------+
| publishId | The unique identifier assigned by the DR |
| | at the time of the initial publication |
| | request (carried in the X-ATT-DRPUBLISH-ID|
| | header in the response to the original |
| | publish request) |
+------------------------+-------------------------------------------+
| requestURI | The Request-URI associated with the |
| | request |
+------------------------+-------------------------------------------+
| method | The HTTP method (PUT or DELETE) for the |
| | request |
+------------------------+-------------------------------------------+
| contentType | The media type of the payload of the |
| | request |
+------------------------+-------------------------------------------+
| contentLength | The size (in bytes) of the payload of |
| | the request |
+------------------------+-------------------------------------------+
| sourceIp | The IP address from which the request |
| | originated |
+------------------------+-------------------------------------------+
| endpointId | The identity used to submit a publish |
| | request to the DR |
+------------------------+-------------------------------------------+
| deliveryId | The identity used to submit a delivery |
| | request to a subscriber endpoint |
+------------------------+-------------------------------------------+
| statusCode | The HTTP status code in the response to |
| | the request. A value of -1 indicates that |
| | the DR was not able to obtain an HTTP |
| | status code |
+------------------------+-------------------------------------------+
| expiryReason | The reason that delivery attempts were |
| | discontinued: |
| | |
| | * notRetryable: The last delivery attempt |
| | encountered an error condition for which|
| | the DR does not make retries. |
| | * retriesExhausted: The DR reached its |
| | limit for making further retry attempts |
+------------------------+-------------------------------------------+
| attempts | Total number of attempts made before |
| | delivery attempts were discontinued |
+------------------------+-------------------------------------------+
Response/Error Codes
====================
+------------------------+-------------------------------------------+
| Response statusCode | Response Description |
+========================+===========================================+
| 200 | Successful query |
+------------------------+-------------------------------------------+
| 400 | Bad request - The request is defective in |
| | some way. Possible causes: |
| | |
| | * Unrecognized parameter name in query |
| | string |
| | * Invalid parameter value in query string |
+------------------------+-------------------------------------------+
| 404 | Not Found - The request was not directed |
| | to a feed log URL or subscription log URL |
| | known to the system |
+------------------------+-------------------------------------------+
| 405 | Method not allowed - The HTTP method in |
| | the request was something other than GET |
+------------------------+-------------------------------------------+
| 406 | Not Acceptable - The request has an Accept|
| | header indicating that the requester will |
| | not accept a response with |
| | application/vnd.att-dr.log-list content. |
+------------------------+-------------------------------------------+
| 500 | Internal Server Error - The DR API server |
| | encountered an internal error and could |
| | not complete the request |
+------------------------+-------------------------------------------+
| 503 | Service Unavailable - The DR API service |
| | is currently unavailable |
+------------------------+-------------------------------------------+
Sample Request
==============
curl -v -k https://{host}:{port}/feedlog/{feedId}?statusCode=204
Subscriber logging
------------------
**Description**: View logging information for specified subscriptions, which can be narrowed down with further parameters
Request URL
===========
http[s]://{host}:{port}/sublog/{subId}?{queryParameter}
* {subId} is the id of the feed you wish to get logs from
* {queryParameter} a parameter passed through to narrow the returned logs. multiple parameters can be passed
Request parameters
==================
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| Name | Description | Param Type | Data Type | MaxLen | Required | Format | Valid/Example Values |
+========================+=================================+==================+============+==============+=============+=====================+======================================+
| subId | Id of the feed you want | Path | String | | N | | 1 |
| | logs from | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| type | Select records of the | Path | String | | N | | * pub: Publish attempt |
| | specified type | | | | | | * del: Delivery attempt |
| | | | | | | | * exp: Delivery expiry |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| publishId | Select records with specified | Path | String | | N | | |
| | publish id, carried in the | | | | | | |
| | X-ATT-DR-PUBLISH-ID header from | | | | | | |
| | original publish request | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| start | Select records created at or | Path | String | | N | | A date-time expressed in the format |
| | after specified date | | | | | | specified by RFC 3339 |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| end | Select records created at or | Path | String | | N | | A date-time expressed in the format |
| | before specified date | | | | | | specified by RFC 3339 |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| statusCode | Select records with the | Path | String | | N | | An Http Integer status code or one |
| | specified statusCode field | | | | | | of the following special values: |
| | | | | | | | |
| | | | | | | | * Success: Any code between 200-299 |
| | | | | | | | * Sedirect: Any code between 300-399 |
| | | | | | | | * Sailure: Any code > 399 |
| | | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
| expiryReason | Select records with the | Path | String | | N | | |
| | specified expiry reason | | | | | | |
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+
Response Parameters
===================
+------------------------+-------------------------------------------+
| Name | Description |
+========================+===========================================+
| type | Record type: |
| | |
| | * pub: publication attempt |
| | * del: delivery attempt |
| | * exp: delivery expiry |
+------------------------+-------------------------------------------+
| date | The UTC date and time at which the record |
| | was generated, with millisecond resolution|
| | in the format specified by RFC 3339 |
+------------------------+-------------------------------------------+
| publishId | The unique identifier assigned by the DR |
| | at the time of the initial publication |
| | request (carried in the X-ATT-DRPUBLISH-ID|
| | header in the response to the original |
| | publish request) to a feed log URL or |
| | subscription log URL known to the system |
+------------------------+-------------------------------------------+
| requestURI | The Request-URI associated with the |
| | request |
+------------------------+-------------------------------------------+
| method | The HTTP method (PUT or DELETE) for the |
| | request |
+------------------------+-------------------------------------------+
| contentType | The media type of the payload of the |
| | request |
+------------------------+-------------------------------------------+
| contentLength | The size (in bytes) of the payload of |
| | the request |
+------------------------+-------------------------------------------+
| sourceIp | The IP address from which the request |
| | originated |
+------------------------+-------------------------------------------+
| endpointId | The identity used to submit a publish |
| | request to the DR |
+------------------------+-------------------------------------------+
| deliveryId | The identity used to submit a delivery |
| | request to a subscriber endpoint |
+------------------------+-------------------------------------------+
| statusCode | The HTTP status code in the response to |
| | the request. A value of -1 indicates that |
| | the DR was not able to obtain an HTTP |
| | status code |
+------------------------+-------------------------------------------+
| expiryReason | The reason that delivery attempts were |
| | discontinued: |
| | |
| | * notRetryable: The last delivery attempt |
| | encountered an error condition for which|
| | the DR does not make retries. |
| | * retriesExhausted: The DR reached its |
| | limit for making further retry attempts |
+------------------------+-------------------------------------------+
| attempts | Total number of attempts made before |
| | delivery attempts were discontinued |
+------------------------+-------------------------------------------+
Response/Error Codes
====================
+------------------------+-------------------------------------------+
| Response statusCode | Response Description |
+========================+===========================================+
| 200 | Successful query |
+------------------------+-------------------------------------------+
| 400 | Bad request - The request is defective in |
| | some way. Possible causes: |
| | |
| | * Unrecognized parameter name in query |
| | string |
| | * Invalid parameter value in query string |
+------------------------+-------------------------------------------+
| 404 | Not Found - The request was not directed |
| | to a feed log URL or subscription log URL |
| | known to the system |
+------------------------+-------------------------------------------+
| 405 | Method not allowed - The HTTP method in |
| | the request was something other than GET |
+------------------------+-------------------------------------------+
| 406 | Not Acceptable - The request has an Accept|
| | header indicating that the requester will |
| | not accept a response with |
| | application/vnd.att-dr.log-list content. |
+------------------------+-------------------------------------------+
| 500 | Internal Server Error - The DR API server |
| | encountered an internal error and could |
| | could not complete the request |
+------------------------+-------------------------------------------+
| 503 | Service Unavailable - The DR API service |
| | is currently unavailable |
+------------------------+-------------------------------------------+
Sample Request
==============
curl -v -k https://{host}:{port}/sublog/{subscriberId}?statusCode=204
|