Adding docs for CADI
[dmaap/datarouter.git] / docs / offered-apis.rst
diff --git a/docs/offered-apis.rst b/docs/offered-apis.rst
new file mode 100755 (executable)
index 0000000..a3a1213
--- /dev/null
@@ -0,0 +1,1350 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+\r
+.. _data_router_api_guide:\r
+\r
+.. toctree::\r
+   :maxdepth: 2\r
+\r
+Offered APIs\r
+============\r
+\r
+**The API Provisioning Model**\r
+\r
+The DMaaP Data Router (DR) provisioning API defines two resource types - the feed and the subscription, each with JSON\r
+representations. The API models the provisioning data as a collection of feeds that are known to the DR\r
+(the feeds collection), with each feed containing a collection of the subscriptions to the feed.\r
+The standard HTTP operations (POST, GET, PUT, and DELETE), used in conjunction with these resource\r
+representations, allow an API user to create, get information about, modify, and delete feeds and\r
+subscriptions.\r
+\r
+**HTTP Service APIs**\r
+\r
+DMaaP Data Router utilizes an HTTPS REST API to service all transactions. HTTPS and REST standards are followed so\r
+clients as varied as CURL, Java applications and even Web Browsers will work to interact with the Data Router.\r
+\r
+**General HTTP Requirements**\r
+\r
+A DMaaP Data Router transactions consists of 4 distinct segments, HTTP URL, HTTP Header, HTTP Body (POST/PUT)\r
+and HTTP Response. The general considerations for each segment are as follows and are required for each\r
+of the specific transactions described in this section.\r
+\r
+**HTTP URL**\r
+\r
+http[s]://{serverBaseURL}/{resourcePath}\r
+\r
+* The serverBaseURL points to DMaaP Data Router host:port that will service the request.\r
+* The resourcePath specifies the service that the client is attempting to reach.\r
+\r
+\r
+**HTTP Header**\r
+\r
+Specifies HTTP Headers, such as Content-Type, that define the parameters of the HTTP Transaction\r
+\r
+**HTTP Body**\r
+\r
+The HTTP Body contains the feed content when creating a feed.\r
+\r
+**HTTP Authorization**\r
+\r
+The user-id:password pair:\r
+\r
+* If AAF enabled:  A valid AAF AppId to be authenticated and authorized by the AAF CADI framework.\r
+* If Non AAF    :  When publishing or retracting a file, a valid `EID Object`_ with publish permissions.\r
+\r
+Create a Feed\r
+-------------\r
+\r
+**Description**: Creates a unique feed URL to service the publisher/subscriber model.\r
+\r
+.. code-block:: bash\r
+\r
+    POST /\r
+\r
+**Request Parameters:**\r
+\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| Field                | Description                    | Param Type | Data Type        | MaxLen | Set By | Updatable? | Required |  Valid/Example Values         |\r
++======================+================================+============+==================+========+========+============+==========+===============================+\r
+| name                 | Feed name                      | Body       | String           | <=20   | Client | N          | Y        |                               |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| version              | Feed version                   | Body       | String           | <=20   | Client | N          | Y        | v1.0.0                        |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| description          | Feed description               | Body       | String           | <=256  | Client | Y          | N        |                               |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| business description | Business description           | Body       | String           | <=256  | Client | Y          | N        |                               |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| authorization        | Information for authorizing    | Body       |`Auth Object`_    |        | Client | Y          | Y        |                               |\r
+|                      | publishing requests            |            |                  |        |        |            |          |                               |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| suspend              | Set to true if the feed is in  | Body       | Boolean          |        | Client | Y          | N        | * true                        |\r
+|                      | the suspended state            |            |                  |        |        |            |          | * false (default)             |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| group-id             | Auth group for feed management | Body       | Integer          |        | Client | Y          | N        | 0 (default)                   |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| aaf_instance         | The instance passed to aaf     | Body       | String           | <=256  | Client | N          | N        | legacy (default)              |\r
+|                      | during permission checks       |            |                  |        |        |            |          |                               |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| Content-Type         | To specify type of message     | Header     | String           |        | Client | N          | Y        | application/vnd.dmaap-dr.feed |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| publisher            | Publisher identity as passed   | Header     | String           | <=8    | DR     | N          | Y        | username                      |\r
+|                      | in X-DMAAP-DR-ON-BEHALF-OF at  |            |                  |        |        |            |          |                               |\r
+|                      | creation time                  |            |                  |        |        |            |          |                               |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| Authorization        | The user / AppId to be         | Header     | String           |        | Client | N          | Y if AAF | dcae@dcae.onap.org:{password} |\r
+|                      | authorized by the AAF CADI     |            |                  |        |        |            | enabled  |                               |\r
+|                      | framework                      |            |                  |        |        |            |          |                               |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| X-EXCLUDE-AAF        | To determine if the feed to    | Header     | Boolean          |        | Client | N          | Y if AAF | * true (for legacy feed)      |\r
+|                      | create is legacy or AAF        |            |                  |        |        |            | enabled  | * false (for AAF feed)        |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+| Links                | URLs related to this feed      | Body       |`Feed Links Obj`_ |        | DR     | N          | N        |                               |\r
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    200\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Consumes**\r
+    application/json\r
+\r
+**Produces**\r
+    application/json\r
+\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" --data-ascii @createFeed.json https://{host}:{port}\r
+\r
+**Sample Body**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "name": "ONAP Data Feed",\r
+      "version": "v1.0",\r
+      "authorization": {\r
+        "classification": "unclassified",\r
+        "endpoint_addrs": [\r
+        ],\r
+        "endpoint_ids": [\r
+          {\r
+            "id": "dradmin",\r
+            "password": "dradmin"\r
+          }\r
+        ]\r
+      }\r
+    }\r
+\r
+**Sample Response**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "suspend": false,\r
+      "groupid": 0,\r
+      "description": "",\r
+      "version": "v1.0",\r
+      "authorization": {\r
+        "endpoint_addrs": [\r
+        ],\r
+        "classification": "unclassified",\r
+        "endpoint_ids": [\r
+          {\r
+            "password": "dradmin",\r
+            "id": "dradmin"\r
+          },\r
+          {\r
+            "password": "demo123456!",\r
+            "id": "onap"\r
+          }\r
+        ]\r
+      },\r
+      "name": "ONAP Data Feed",\r
+      "business_description": "",\r
+      "aaf_instance": "legacy",\r
+      "publisher": "dradmin",\r
+      "links": {\r
+        "subscribe": "https://dmaap-dr-prov/subscribe/1",\r
+        "log": "https://dmaap-dr-prov/feedlog/1",\r
+        "publish": "https://dmaap-dr-prov/publish/1",\r
+        "self": "https://dmaap-dr-prov/feed/1"\r
+      }\r
+    }\r
+\r
+\r
+\r
+Update a Feed\r
+-------------\r
+\r
+**Description**: Update a feed with new parameters.\r
+\r
+.. code-block:: bash\r
+\r
+    PUT /feed/{feedId}\r
+\r
+\r
+**Request Parameters:**\r
+\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| Field                  | Description                     |  Param Type |  Data Type    |  MaxLen    |  Required   |\r
++========================+=================================+=============+===============+============+=============+\r
+| name                   | Feed name                       |     Body    |   String      |   <=20     |     Y       |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| description            | Feed description                |     Body    |   String      |   <=256    |     N       |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| business description   | Business description            |     Body    |   String      |   <=256    |     N       |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| authorization          | Information for authorizing     |     Body    |`Auth Object`_ |            |     Y       |\r
+|                        | publishing requests             |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| suspend                | Set to true if the feed is in   |     Body    |   Boolean     |            |     N       |\r
+|                        | the suspended state             |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| group-id               | Auth group for feed management  |     Body    |   Integer     |            |     N       |\r
+|                        |                                 |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| Content-type           | To specify type of message      |    Header   |   String      |            |     Y       |\r
+|                        | (feed,subscriber,publisher)     |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| publisher              | Publisher identity as passed    |    Header   |   String      |   <=8      |     Y       |\r
+|                        | in X-DMAAP-DR-ON-BEHALF-OF at   |             |               |            |             |\r
+|                        | creation time                   |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| Authorization          | The user / AppId to be          |    Header   |   String      |            | Y if AAF    |\r
+|                        | authorized by the AAF CADI      |             |               |            | enabled     |\r
+|                        | framework                       |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    200\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Consumes**\r
+    application/json\r
+\r
+**Produces**\r
+    application/json\r
+\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -X PUT -H "Content-Type: application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" --data-ascii @updateFeed.json --location-trusted https://{host}:{port}/feed/{feedId}\r
+\r
+**Sample Body**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "name": "ONAP Data Feed",\r
+      "business_description": "Updated ONAP Feed",\r
+      "groupid": 33,\r
+      "description": "Updated ONAP Feed",\r
+      "authorization": {\r
+        "endpoint_addrs": [\r
+          "10.1.2.3"\r
+        ],\r
+        "classification": "unclassified",\r
+        "endpoint_ids": [\r
+          {\r
+            "password": "dradmin",\r
+            "id": "dradmin"\r
+          },\r
+          {\r
+            "password": "demo123456!",\r
+            "id": "onap"\r
+          }\r
+        ]\r
+      }\r
+    }\r
+\r
+**Sample Response**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "suspend": false,\r
+      "groupid": 33,\r
+      "description": "Updated ONAP Feed",\r
+      "authorization": {\r
+        "endpoint_addrs": [\r
+          "10.1.2.3"\r
+        ],\r
+        "classification": "unclassified",\r
+        "endpoint_ids": [\r
+          {\r
+            "password": "dradmin",\r
+            "id": "dradmin"\r
+          },\r
+          {\r
+            "password": "demo123456!",\r
+            "id": "onap"\r
+          }\r
+        ]\r
+      },\r
+      "name": "ONAP Data Feed1",\r
+      "business_description": "Updated ONAP Feed",\r
+      "aaf_instance": "legacy",\r
+      "publisher": "dradmin",\r
+      "links": {\r
+        "subscribe": "https://dmaap-dr-prov/subscribe/1",\r
+        "log": "https://dmaap-dr-prov/feedlog/1",\r
+        "publish": "https://dmaap-dr-prov/publish/1",\r
+        "self": "https://dmaap-dr-prov/feed/1"\r
+      }\r
+    }\r
+\r
+\r
+\r
+Get a Feed\r
+----------\r
+\r
+**Description**: Retrieves a representation of the specified feed.\r
+\r
+.. code-block:: bash\r
+\r
+    GET /feed/{feedId}\r
+\r
+\r
+**Request Parameters:**\r
+\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| Field                  | Description                     |  Param Type |  Data Type    |  MaxLen    |  Required   |\r
++========================+=================================+=============+===============+============+=============+\r
+| publisher              | Publisher identity as passed    |    Header   |   String      |   <=8      |     Y       |\r
+|                        | in X-DMAAP-DR-ON-BEHALF-OF at   |             |               |            |             |\r
+|                        | creation time                   |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| Authorization          | The user / AppId to be          |    Header   |   String      |            | Y if AAF    |\r
+|                        | authorized by the AAF CADI      |             |               |            | enabled     |\r
+|                        | framework                       |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    200\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Produces**\r
+    application/json\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}\r
+\r
+**Sample Response**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "suspend": false,\r
+      "groupid": 33,\r
+      "description": "Updated ONAP Feed",\r
+      "version": "v1.0",\r
+      "authorization": {\r
+        "endpoint_addrs": [\r
+          "10.1.2.3",\r
+          "173.2.33.4"\r
+        ],\r
+        "classification": "unclassified",\r
+        "endpoint_ids": [\r
+          {\r
+            "password": "dradmin",\r
+            "id": "dradmin"\r
+          },\r
+          {\r
+            "password": "demo123456!",\r
+            "id": "onap"\r
+          }\r
+        ]\r
+      },\r
+      "name": "ONAP Data Feed",\r
+      "business_description": "Updated ONAP Feed",\r
+      "aaf_instance": "legacy",\r
+      "publisher": "dradmin",\r
+      "links": {\r
+        "subscribe": "https://dmaap-dr-prov/subscribe/1",\r
+        "log": "https://dmaap-dr-prov/feedlog/1",\r
+        "publish": "https://dmaap-dr-prov/publish/1",\r
+        "self": "https://dmaap-dr-prov/feed/1"\r
+      }\r
+    }\r
+\r
+\r
+Delete a Feed\r
+-------------\r
+\r
+**Description**: Deletes a specified feed\r
+\r
+.. code-block:: bash\r
+\r
+    DELETE /feed/{feedId}\r
+\r
+\r
+**Request Parameters:**\r
+\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| Field                  | Description                     |  Param Type |  Data Type    |  MaxLen    |  Required   |\r
++========================+=================================+=============+===============+============+=============+\r
+| publisher              | Publisher identity as passed    |    Header   |   String      |   <=8      |     Y       |\r
+|                        | in X-DMAAP-DR-ON-BEHALF-OF at   |             |               |            |             |\r
+|                        | creation time                   |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+| Authorization          | The user / AppId to be          |    Header   |   String      |            | Y if AAF    |\r
+|                        | authorized by the AAF CADI      |             |               |            | enabled     |\r
+|                        | framework                       |             |               |            |             |\r
++------------------------+---------------------------------+-------------+---------------+------------+-------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    204\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -X DELETE -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}\r
+\r
+\r
+Subscribe to Feed\r
+-----------------\r
+\r
+**Description**: Subscribes to a created feed to receive files published to that feed.\r
+\r
+.. code-block:: bash\r
+\r
+    POST /subscribe/{feedId}\r
+\r
+\r
+**Request Parameters:**\r
+\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| Field           | Description                     |  Param Type   |  Data Type      | MaxLen | Set By | Updatable? | Required |  Valid/Example Values                |\r
++=================+=================================+===============+=================+========+========+============+==========+======================================+\r
+| feedId          | ID for the feed you are         |     Path      |   String        |        | Client |     N      |     Y    | 1                                    |\r
+|                 | subscribing to                  |               |                 |        |        |            |          |                                      |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| delivery        | Address and credentials for     |     Body      | `Del Object`_   |        | Client |     Y      |     Y    |                                      |\r
+|                 | delivery                        |               |                 |        |        |            |          |                                      |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| follow_redirect | Set to true if feed redirection |     Body      |   Boolean       |        | Client |     Y      |     N    | * true                               |\r
+|                 | is expected                     |               |                 |        |        |            |          | * false (default)                    |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| metadata_only   | Set to true if subscription is  |     Body      |   Boolean       |        | Client |     Y      |     Y    | * true                               |\r
+|                 | to receive per-file metadata    |               |                 |        |        |            |          | * false                              |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| suspend         | Set to true if the subscription |     Body      |   Boolean       |        | Client |     Y      |     N    | * true                               |\r
+|                 | is in the suspended state       |               |                 |        |        |            |          | * false (default)                    |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| decompress      | Set to true if the data is to   |     Body      |   Boolean       |        | Client |     Y      |     N    | * true                               |\r
+|                 | be decompressed for subscriber  |               |                 |        |        |            |          | * false (default)                    |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| group-id        | Auth group for sub management   |     Body      |   Integer       |        | Client |     Y      |     Y    | 22                                   |\r
+|                 |                                 |               |                 |        |        |            |          |                                      |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| aaf_instance    | The instance passed to aaf      |     Body      |   String        | <=256  | Client |     N      |     N    | * legacy (default)                   |\r
+|                 | during permission checks        |               |                 |        |        |            |          |                                      |\r
+|                 |                                 |               |                 |        |        |            |          |                                      |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| Content-type    | To specify type of message      |     Header    |   String        |        | Client |     N      |     Y    | application/vnd.dmaap-dr.subscription|\r
+|                 | (feed,subscriber,publisher)     |               |                 |        |        |            |          |                                      |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| subscriber      | Subscriber identity as passed   |     Header    |   String        |   <=8  |  DR    |     N      |     Y    | username                             |\r
+|                 | in X-DMAAP-DR-ON-BEHALF-OF at   |               |                 |        |        |            |          |                                      |\r
+|                 | creation time                   |               |                 |        |        |            |          |                                      |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| Authorization   | The user / AppId to be          |    Header     |   String        |        | Client |     N      | Y if AAF | dcae@dcae.onap.org:{password}        |\r
+|                 | authorized by the AAF CADI      |               |                 |        |        |            | enabled  |                                      |\r
+|                 | framework                       |               |                 |        |        |            |          |                                      |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| X-EXCLUDE-AAF   | To determine if the feed to     |    Header     |   Boolean       |        | Client |     N      | Y if AAF | * true (for legacy feed)             |\r
+|                 | create is legacy or AAF         |               |                 |        |        |            | enabled  | * false (for AAF feed)               |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+| Links           | URLs related to this            |     Body      |`Sub Links Obj`_ |        |  DR    |     N      |     N    |                                      |\r
+|                 | subscription                    |               |                 |        |        |            |          |                                      |\r
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    201\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Consumes**\r
+    application/json\r
+\r
+**Produces**\r
+    application/json\r
+\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" --data-ascii @addSubscriber.json https://{host}:{port}/subscribe/{feedId}\r
+\r
+**Sample Body**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "delivery": {\r
+        "url": "http://dmaap-dr-subscriber:7070/",\r
+        "user": "LOGIN",\r
+        "password": "PASSWORD",\r
+        "use100": true\r
+      },\r
+      "metadataOnly": false,\r
+      "groupid": 22,\r
+      "follow_redirect": true,\r
+      "suspend": false,\r
+      "decompress": true\r
+    }\r
+\r
+**Sample Response**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "suspend": false,\r
+      "delivery": {\r
+        "use100": true,\r
+        "password": "PASSWORD",\r
+        "user": "LOGIN",\r
+        "url": "http://dmaap-dr-subscriber:7070/"\r
+      },\r
+      "subscriber": "onap",\r
+      "groupid": 1,\r
+      "metadataOnly": false,\r
+      "follow_redirect": true,\r
+      "decompress": true,\r
+      "aaf_instance": "legacy",\r
+      "links": {\r
+        "feed": "https://dmaap-dr-prov/feed/1",\r
+        "log": "https://dmaap-dr-prov/sublog/1",\r
+        "self": "https://dmaap-dr-prov/subs/1"\r
+      },\r
+      "created_date": 1553707279509\r
+    }\r
+\r
+\r
+\r
+Update subscription\r
+-------------------\r
+\r
+**Description**: Update a subscription to a feed.\r
+\r
+.. code-block:: bash\r
+\r
+    PUT /subs/{subId}\r
+\r
+\r
+**Request Parameters:**\r
+\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| Field           | Description                     |  Param Type  |  Data Type    | MaxLen |  Required   |\r
++=================+=================================+==============+===============+========+=============+\r
+| subId           | ID for the subscription you are |     Path     |   String      |        |     Y       |\r
+|                 | updating                        |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| delivery        | Address and credentials for     |     Body     | `Del Object`_ |        |     Y       |\r
+|                 | delivery                        |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| follow_redirect | Set to true if feed redirection |     Body     |   Boolean     |        |     N       |\r
+|                 | is expected                     |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| metadata_only   | Set to true if subscription is  |     Body     |   Boolean     |        |     Y       |\r
+|                 | to receive per-file metadata    |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| suspend         | Set to true if the subscription |     Body     |   Boolean     |        |     N       |\r
+|                 | is in the suspended state       |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| decompress      | Set to true if the data is to   |     Body     |   Boolean     |        |     N       |\r
+|                 | be decompressed for subscriber  |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| group-id        | Auth group for sub management   |     Body     |   Integer     |        |     Y       |\r
+|                 |                                 |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| Content-type    | To specify type of message      |     Header   |   String      |        |     Y       |\r
+|                 | (feed,subscriber,publisher)     |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| subscriber      | Subscriber identity as passed   |     Header   |   String      |  <=8   |     Y       |\r
+|                 | in X-DMAAP-DR-ON-BEHALF-OF at   |              |               |        |             |\r
+|                 | creation time                   |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| Authorization   | The user / AppId to be          |    Header    |   String      |        |  Y if AAF   |\r
+|                 | authorized by the AAF CADI      |              |               |        |  enabled    |\r
+|                 | framework                       |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| X-EXCLUDE-AAF   | To determine if the feed to     |    Header    |   Boolean     |        |  Y if AAF   |\r
+|                 | create is legacy or AAF         |              |               |        |  enabled    |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    200\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Consumes**\r
+    application/json\r
+\r
+**Produces**\r
+    application/json\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -X PUT -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" --data-ascii @updateSubscriber.json https://{host}:{port}/subs/{subId}\r
+\r
+**Sample Body**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "delivery": {\r
+        "url": "http://dmaap-dr-subscriber:7070/",\r
+        "user": "NEW_LOGIN",\r
+        "password": "NEW_PASSWORD",\r
+        "use100": false\r
+      },\r
+      "metadataOnly": true,\r
+      "groupid": 67,\r
+      "follow_redirect": false,\r
+      "decompress": false\r
+    }\r
+\r
+\r
+**Sample Response**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "suspend": false,\r
+      "delivery": {\r
+        "use100": false,\r
+        "password": "NEW_PASSWORD",\r
+        "user": "NEW_LOGIN",\r
+        "url": "http://dmaap-dr-subscriber:7070/"\r
+      },\r
+      "subscriber": "onap",\r
+      "groupid": 67,\r
+      "metadataOnly": true,\r
+      "follow_redirect": false,\r
+      "decompress": false,\r
+      "aaf_instance": "legacy",\r
+      "links": {\r
+        "feed": "https://dmaap-dr-prov/feed/1",\r
+        "log": "https://dmaap-dr-prov/sublog/1",\r
+        "self": "https://dmaap-dr-prov/subs/1"\r
+      },\r
+      "created_date": 1553714446614\r
+    }\r
+\r
+\r
+\r
+Get a Subscription\r
+------------------\r
+\r
+**Description**: Retrieves a representation of the specified subscription.\r
+\r
+.. code-block:: bash\r
+\r
+    GET /subs/{subId}\r
+\r
+\r
+**Request Parameters:**\r
+\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| Field           | Description                     |  Param Type  |  Data Type    | MaxLen |  Required   |\r
++=================+=================================+==============+===============+========+=============+\r
+| subscriber      | Subscriber identity as passed   |    Header    |   String      |  <=8   |     Y       |\r
+|                 | in X-DMAAP-DR-ON-BEHALF-OF at   |              |               |        |             |\r
+|                 | creation time                   |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| Authorization   | The user / AppId to be          |    Header    |   String      |        |  Y if AAF   |\r
+|                 | authorized by the AAF CADI      |              |               |        |  enabled    |\r
+|                 | framework                       |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    200\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Produces**\r
+    application/json\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}\r
+\r
+**Sample Response**\r
+\r
+.. code-block:: json\r
+\r
+    {\r
+      "suspend": false,\r
+      "delivery": {\r
+        "use100": false,\r
+        "password": "NEW_PASSWORD",\r
+        "user": "NEW_LOGIN",\r
+        "url": "http://dmaap-dr-subscriber:7070/"\r
+      },\r
+      "subscriber": "onap",\r
+      "groupid": 67,\r
+      "metadataOnly": true,\r
+      "privilegedSubscriber": false,\r
+      "follow_redirect": false,\r
+      "decompress": false,\r
+      "aaf_instance": "legacy",\r
+      "links": {\r
+        "feed": "https://dmaap-dr-prov/feed/2",\r
+        "log": "https://dmaap-dr-prov/sublog/6",\r
+        "self": "https://dmaap-dr-prov/subs/6"\r
+      }\r
+    }\r
+\r
+\r
+\r
+Delete a subscription\r
+---------------------\r
+\r
+**Description**: Deletes a specified subscription\r
+\r
+.. code-block:: bash\r
+\r
+    DELETE /subs/{subId}\r
+\r
+\r
+**Request Parameters:**\r
+\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| Field           | Description                     |  Param Type  |  Data Type    | MaxLen |  Required   |\r
++=================+=================================+==============+===============+========+=============+\r
+| subscriber      | Subscriber identity as passed   |     Header   |   String      |  <=8   |     Y       |\r
+|                 | in X-DMAAP-DR-ON-BEHALF-OF at   |              |               |        |             |\r
+|                 | creation time                   |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+| Authorization   | The user / AppId to be          |    Header    |   String      |        |  Y if AAF   |\r
+|                 | authorized by the AAF CADI      |              |               |        |  enabled    |\r
+|                 | framework                       |              |               |        |             |\r
++-----------------+---------------------------------+--------------+---------------+--------+-------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    204\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -X DELETE -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}\r
+\r
+\r
+Publish to Feed\r
+---------------\r
+\r
+**Description**: Publish data to a given feed\r
+\r
+.. code-block:: bash\r
+\r
+    PUT /publish/{feedId}/{fileId}\r
+\r
+\r
+**Request parameters**\r
+\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+\r
+| Name                   | Description                     |  Param Type      |  Data Type |   MaxLen     |  Required   |  Valid/Example Values                     |\r
++========================+=================================+==================+============+==============+=============+===========================================+\r
+| feedId                 | ID of the feed you are          |     Path         |   String   |              |     Y       |                                           |\r
+|                        | publishing to                   |                  |            |              |             |                                           |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+\r
+| fileId                 | Name of the file when it is     |     Path         |   String   |              |     Y       |                                           |\r
+|                        | published to subscribers        |                  |            |              |             |                                           |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+\r
+| Content-type           | To specify type of message      |     Header       |   String   |              |     Y       | application/octet-stream                  |\r
+|                        | format                          |                  |            |              |             |                                           |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+\r
+| X-DMAAP-DR-META        | Metadata for the file. Accepts  |     Header       |   String   |   <=4096     |     N       | '{“compressionType”: ”gzip”,              |\r
+|                        | only non nested json objects    |                  |            |              |             |   ”id”: 1234,                             |\r
+|                        | of the following type:          |                  |            |              |             |   “transferred”: true,                    |\r
+|                        |                                 |                  |            |              |             |   “size”: null }’                         |\r
+|                        | * Numbers                       |                  |            |              |             |                                           |\r
+|                        | * Strings                       |                  |            |              |             |                                           |\r
+|                        | * Lowercase boolean             |                  |            |              |             |                                           |\r
+|                        | * null                          |                  |            |              |             |                                           |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+\r
+| Authorization          | An `EID Object`_ with publish   |     Header       |  String    |              |     Y       | * (legacy Feed) dradmin:dradmin           |\r
+|                        | permissions.                    |                  |            |              |             | * (AAF Feed) dcae@dcae.onap.org:{password}|\r
+|                        | If AAF CADI is enabled, use a   |                  |            |              |             |                                           |\r
+|                        | valid AAF user/AppId instead.   |                  |            |              |             |                                           |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    204\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -X PUT --user {user}:{password} -H "Content-Type:application/octet-stream"  -H "X-DMAAP-DR-META:{\"filetype\":\"txt\"}" --data-binary @sampleFile.txt --post301 --location-trusted https://{host}:{port}/publish/{feedId}/{fileId}\r
+\r
+\r
+\r
+Delete/Retract a Published file\r
+-------------------------------\r
+\r
+**Description**: Deletes/retracts a specified published file\r
+\r
+.. code-block:: bash\r
+\r
+    DELETE /publish/{feedId}/{fileId}\r
+\r
+\r
+**Request Parameters:**\r
+\r
++-----------------+---------------------------------+--------------+---------------+------------+-------------------------------------------+\r
+| Field           | Description                     |  Param Type  |  Data Type    | Required   |  Valid/Example Values                     |\r
++=================+=================================+==============+===============+============+===========================================+\r
+| Authorization   | An `EID Object`_ with publish   |   Header     |    String     |    Y       | * (legacy Feed) dradmin:dradmin           |\r
+|                 | permissions.                    |              |               |            | * (AAF Feed) dcae@dcae.onap.org:{password}|\r
+|                 | If AAF CADI is enabled, use a   |              |               |            |                                           |\r
+|                 | valid AAF user/AppId instead.   |              |               |            |                                           |\r
++-----------------+---------------------------------+--------------+---------------+------------+-------------------------------------------+\r
+| feedId          | ID of the feed that was         |     Path     |    String     |    Y       |                                           |\r
+|                 | publishing to                   |              |               |            |                                           |\r
++-----------------+---------------------------------+--------------+---------------+------------+-------------------------------------------+\r
+| fileId          | Name of the file when it was    |     Path     |    String     |    Y       |                                           |\r
+|                 | published to subscribers        |              |               |            |                                           |\r
++-----------------+---------------------------------+--------------+---------------+------------+-------------------------------------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    204\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k -X DELETE --user {user}:{password} --location-trusted https://{host}:{port}/publish/{feedId}/{fileId}\r
+\r
+\r
+\r
+Feed logging\r
+------------\r
+\r
+**Description**: View logging information for specified feeds, which can be narrowed down with further parameters\r
+\r
+.. code-block:: bash\r
+\r
+    GET /feedlog/{feedId}?{queryParam}\r
+\r
+\r
+**Request parameters**\r
+\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| Name                   | Description                     |  Param Type      |  Data Type |  Required   |  Valid/Example Values                |\r
++========================+=================================+==================+============+=============+======================================+\r
+| feedId                 | Id of the feed you want         |     Path         |   String   |     Y       | 1                                    |\r
+|                        | logs for                        |                  |            |             |                                      |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| type                   | Select records of the           |     Path         |   String   |     N       | * pub: Publish attempt               |\r
+|                        | specified type                  |                  |            |             | * del: Delivery attempt              |\r
+|                        |                                 |                  |            |             | * exp: Delivery expiry               |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| publishId              | Select records with specified   |     Path         |   String   |     N       |                                      |\r
+|                        | publish id, carried in the      |                  |            |             |                                      |\r
+|                        | X-DMAAP-DR-PUBLISH-ID header    |                  |            |             |                                      |\r
+|                        | from original publish request   |                  |            |             |                                      |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| start                  | Select records created at or    |     Path         |   String   |     N       | A date-time expressed in the format  |\r
+|                        | after specified date            |                  |            |             | specified by RFC 3339                |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| end                    | Select records created at or    |     Path         |   String   |     N       | A date-time expressed in the format  |\r
+|                        | before specified date           |                  |            |             | specified by RFC 3339                |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| statusCode             | Select records with the         |     Path         |   String   |     N       | An HTTP Integer status code or one   |\r
+|                        | specified statusCode field      |                  |            |             | of the following special values:     |\r
+|                        |                                 |                  |            |             |                                      |\r
+|                        |                                 |                  |            |             | * Success: Any code between 200-299  |\r
+|                        |                                 |                  |            |             | * Redirect: Any code between 300-399 |\r
+|                        |                                 |                  |            |             | * Failure: Any code > 399            |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| expiryReason           | Select records with the         |     Path         |   String   |     N       |                                      |\r
+|                        | specified expiry reason         |                  |            |             |                                      |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| filename               | Select published records with   |     Path         |   String   |     N       |                                      |\r
+|                        | the specified filename          |                  |            |             |                                      |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+\r
+**Response Parameters**\r
+\r
++------------------------+----------------------------------------------+\r
+| Name                   | Description                                  |\r
++========================+==============================================+\r
+| type                   | Record type:                                 |\r
+|                        |                                              |\r
+|                        | * pub: publication attempt                   |\r
+|                        | * del: delivery attempt                      |\r
+|                        | * exp: delivery expiry                       |\r
++------------------------+----------------------------------------------+\r
+| date                   | The UTC date and time at which the record    |\r
+|                        | was generated, with millisecond resolution   |\r
+|                        | in the format specified by RFC 3339          |\r
++------------------------+----------------------------------------------+\r
+| publishId              | The unique identifier assigned by the DR     |\r
+|                        | at the time of the initial publication       |\r
+|                        | request (carried in the X-DMAAP-DR-PUBLISH-ID|\r
+|                        | header in the response to the original       |\r
+|                        | publish request)                             |\r
++------------------------+----------------------------------------------+\r
+| requestURI             | The Request-URI associated with the          |\r
+|                        | request                                      |\r
++------------------------+----------------------------------------------+\r
+| method                 | The HTTP method (PUT or DELETE) for the      |\r
+|                        | request                                      |\r
++------------------------+----------------------------------------------+\r
+| contentType            | The media type of the payload of the         |\r
+|                        | request                                      |\r
++------------------------+----------------------------------------------+\r
+| contentLength          | The size (in bytes) of the payload of        |\r
+|                        | the request                                  |\r
++------------------------+----------------------------------------------+\r
+| sourceIp               | The IP address from which the request        |\r
+|                        | originated                                   |\r
++------------------------+----------------------------------------------+\r
+| endpointId             | The identity used to submit a publish        |\r
+|                        | request to the DR                            |\r
++------------------------+----------------------------------------------+\r
+| deliveryId             | The identity used to submit a delivery       |\r
+|                        | request to a subscriber endpoint             |\r
++------------------------+----------------------------------------------+\r
+| statusCode             | The HTTP status code in the response to      |\r
+|                        | the request. A value of -1 indicates that    |\r
+|                        | the DR was not able to obtain an HTTP        |\r
+|                        | status code                                  |\r
++------------------------+----------------------------------------------+\r
+| expiryReason           | The reason that delivery attempts were       |\r
+|                        | discontinued:                                |\r
+|                        |                                              |\r
+|                        | * notRetryable: The last delivery attempt    |\r
+|                        |   encountered an error condition for which   |\r
+|                        |   the DR does not make retries.              |\r
+|                        | * retriesExhausted: The DR reached its       |\r
+|                        |   limit for making further retry attempts    |\r
++------------------------+----------------------------------------------+\r
+| attempts               | Total number of attempts made before         |\r
+|                        | delivery attempts were discontinued          |\r
++------------------------+----------------------------------------------+\r
+| filename               | File name associated with a publish record   |\r
++------------------------+----------------------------------------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    200\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Produces**\r
+    application/json\r
+\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k https://{host}:{port}/feedlog/{feedId}?statusCode=204``\r
+\r
+**Sample Response**\r
+\r
+.. code-block:: json\r
+\r
+    [\r
+      {\r
+        "statusCode": 204,\r
+        "publishId": "1553715307322.dmaap-dr-node",\r
+        "requestURI": "https://dmaap-dr-node/publish/1/hello",\r
+        "sourceIP": "172.19.0.1",\r
+        "method": "PUT",\r
+        "contentType": "application/octet-stream",\r
+        "endpointId": "dradmin",\r
+        "type": "pub",\r
+        "date": "2019-03-27T19:35:07.324Z",\r
+        "contentLength": 14,\r
+        "fileName": "hello"\r
+      },\r
+      {\r
+        "statusCode": 204,\r
+        "publishId": "1553715312071.dmaap-dr-node",\r
+        "requestURI": "https://dmaap-dr-node/publish/2/hello",\r
+        "sourceIP": "172.19.0.1",\r
+        "method": "PUT",\r
+        "contentType": "application/octet-stream",\r
+        "endpointId": "onap",\r
+        "type": "pub",\r
+        "date": "2019-03-27T19:35:12.072Z",\r
+        "contentLength": 14,\r
+        "fileName": "hello2"\r
+      }\r
+    ]\r
+\r
+\r
+Subscription logging\r
+--------------------\r
+\r
+**Description**: View logging information for specified subscriptions, which can be narrowed down with further parameters\r
+\r
+.. code-block:: bash\r
+\r
+    GET /sublog/{subId}?{queryParam}\r
+\r
+\r
+**Request parameters**\r
+\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| Name                   | Description                     |  Param Type      |  Data Type |  Required   |  Valid/Example Values                |\r
++========================+=================================+==================+============+=============+======================================+\r
+| subId                  | Id of the subscription you want |     Path         |   String   |     Y       | 1                                    |\r
+|                        | logs for                        |                  |            |             |                                      |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| type                   | Select records of the           |     Path         |   String   |     N       | * pub: Publish attempt               |\r
+|                        | specified type                  |                  |            |             | * del: Delivery attempt              |\r
+|                        |                                 |                  |            |             | * exp: Delivery expiry               |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| publishId              | Select records with specified   |     Path         |   String   |     N       |                                      |\r
+|                        | publish id, carried in the      |                  |            |             |                                      |\r
+|                        | X-DMAAP-DR-PUBLISH-ID header    |                  |            |             |                                      |\r
+|                        | from original publish request   |                  |            |             |                                      |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| start                  | Select records created at or    |     Path         |   String   |     N       | A date-time expressed in the format  |\r
+|                        | after specified date            |                  |            |             | specified by RFC 3339                |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| end                    | Select records created at or    |     Path         |   String   |     N       | A date-time expressed in the format  |\r
+|                        | before specified date           |                  |            |             | specified by RFC 3339                |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| statusCode             | Select records with the         |     Path         |   String   |     N       | An Http Integer status code or one   |\r
+|                        | specified statusCode field      |                  |            |             | of the following special values:     |\r
+|                        |                                 |                  |            |             |                                      |\r
+|                        |                                 |                  |            |             | * Success: Any code between 200-299  |\r
+|                        |                                 |                  |            |             | * Redirect: Any code between 300-399 |\r
+|                        |                                 |                  |            |             | * Failure: Any code > 399            |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+| expiryReason           | Select records with the         |     Path         |   String   |     N       |                                      |\r
+|                        | specified expiry reason         |                  |            |             |                                      |\r
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+\r
+\r
+Response Parameters\r
+-------------------\r
+\r
++------------------------+---------------------------------------------+\r
+| Name                   | Description                                 |\r
++========================+=============================================+\r
+| type                   | Record type:                                |\r
+|                        |                                             |\r
+|                        | * pub: publication attempt                  |\r
+|                        | * del: delivery attempt                     |\r
+|                        | * exp: delivery expiry                      |\r
++------------------------+---------------------------------------------+\r
+| date                   | The UTC date and time at which the record   |\r
+|                        | was generated, with millisecond resolution  |\r
+|                        | in the format specified by RFC 3339         |\r
++------------------------+---------------------------------------------+\r
+| publishId              | The unique identifier assigned by the DR    |\r
+|                        | at the time of the initial publication      |\r
+|                        | request(carried in the X-DMAAP-DR-PUBLISH-ID|\r
+|                        | header in the response to the original      |\r
+|                        | publish request) to a feed log URL or       |\r
+|                        | subscription log URL known to the system    |\r
++------------------------+---------------------------------------------+\r
+| requestURI             | The Request-URI associated with the         |\r
+|                        | request                                     |\r
++------------------------+---------------------------------------------+\r
+| method                 | The HTTP method (PUT or DELETE) for the     |\r
+|                        | request                                     |\r
++------------------------+---------------------------------------------+\r
+| contentType            | The media type of the payload of the        |\r
+|                        | request                                     |\r
++------------------------+---------------------------------------------+\r
+| contentLength          | The size (in bytes) of the payload of       |\r
+|                        | the request                                 |\r
++------------------------+---------------------------------------------+\r
+| sourceIp               | The IP address from which the request       |\r
+|                        | originated                                  |\r
++------------------------+---------------------------------------------+\r
+| endpointId             | The identity used to submit a publish       |\r
+|                        | request to the DR                           |\r
++------------------------+---------------------------------------------+\r
+| deliveryId             | The identity used to submit a delivery      |\r
+|                        | request to a subscriber endpoint            |\r
++------------------------+---------------------------------------------+\r
+| statusCode             | The HTTP status code in the response to     |\r
+|                        | the request. A value of -1 indicates that   |\r
+|                        | the DR was not able to obtain an HTTP       |\r
+|                        | status code                                 |\r
++------------------------+---------------------------------------------+\r
+| expiryReason           | The reason that delivery attempts were      |\r
+|                        | discontinued:                               |\r
+|                        |                                             |\r
+|                        | * notRetryable: The last delivery attempt   |\r
+|                        |   encountered an error condition for which  |\r
+|                        |   the DR does not make retries.             |\r
+|                        | * retriesExhausted: The DR reached its      |\r
+|                        |   limit for making further retry attempts   |\r
++------------------------+---------------------------------------------+\r
+| attempts               | Total number of attempts made before        |\r
+|                        | delivery attempts were discontinued         |\r
++------------------------+---------------------------------------------+\r
+\r
+**Response Codes**\r
+\r
+* Success:\r
+    200\r
+\r
+* Error:\r
+    See `Response Codes`_\r
+\r
+**Produces**\r
+    application/json\r
+\r
+**Sample Request**\r
+\r
+.. code-block:: bash\r
+\r
+    curl -k https://{host}:{port}/sublog/{subId}?statusCode=204\r
+\r
+**Sample Response**\r
+\r
+.. code-block:: json\r
+\r
+    [\r
+      {\r
+        "statusCode": 204,\r
+        "publishId": "1553715307322.dmaap-dr-node",\r
+        "requestURI": "https://dmaap-dr-node/publish/1/hello",\r
+        "sourceIP": "172.19.0.1",\r
+        "method": "PUT",\r
+        "contentType": "application/octet-stream",\r
+        "endpointId": "dradmin",\r
+        "type": "pub",\r
+        "date": "2019-03-27T19:35:07.324Z",\r
+        "contentLength": 14,\r
+        "fileName": "hello"\r
+      },\r
+      {\r
+        "statusCode": 204,\r
+        "publishId": "1553715312071.dmaap-dr-node",\r
+        "requestURI": "https://dmaap-dr-node/publish/2/hello",\r
+        "sourceIP": "172.19.0.1",\r
+        "method": "PUT",\r
+        "contentType": "application/octet-stream",\r
+        "endpointId": "onap",\r
+        "type": "pub",\r
+        "date": "2019-03-27T19:35:12.072Z",\r
+        "contentLength": 14,\r
+        "fileName": "hello2"\r
+      }\r
+    ]\r
+\r
+\r
+**Feed Authorization Object**\r
+\r
+.. _`Auth Object`:\r
+\r
++----------------+-----------------+--------------------------------+------------------------------+\r
+| Field          | Type            | Description                    | Restrictions                 |\r
++================+=================+================================+==============================+\r
+| classification | string          | An indicator of the feed’s     | Length <=32                  |\r
+|                |                 | data security classification   |                              |\r
++----------------+-----------------+--------------------------------+------------------------------+\r
+| endpoint_ids   |`EID Object`_ [] | Array of objects defining the  | At least 1 id in the array   |\r
+|                |                 | identities that are allowed    |                              |\r
+|                |                 | to publish to this feed        |                              |\r
++----------------+-----------------+--------------------------------+------------------------------+\r
+| endpoint_addrs | string[]        | Array of IP addresses or IP    | Each string must be a valid  |\r
+|                |                 | subnetwork addresses that      | textual representation of    |\r
+|                |                 | are allowed to publish to this | IPv4 or IPv6 host address or |\r
+|                |                 | feed; an empty array indicates | subnetwork address.          |\r
+|                |                 | that publish requests are      |                              |\r
+|                |                 | permitted from any IP address  |                              |\r
++----------------+-----------------+--------------------------------+------------------------------+\r
+\r
+\r
+**Endpoint Identity Object**\r
+\r
+.. _`EID Object`:\r
+\r
++----------+--------+--------------------------+--------------+\r
+| Field    | Type   | Description              | Restrictions |\r
++==========+========+==========================+==============+\r
+| id       | string | Publishing endpoint      | Length <= 20 |\r
+|          |        | identifier               |              |\r
++----------+--------+--------------------------+--------------+\r
+| password | string | Password associated with | Length <= 32 |\r
+|          |        | id                       |              |\r
++----------+--------+--------------------------+--------------+\r
+\r
+\r
+**Feed Links Object**\r
+\r
+.. _`Feed Links Obj`:\r
+\r
++-----------+---------------------------------------------------+----------------+\r
+| Field     | Description                                       | Symbolic Name  |\r
++===========+===================================================+================+\r
+| self      | URL pointing to this feed, used for updating and  | <feedURL>      |\r
+|           | deleting the feed.                                |                |\r
++-----------+---------------------------------------------------+----------------+\r
+| publish   | URL for publishing requests for this feed         | <publishURL>   |\r
++-----------+---------------------------------------------------+----------------+\r
+| subscribe | URL for subscribing to this feed                  | <subscribeURL> |\r
++-----------+---------------------------------------------------+----------------+\r
+| log       | URL for accessing log information about this feed | <feedLogURL>   |\r
++-----------+---------------------------------------------------+----------------+\r
+\r
+\r
+**Delivery Object**\r
+\r
+.. _`Del Object`:\r
+\r
++----------+---------+-----------------------------------------------+-------------------------------------+\r
+|  Field   |  Type   | Description                                   | Restrictions                        |\r
++==========+=========+===============================================+=====================================+\r
+|  url     | string  | URL to which deliveries for this subscription | length <= 256                       |\r
+|          |         | should be directed Valid HTTPS URL            |                                     |\r
++----------+---------+-----------------------------------------------+-------------------------------------+\r
+|  user    | string  | User ID to be passed in the Authorization     | Length <= 20                        |\r
+|          |         | header when deliveries are made               |                                     |\r
++----------+---------+-----------------------------------------------+-------------------------------------+\r
+| password | string  | Password to be passed in the Authorization    | Length <= 32                        |\r
+|          |         | header when deliveries are made               |                                     |\r
++----------+---------+-----------------------------------------------+-------------------------------------+\r
+| use100   | boolean | Flag indicating whether the DR should use     | Must be: true to use 100-continue   |\r
+|          |         | the HTTP 100-continue feature                 |                                     |\r
+|          |         |                                               | false to disable using 100-continue |\r
++----------+---------+-----------------------------------------------+-------------------------------------+\r
+\r
+\r
+**Sub Links Object**\r
+\r
+.. _`Sub Links Obj`:\r
+\r
++-----------+---------------------------------------------------+-------------------+\r
+| Field     | Description                                       | Symbolic Name     |\r
++===========+===================================================+===================+\r
+| self      | URL pointing to this subscription, used for       | <subscriptionURL> |\r
+|           | updating and deleting the subscription.           |                   |\r
++-----------+---------------------------------------------------+-------------------+\r
+| feed      | URL of the feed to which this subscription        | <feedURL>         |\r
+|           | applies; the same URL as the <feedURL> in the     |                   |\r
+|           | representation of the feed                        |                   |\r
++-----------+---------------------------------------------------+-------------------+\r
+| log       | URL for accessing log information about this      | <subLogURL>       |\r
+|           | subscription                                      |                   |\r
++-----------+---------------------------------------------------+-------------------+\r
+\r
+\r
+**Response/Error Codes**\r
+\r
+.. _`Response Codes`:\r
+\r
++------------------------+-------------------------------------------+\r
+| Response statusCode    | Response Description                      |\r
++========================+===========================================+\r
+| 200 to 299             | Success Response                          |\r
++------------------------+-------------------------------------------+\r
+| 400                    | Bad request - The request is defective in |\r
+|                        | some way. Possible causes:                |\r
+|                        |                                           |\r
+|                        | * JSON object in request body does not    |\r
+|                        |   conform to the spec.                    |\r
+|                        | * Invalid parameter value in query string |\r
++------------------------+-------------------------------------------+\r
+| 401                    | Indicates that the request was missing the|\r
+|                        | Authorization header or, if the header    |\r
+|                        | was presented, the credentials were not   |\r
+|                        | acceptable                                |\r
++------------------------+-------------------------------------------+\r
+| 403                    | Forbidden - The request failed            |\r
+|                        | authorization.                            |\r
+|                        | Possible causes:                          |\r
+|                        |                                           |\r
+|                        | * Request originated from an unauthorized |\r
+|                        |   IP address                              |\r
+|                        | * Client certificate subject is not on    |\r
+|                        |   the API’s authorized list.              |\r
+|                        | * X-DMAAP-DR-ON-BEHALF-OF identity is not |\r
+|                        |   authorized to perform                   |\r
++------------------------+-------------------------------------------+\r
+| 404                    | Not Found - The Request-URI does not point|\r
+|                        | to a resource that is known to the API.   |\r
++------------------------+-------------------------------------------+\r
+| 405                    | Method Not Allowed - The HTTP method in   |\r
+|                        | the request is not supported for the      |\r
+|                        | resource addressed by the Request-URI.    |\r
++------------------------+-------------------------------------------+\r
+| 406                    | Not Acceptable - The request has an Accept|\r
+|                        | header indicating that the requester will |\r
+|                        | not accept a response with                |\r
+|                        | application/vnd.dmaap-dr.log-list content.|\r
++------------------------+-------------------------------------------+\r
+| 415                    | Unsupported Media Type - The media type in|\r
+|                        | the requests Content-Type header is not   |\r
+|                        | appropriate for the request.              |\r
++------------------------+-------------------------------------------+\r
+| 500                    | Internal Server Error - The DR API server |\r
+|                        | encountered an internal error and could   |\r
+|                        | not complete the request.                 |\r
++------------------------+-------------------------------------------+\r
+| 503                    | Service Unavailable - The DR API service  |\r
+|                        | is currently unavailable                  |\r
++------------------------+-------------------------------------------+\r
+| -1                     | Failed Delivery                           |\r
++------------------------+-------------------------------------------+
\ No newline at end of file