summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2019-04-08 14:52:08 +0000
committerefiacor <fiachra.corcoran@est.tech>2019-04-08 14:52:08 +0000
commit0fa019897cb79de1def349b8fd0b660d1951681a (patch)
tree09eed0ee4e1226c63e06bf8c782a4e1627850a64
parent7704d3079906a4fb51cd58f12d56bd3100fca6b2 (diff)
Adding docs for CADI
Change-Id: If3324973a2e41ca0d98804cb8e6520fc1beccfe9 Issue-ID: DMAAP-1016 Signed-off-by: efiacor <fiachra.corcoran@est.tech>
-rw-r--r--datarouter-docker-compose/src/main/resources/database/sql_init_01.sql2
-rwxr-xr-xdatarouter-prov/src/main/resources/misc/sql_init_01.sql2
-rwxr-xr-xdatarouter-prov/src/test/resources/create.sql2
-rw-r--r--docs/architecture.rst56
-rw-r--r--docs/configuration.rst43
-rw-r--r--docs/data-router/DataRouterUserGuide.rst25
-rw-r--r--docs/data-router/administration.rst14
-rw-r--r--docs/data-router/architecture.rst25
-rw-r--r--docs/data-router/configuration.rst7
-rw-r--r--docs/data-router/consumedapis.rst7
-rwxr-xr-xdocs/data-router/data-router.rst1176
-rw-r--r--docs/data-router/dr_arch.pngbin35750 -> 0 bytes
-rw-r--r--docs/data-router/humaninterfaces.rst10
-rw-r--r--docs/delivery.rst (renamed from docs/data-router/delivery.rst)2
-rw-r--r--docs/images/dr_arch_only.pngbin0 -> 17291 bytes
-rw-r--r--docs/images/dr_bc_prov.pngbin0 -> 51556 bytes
-rw-r--r--docs/images/dr_pub_flow.pngbin0 -> 72010 bytes
-rw-r--r--docs/index.rst35
-rw-r--r--docs/installation.rst51
-rw-r--r--docs/logging.rst (renamed from docs/data-router/logging.rst)6
-rwxr-xr-xdocs/offered-apis.rst1350
-rw-r--r--docs/release-notes.rst (renamed from docs/data-router/release-notes.rst)67
22 files changed, 1551 insertions, 1329 deletions
diff --git a/datarouter-docker-compose/src/main/resources/database/sql_init_01.sql b/datarouter-docker-compose/src/main/resources/database/sql_init_01.sql
index 83dfd0bc..88434180 100644
--- a/datarouter-docker-compose/src/main/resources/database/sql_init_01.sql
+++ b/datarouter-docker-compose/src/main/resources/database/sql_init_01.sql
@@ -3,7 +3,7 @@ use datarouter;
CREATE TABLE FEEDS (
FEEDID INT UNSIGNED NOT NULL PRIMARY KEY,
GROUPID INT(10) UNSIGNED NOT NULL DEFAULT 0,
- NAME VARCHAR(255) NOT NULL,
+ NAME VARCHAR(256) NOT NULL,
VERSION VARCHAR(20) NULL,
DESCRIPTION VARCHAR(1000),
BUSINESS_DESCRIPTION VARCHAR(1000) DEFAULT NULL,
diff --git a/datarouter-prov/src/main/resources/misc/sql_init_01.sql b/datarouter-prov/src/main/resources/misc/sql_init_01.sql
index 55f0aee9..a1980d29 100755
--- a/datarouter-prov/src/main/resources/misc/sql_init_01.sql
+++ b/datarouter-prov/src/main/resources/misc/sql_init_01.sql
@@ -1,7 +1,7 @@
CREATE TABLE FEEDS (
FEEDID INT UNSIGNED NOT NULL PRIMARY KEY,
GROUPID INT(10) UNSIGNED NOT NULL DEFAULT 0,
- NAME VARCHAR(255) NOT NULL,
+ NAME VARCHAR(256) NOT NULL,
VERSION VARCHAR(20) NULL,
DESCRIPTION VARCHAR(1000),
BUSINESS_DESCRIPTION VARCHAR(1000) DEFAULT NULL,
diff --git a/datarouter-prov/src/test/resources/create.sql b/datarouter-prov/src/test/resources/create.sql
index 1fb30c90..7c106723 100755
--- a/datarouter-prov/src/test/resources/create.sql
+++ b/datarouter-prov/src/test/resources/create.sql
@@ -1,7 +1,7 @@
CREATE TABLE FEEDS (
FEEDID INT UNSIGNED NOT NULL PRIMARY KEY,
GROUPID INT(10) UNSIGNED NOT NULL DEFAULT 0,
- NAME VARCHAR(255) NOT NULL,
+ NAME VARCHAR(256) NOT NULL,
VERSION VARCHAR(20) NULL,
DESCRIPTION VARCHAR(1000),
BUSINESS_DESCRIPTION VARCHAR(1000) DEFAULT NULL,
diff --git a/docs/architecture.rst b/docs/architecture.rst
new file mode 100644
index 00000000..6f29e5d4
--- /dev/null
+++ b/docs/architecture.rst
@@ -0,0 +1,56 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+Architecture
+============
+
+Capabilities
+------------
+The DMaaP Data Router (DR) provisioning API is an HTTPS-based, REST-like API for creating and managing
+DR feeds and subscriptions, which provides a pub/sub architectural model for the transfer of data.
+
+The DR API also supports `AAF CADI authorization <https://docs.onap.org/en/latest/submodules/aaf/authz.git/docs/sections/architecture/cadi.html#authorization>`_.
+
+To use this feature, the API client must provide a valid AAF AppID / MechID with each request.
+To enable this feature, see the :ref:`configuration` section.
+
+.. note:: In future releases, AAF CADI auth will be enabled by default.
+
+Usage Scenarios
+---------------
+Typically, DR pub clients request the provisioning of a new DR feed.
+Once created, DR sub clients can then subscribe to the feed to receive all data published to that feed.
+
+ .. image:: images/dr_pub_flow.png
+
+
+The DR provisioning API is not meant to be used directly by DR end users (publishers and subscribers)
+for feed / subscription CRUD (create, read, update, delete) operations.
+
+Instead, prospective publishers and subscribers should use the DMaaP Bus Controller API, which will call
+the DR provisioning API to manage feeds and subscriptions.
+
+ .. image:: images/dr_bc_prov.png
+
+
+See DMaaP Bus Controller API docs for more information:
+
+`Bus Controller Feeds API <https://onap.readthedocs.io/en/latest/submodules/dmaap/dbcapi.git/docs/api.html#feeds>`_
+
+`Bus Controller Subs API <https://onap.readthedocs.io/en/latest/submodules/dmaap/dbcapi.git/docs/api.html#dr-subs>`_
+
+
+High level Architecture
+-----------------------
+The following diagram shows the high-level relationship between the system components:
+
+ .. image:: images/dr_arch_only.png
+
+
+DMaaP DR architecture uses the Eclipse Jetty server as an application server to service it's front-end.
+ * dmaap-dr-prov services all provisioning requests.
+ * dmaap-dr-node services the publishing of data to feed subscribers.
+
+DMaaP DR uses MariaDB as it's storage component for the following:
+ * DR Provisioning data. (feeds, subscribers, etc.)
+ * Historical logging data related to feed activity. (Publish, Delivery, etc.) \ No newline at end of file
diff --git a/docs/configuration.rst b/docs/configuration.rst
new file mode 100644
index 00000000..f7fa4bcf
--- /dev/null
+++ b/docs/configuration.rst
@@ -0,0 +1,43 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+.. _configuration:
+
+Configuration
+=============
+
+Configuration properties for both Data Router Provisioning server and Data Router Node server should remain as default values.
+
+The only exception to this, is when enabling the AAF CADI framework to authorize the DR provisioning requests.
+
+.. note:: The AAF CADI filtering feature is disabled by default. When AAF CADI auth is enabled, all DR API calls must provide an AAF AppID to access the relevant API endpoint.
+
+To enable DR AAF CADI authorization, the following steps are required:
+
+DR CADI Prerequisites:
+ * AAF deployment
+
+Update the following properties at deployment time.
+
+
+**DMaaP DR Prov AAF properties**
+
+::
+
+ # AAF config
+ org.onap.dmaap.datarouter.provserver.cadi.enabled = true
+
+ # AAF URL to connect to AAF server
+ org.onap.dmaap.datarouter.provserver.cadi.aaf.url = https://<RELEVANT_AAF_URL>:8095
+
+
+**DMaaP DR Node AAF properties**
+
+::
+
+ # AAF URL to connect to AAF server
+ AafUrl = https://<RELEVANT_AAF_URL>:8095
+
+ # AAF CADI enabled flag
+ CadiEnabled = true
+
diff --git a/docs/data-router/DataRouterUserGuide.rst b/docs/data-router/DataRouterUserGuide.rst
deleted file mode 100644
index 8f7b9ef1..00000000
--- a/docs/data-router/DataRouterUserGuide.rst
+++ /dev/null
@@ -1,25 +0,0 @@
-===========================
-Data Router (DR) User Guide
-===========================
-
-Standalone Mode
----------------
-
-Installation
-============
-
-1. Find the datarouter project on the gerrit website: https://gerrit.onap.org/r/#/admin/projects/dmaap/datarouter
-
-2. Clone the repo onto your server using the clone command found on the datarouter page on gerrit.
-
-3. cd into the docker-compose directory and run docker-compose up.
-
-Configurations
-==============
-
-Using the Data Router
----------------------
-
-For information on how to use the Data Router refer to the Data Router API guide at:
-
- :ref:`data_router_api_guide` \ No newline at end of file
diff --git a/docs/data-router/administration.rst b/docs/data-router/administration.rst
deleted file mode 100644
index b050a1fe..00000000
--- a/docs/data-router/administration.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-
-Administration
-==============
-
-
-Processes
----------
-NA
-
-Actions
--------
-NA
diff --git a/docs/data-router/architecture.rst b/docs/data-router/architecture.rst
deleted file mode 100644
index b18f7bb3..00000000
--- a/docs/data-router/architecture.rst
+++ /dev/null
@@ -1,25 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-
-Architecture
-============
-
-
-Capabilities
-------------
-Data Router is a RESTful web service used for the transfer of data across networks any larger than a Message Router message (> 1Mb).
-
-Usage Scenarios
----------------
- Data Router endpoints are used to create/view/delete Feeds, Subscribers and Published files. Clients can use the Data Router endpoints
- to publish a file to a feed and subscribe to this feed to receive the file.
-
-Interactions
-------------
-Data Router REST service uses the Data Router API to allow users to publish to and subscribe to a feed, in order to send and receive files.
-
-
-
- |image0|
-
- .. |image0| image:: dr_arch.png
diff --git a/docs/data-router/configuration.rst b/docs/data-router/configuration.rst
deleted file mode 100644
index 2a7096a1..00000000
--- a/docs/data-router/configuration.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-
-Configuration
-=============
-
-NA \ No newline at end of file
diff --git a/docs/data-router/consumedapis.rst b/docs/data-router/consumedapis.rst
deleted file mode 100644
index aa1a8bd1..00000000
--- a/docs/data-router/consumedapis.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-
-Consumed APIs
-=============
-
-Data Router does not consume any API
diff --git a/docs/data-router/data-router.rst b/docs/data-router/data-router.rst
deleted file mode 100755
index 66e13bf5..00000000
--- a/docs/data-router/data-router.rst
+++ /dev/null
@@ -1,1176 +0,0 @@
-.. _data_router_api_guide:
-
-==========================
-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 DMaaP Data Router 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 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 feed URL to service the publisher/subscriber model.
-
-Sample Request
-==============
-
-``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}``
-
-Request Parameters:
-===================
-
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| Name | Description | Param Type | Data Type | MaxLen | Required | Valid/Example Values |
-+========================+=================================+==================+============+==============+=============+======================================+
-| name | Feed name | Body | String | <=20 | Y | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| version | Feed version | Body | String | <=20 | Y | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| description | Feed description | Body | String | <=256 | Y | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| business description | Business description | Body | String | <=256 | 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 | | Y | application/vnd.dmaap-dr.feed |
-| | (feed,subscriber,publisher) | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| X-DMAAP-DR-ON-BEHALF-OF| User id of owner of feed | Header | String | <=8 | Y | username |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-
-Response/Error Codes
-====================
-
-+------------------------+-------------------------------------------+
-| Response statusCode | Response Description |
-+========================+===========================================+
-| 201 | 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-DMAAP-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 requests 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": "v1.0.0",
- "description": "Jettydemo",
- "business_description": "Jettydemo",
- "suspend": false,
- "changeowner": true,
- "authorization": {
- "classification": "unclassified",
- "endpoint_addrs": ["172.18.0.3","192.167.3.42"],
- "endpoint_ids": [
- {
- "password": "password",
- "id": "user"
- }
- ]
- }
- }
-
-
-Updating a Feed
----------------
-
-**Description**: Update a feed with new parameters.
-
-Sample Request
-==============
-
-``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}``
-
-Request Parameters:
-===================
-
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| Name | Description | Param Type | Data Type | MaxLen | Required | Valid/Example Values |
-+========================+=================================+==================+============+==============+=============+======================================+
-| description | Feed description | Body | String | <=256 | Y | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| business description | Business description | Body | String | <=256 | 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 | | Y | application/vnd.dmaap-dr.feed |
-| | (feed,subscriber,publisher) | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| X-DMAAP-DR-ON-BEHALF-OF| User id of owner of feed | Header | String | <=8 | Y | 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-DMAAP-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": "v1.0.0",
- "description": "Updated decription",
- "business_description": "Updated business description",
- "suspend": false,
- "changeowner": true,
- "authorization": {
- "classification": "unclassified",
- "endpoint_addrs": ["172.18.0.3","192.167.3.42"],
- "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 want to see a representation of
-
-Sample Request
-==============
-
-``curl -k -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" 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-DMAAP-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 |
-+------------------------+-------------------------------------------+
-
-Delete a Feed
--------------
-
-**Description**: Deletes a specified feed
-
-Request URL
-===========
-
-http[s]://{host}:{port}/feed/{feedId}
-
-* {feedId}: Id of the feed you want to delete
-
-Sample Request
-==============
-
-``curl -k -X DELETE -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}``
-
-Response/Error Codes
-====================
-
-+------------------------+-------------------------------------------+
-| Response statusCode | Response Description |
-+========================+===========================================+
-| 204 | 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-DMAAP-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}
-
-* {feedId}: Id of the feed to subscribe to
-
-Sample Request
-==============
-
-``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}``
-
-Request Parameters:
-===================
-
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| Name | Description | Param Type | Data Type | MaxLen | Required | 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 |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| decompress | Set to true if the data is to | Body | Boolean | | N | * true |
-| | be decompressed for subscriber | | | | | * false |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| group-id | | Body | Integer | | Y | |
-| | | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| content-type | To specify type of message | Header | String | | Y | application/vnd.dmaap-dr.subscription|
-| | (feed,subscriber,publisher) | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| X-DMAAP-DR-ON-BEHALF-OF| User id of subscriber | Header | String | <=8 | Y | username |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-
-Response/Error Codes
-====================
-
-+------------------------+-------------------------------------------+
-| Response statusCode | Response Description |
-+========================+===========================================+
-| 201 | 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-DMAAP-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 requests 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,
- "groupid" : 1,
- "subscriber" : "subuser"
- }
-
-Update subscription
--------------------
-
-**Description**: Update a subscription to a feed.
-
-Request URL
-===========
-
-http[s]://{host}:{port}/subs/{subId}
-
-* {subId}: Id of the subscription to be updated
-
-Sample Request
-==============
-
-``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}``
-
-Request Parameters:
-===================
-
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| Name | Description | Param Type | Data Type | MaxLen | Required | Valid/Example Values |
-+========================+=================================+==================+============+==============+=============+======================================+
-| subId | ID for the subscription you are | Path | String | | Y | |
-| | updating | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| 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 |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| decompress | Set to true if the data is to | Body | Boolean | | N | * true |
-| | be decompressed for subscriber | | | | | * false |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| group-id | | Body | Integer | | Y | |
-| | | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| content-type | To specify type of message | Header | String | | Y | application/vnd.dmaap-dr.subscription|
-| | (feed,subscriber,publisher) | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| X-DMAAP-DR-ON-BEHALF-OF| User id of subscriber | Header | String | 8 | Y | 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-DMAAP-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://192.0.0.1:7070/",
- "user" : "NEW_LOGIN",
- "password" : "NEW_PASSWORD",
- "use100" : true
- },
- "metadataOnly" : false,
- "groupid" : 2,
- "subscriber" : "subuser"
- }
-
-
-Get a Subscription
-------------------
-
-**Description**: Retrieves a representation of the specified subscription.
-
-Request URL
-===========
-
-http[s]://{host}:{port}/subs/{subId}
-
-* {subId}: Id of the subscription you want to see a representation of
-
-Sample Request
-==============
-
-``curl -k -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{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-DMAAP-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 |
-+------------------------+-------------------------------------------+
-
-Delete a subscription
----------------------
-
-**Description**: Deletes a specified subscription
-
-Request URL
-===========
-
-http[s]://{host}:{port}/subs/{subId}
-
-* {subId}: Id of the subscription you want to delete
-
-Sample Request
-==============
-
-``curl -k -X DELETE -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}``
-
-Response/Error Codes
-====================
-
-+------------------------+-------------------------------------------+
-| Response statusCode | Response Description |
-+========================+===========================================+
-| 204 | 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-DMAAP-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 data to a given feed
-
-Request URL
-===========
-
-http[s]://{host}:{port}/publish/{feedId}/{fileName}
-
-* {feedId} The id of the feed you are publishing to.
-* {fileId} The name of the file you are publishing to the feed.
-
-Sample Request
-==============
-
-``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}/sampleFile``
-
-Request parameters
-==================
-
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------------------------------------------+
-| Name | Description | Param Type | Data Type | MaxLen | Required | 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 | | Y | application/octet-stream |
-| | format | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------------------------------------------+
-| X-DMAAP-DR-META | Metadata for the file. Accepts | Header | String | 4096 | N | '{"compressionType":"gzip","id": 1234, "transferred":true, "size":null}' |
-| | only non nested json objects | | | | | |
-| | of the following type : | | | | | |
-| | -Numbers | | | | | |
-| | -Strings | | | | | |
-| | -Lowercase boolean | | | | | |
-| | -null | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------------------------------------------+
-
-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 |
-+------------------------+---------------------------------+
-
-
-Delete a Published file
------------------------
-
-**Description**: Deletes a specified published file
-
-Request URL
-===========
-
-http[s]://{host}:{port}/publish/{feedId}/{fileId}
-
-* {feedId}: Id of the feed you want to delete a published file from
-* {fileId}: Id of the published file you want to delete
-
-Sample Request
-==============
-
-``curl -k -X DELETE --user {user}:{password} --location-trusted https://{host}:{port}/publish/{feedId}/{fileId}``
-
-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 |
-+------------------------+---------------------------------+
-
-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} : The id of the feed you want to get logs for
-* {queryParameter}: A parameter passed through to narrow the returned logs. Multiple parameters can be passed.
-
-
-Sample Request
-==============
-
-``curl -k https://{host}:{port}/feedlog/{feedId}?statusCode=204``
-
-Request parameters
-==================
-
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| Name | Description | Param Type | Data Type | MaxLen | Required | Valid/Example Values |
-+========================+=================================+==================+============+==============+=============+======================================+
-| feedId | Id of the feed you want | Path | String | | Y | 1 |
-| | logs for | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| 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-DMAAP-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 | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| filename | Select published records with | Path | String | | N | |
-| | the specified filename | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-
-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-DMAAP-DR-PUBLISH-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 |
-+------------------------+----------------------------------------------+
-| filename | File name associated with a publish record |
-+------------------------+----------------------------------------------+
-
-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.dmaap-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 |
-+------------------------+-------------------------------------------+
-
-
-Subscription 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}: The id of the feed you want to get logs from
-* {queryParameter}: A parameter passed through to narrow the returned logs. Multiple parameters can be passed.
-
-
-Sample Request
-==============
-
-``curl -k https://{host}:{port}/sublog/{subId}?statusCode=204``
-
-Request parameters
-==================
-
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| Name | Description | Param Type | Data Type | MaxLen | Required | Valid/Example Values |
-+========================+=================================+==================+============+==============+=============+======================================+
-| subId | Id of the subscription you want | Path | String | | N | 1 |
-| | logs for | | | | | |
-+------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+
-| 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-DMAAP-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-DMAAP-DR-PUBLISH-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.dmaap-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 |
-+------------------------+-------------------------------------------+
diff --git a/docs/data-router/dr_arch.png b/docs/data-router/dr_arch.png
deleted file mode 100644
index 54cd7e8d..00000000
--- a/docs/data-router/dr_arch.png
+++ /dev/null
Binary files differ
diff --git a/docs/data-router/humaninterfaces.rst b/docs/data-router/humaninterfaces.rst
deleted file mode 100644
index 71a2b730..00000000
--- a/docs/data-router/humaninterfaces.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-
-Human Interfaces
-================
-
-Data Router does not have human interfaces
-
-
-
diff --git a/docs/data-router/delivery.rst b/docs/delivery.rst
index 775841a4..ccfab3f0 100644
--- a/docs/data-router/delivery.rst
+++ b/docs/delivery.rst
@@ -4,7 +4,7 @@
Delivery
==============
-Data Router is comprised of a datarouter-provisioning container, a datarouter-node container and a mariadb container.
+Below is a diagram of the DMaaP Data Router project docker containers and the connections between them.
.. blockdiag::
diff --git a/docs/images/dr_arch_only.png b/docs/images/dr_arch_only.png
new file mode 100644
index 00000000..cc147e44
--- /dev/null
+++ b/docs/images/dr_arch_only.png
Binary files differ
diff --git a/docs/images/dr_bc_prov.png b/docs/images/dr_bc_prov.png
new file mode 100644
index 00000000..9e2f7e47
--- /dev/null
+++ b/docs/images/dr_bc_prov.png
Binary files differ
diff --git a/docs/images/dr_pub_flow.png b/docs/images/dr_pub_flow.png
new file mode 100644
index 00000000..83af9bd2
--- /dev/null
+++ b/docs/images/dr_pub_flow.png
Binary files differ
diff --git a/docs/index.rst b/docs/index.rst
index 99f0f281..fa1a250c 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -2,36 +2,19 @@
.. http://creativecommons.org/licenses/by/4.0
.. Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+DMaaP Data Router
============================================
-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 HTTPS REST API to service all transactions. HTTPS 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.
-
-
.. toctree::
:maxdepth: 1
-
- data-router/data-router.rst
- data-router/administration.rst
- data-router/architecture.rst
- data-router/configuration.rst
- data-router/consumedapis.rst
- data-router/DataRouterUserGuide.rst
- data-router/delivery.rst
- data-router/humaninterfaces.rst
- data-router/logging.rst
- data-router/release-notes.rst
+
+ architecture.rst
+ offered-apis.rst
+ delivery.rst
+ logging.rst
+ installation.rst
+ configuration.rst
+ release-notes.rst
diff --git a/docs/installation.rst b/docs/installation.rst
new file mode 100644
index 00000000..95cda4e1
--- /dev/null
+++ b/docs/installation.rst
@@ -0,0 +1,51 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+Installation
+=============
+
+**Standalone**
+Pre-requisites:
+
+* docker 18.09.3 or higher.
+* docker-compose 1.17.1 or higher.
+* Ensure port 8080 is not already in use.
+
+1. Clone the DMaaP Data Router project from ONAP gerrit:
+
+.. code-block:: bash
+
+ git clone https://gerrit.onap.org/r/dmaap/datarouter
+
+2. Move/cd to the docker-compose directory and execute the following:
+
+.. code-block:: bash
+
+ cd datarouter/datarouter-docker-compose/src/main/resources/
+
+ docker-compose up -d
+
+
+The following docker containers should be deployed successfully:
+
+.. code-block:: bash
+
+ docker ps --format '{{.Image}}'
+
+ nexus3.onap.org:10001/onap/dmaap/datarouter-node
+ nexus3.onap.org:10001/onap/dmaap/datarouter-prov
+ nexus3.onap.org:10001/onap/dmaap/datarouter-subscriber
+ mariadb:10.2.14
+
+
+To verify that the provisioning API is active, get the IP of the datarouter-prov container:
+
+.. code-block:: bash
+
+ docker inspect --format '{{ .NetworkSettings.Networks.resources_testing_net.IPAddress }}' datarouter-prov
+
+and execute the following CURL command:
+
+.. code-block:: bash
+
+ curl -k https://{DR_PROV_CONTAINER_IP}:8443/internal/prov \ No newline at end of file
diff --git a/docs/data-router/logging.rst b/docs/logging.rst
index 6ac7a0a3..140c265f 100644
--- a/docs/data-router/logging.rst
+++ b/docs/logging.rst
@@ -5,12 +5,10 @@ Logging
=======
-Where to Access Information
----------------------------
+**Where to Access Information**
Data Router uses logback framework to generate logs.
-Error / Warning Messages
-------------------------
+**Error / Warning Messages**
Currently Data Router does not have any unique error codes. However the following are the common HTTP error codes that
could possibly occur in Data Router:
diff --git a/docs/offered-apis.rst b/docs/offered-apis.rst
new file mode 100755
index 00000000..a3a12139
--- /dev/null
+++ b/docs/offered-apis.rst
@@ -0,0 +1,1350 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+.. _data_router_api_guide:
+
+.. toctree::
+ :maxdepth: 2
+
+Offered APIs
+============
+
+**The API Provisioning Model**
+
+The DMaaP Data Router (DR) provisioning API defines two resource types - the feed and the subscription, each with JSON
+representations. The API models the provisioning data as a collection of feeds that are known to the DR
+(the feeds collection), with each feed containing a collection of the subscriptions to the feed.
+The standard HTTP operations (POST, GET, PUT, and DELETE), used in conjunction with these resource
+representations, allow an API user to create, get information about, modify, and delete feeds and
+subscriptions.
+
+**HTTP Service APIs**
+
+DMaaP Data Router utilizes an HTTPS REST API to service all transactions. HTTPS 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 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.
+
+**HTTP Authorization**
+
+The user-id:password pair:
+
+* If AAF enabled: A valid AAF AppId to be authenticated and authorized by the AAF CADI framework.
+* If Non AAF : When publishing or retracting a file, a valid `EID Object`_ with publish permissions.
+
+Create a Feed
+-------------
+
+**Description**: Creates a unique feed URL to service the publisher/subscriber model.
+
+.. code-block:: bash
+
+ POST /
+
+**Request Parameters:**
+
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| Field | Description | Param Type | Data Type | MaxLen | Set By | Updatable? | Required | Valid/Example Values |
++======================+================================+============+==================+========+========+============+==========+===============================+
+| name | Feed name | Body | String | <=20 | Client | N | Y | |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| version | Feed version | Body | String | <=20 | Client | N | Y | v1.0.0 |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| description | Feed description | Body | String | <=256 | Client | Y | N | |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| business description | Business description | Body | String | <=256 | Client | Y | N | |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| authorization | Information for authorizing | Body |`Auth Object`_ | | Client | Y | Y | |
+| | publishing requests | | | | | | | |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| suspend | Set to true if the feed is in | Body | Boolean | | Client | Y | N | * true |
+| | the suspended state | | | | | | | * false (default) |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| group-id | Auth group for feed management | Body | Integer | | Client | Y | N | 0 (default) |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| aaf_instance | The instance passed to aaf | Body | String | <=256 | Client | N | N | legacy (default) |
+| | during permission checks | | | | | | | |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| Content-Type | To specify type of message | Header | String | | Client | N | Y | application/vnd.dmaap-dr.feed |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| publisher | Publisher identity as passed | Header | String | <=8 | DR | N | Y | username |
+| | in X-DMAAP-DR-ON-BEHALF-OF at | | | | | | | |
+| | creation time | | | | | | | |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| Authorization | The user / AppId to be | Header | String | | Client | N | Y if AAF | dcae@dcae.onap.org:{password} |
+| | authorized by the AAF CADI | | | | | | enabled | |
+| | framework | | | | | | | |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| X-EXCLUDE-AAF | To determine if the feed to | Header | Boolean | | Client | N | Y if AAF | * true (for legacy feed) |
+| | create is legacy or AAF | | | | | | enabled | * false (for AAF feed) |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+| Links | URLs related to this feed | Body |`Feed Links Obj`_ | | DR | N | N | |
++----------------------+--------------------------------+------------+------------------+--------+--------+------------+----------+-------------------------------+
+
+**Response Codes**
+
+* Success:
+ 200
+
+* Error:
+ See `Response Codes`_
+
+**Consumes**
+ application/json
+
+**Produces**
+ application/json
+
+
+**Sample Request**
+
+.. code-block:: bash
+
+ 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}
+
+**Sample Body**
+
+.. code-block:: json
+
+ {
+ "name": "ONAP Data Feed",
+ "version": "v1.0",
+ "authorization": {
+ "classification": "unclassified",
+ "endpoint_addrs": [
+ ],
+ "endpoint_ids": [
+ {
+ "id": "dradmin",
+ "password": "dradmin"
+ }
+ ]
+ }
+ }
+
+**Sample Response**
+
+.. code-block:: json
+
+ {
+ "suspend": false,
+ "groupid": 0,
+ "description": "",
+ "version": "v1.0",
+ "authorization": {
+ "endpoint_addrs": [
+ ],
+ "classification": "unclassified",
+ "endpoint_ids": [
+ {
+ "password": "dradmin",
+ "id": "dradmin"
+ },
+ {
+ "password": "demo123456!",
+ "id": "onap"
+ }
+ ]
+ },
+ "name": "ONAP Data Feed",
+ "business_description": "",
+ "aaf_instance": "legacy",
+ "publisher": "dradmin",
+ "links": {
+ "subscribe": "https://dmaap-dr-prov/subscribe/1",
+ "log": "https://dmaap-dr-prov/feedlog/1",
+ "publish": "https://dmaap-dr-prov/publish/1",
+ "self": "https://dmaap-dr-prov/feed/1"
+ }
+ }
+
+
+
+Update a Feed
+-------------
+
+**Description**: Update a feed with new parameters.
+
+.. code-block:: bash
+
+ PUT /feed/{feedId}
+
+
+**Request Parameters:**
+
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| Field | Description | Param Type | Data Type | MaxLen | Required |
++========================+=================================+=============+===============+============+=============+
+| name | Feed name | Body | String | <=20 | Y |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| description | Feed description | Body | String | <=256 | N |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| business description | Business description | Body | String | <=256 | N |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| authorization | Information for authorizing | Body |`Auth Object`_ | | Y |
+| | publishing requests | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| suspend | Set to true if the feed is in | Body | Boolean | | N |
+| | the suspended state | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| group-id | Auth group for feed management | Body | Integer | | N |
+| | | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| Content-type | To specify type of message | Header | String | | Y |
+| | (feed,subscriber,publisher) | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| publisher | Publisher identity as passed | Header | String | <=8 | Y |
+| | in X-DMAAP-DR-ON-BEHALF-OF at | | | | |
+| | creation time | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| Authorization | The user / AppId to be | Header | String | | Y if AAF |
+| | authorized by the AAF CADI | | | | enabled |
+| | framework | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+
+**Response Codes**
+
+* Success:
+ 200
+
+* Error:
+ See `Response Codes`_
+
+**Consumes**
+ application/json
+
+**Produces**
+ application/json
+
+
+**Sample Request**
+
+.. code-block:: bash
+
+ 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}
+
+**Sample Body**
+
+.. code-block:: json
+
+ {
+ "name": "ONAP Data Feed",
+ "business_description": "Updated ONAP Feed",
+ "groupid": 33,
+ "description": "Updated ONAP Feed",
+ "authorization": {
+ "endpoint_addrs": [
+ "10.1.2.3"
+ ],
+ "classification": "unclassified",
+ "endpoint_ids": [
+ {
+ "password": "dradmin",
+ "id": "dradmin"
+ },
+ {
+ "password": "demo123456!",
+ "id": "onap"
+ }
+ ]
+ }
+ }
+
+**Sample Response**
+
+.. code-block:: json
+
+ {
+ "suspend": false,
+ "groupid": 33,
+ "description": "Updated ONAP Feed",
+ "authorization": {
+ "endpoint_addrs": [
+ "10.1.2.3"
+ ],
+ "classification": "unclassified",
+ "endpoint_ids": [
+ {
+ "password": "dradmin",
+ "id": "dradmin"
+ },
+ {
+ "password": "demo123456!",
+ "id": "onap"
+ }
+ ]
+ },
+ "name": "ONAP Data Feed1",
+ "business_description": "Updated ONAP Feed",
+ "aaf_instance": "legacy",
+ "publisher": "dradmin",
+ "links": {
+ "subscribe": "https://dmaap-dr-prov/subscribe/1",
+ "log": "https://dmaap-dr-prov/feedlog/1",
+ "publish": "https://dmaap-dr-prov/publish/1",
+ "self": "https://dmaap-dr-prov/feed/1"
+ }
+ }
+
+
+
+Get a Feed
+----------
+
+**Description**: Retrieves a representation of the specified feed.
+
+.. code-block:: bash
+
+ GET /feed/{feedId}
+
+
+**Request Parameters:**
+
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| Field | Description | Param Type | Data Type | MaxLen | Required |
++========================+=================================+=============+===============+============+=============+
+| publisher | Publisher identity as passed | Header | String | <=8 | Y |
+| | in X-DMAAP-DR-ON-BEHALF-OF at | | | | |
+| | creation time | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| Authorization | The user / AppId to be | Header | String | | Y if AAF |
+| | authorized by the AAF CADI | | | | enabled |
+| | framework | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+
+**Response Codes**
+
+* Success:
+ 200
+
+* Error:
+ See `Response Codes`_
+
+**Produces**
+ application/json
+
+**Sample Request**
+
+.. code-block:: bash
+
+ curl -k -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}
+
+**Sample Response**
+
+.. code-block:: json
+
+ {
+ "suspend": false,
+ "groupid": 33,
+ "description": "Updated ONAP Feed",
+ "version": "v1.0",
+ "authorization": {
+ "endpoint_addrs": [
+ "10.1.2.3",
+ "173.2.33.4"
+ ],
+ "classification": "unclassified",
+ "endpoint_ids": [
+ {
+ "password": "dradmin",
+ "id": "dradmin"
+ },
+ {
+ "password": "demo123456!",
+ "id": "onap"
+ }
+ ]
+ },
+ "name": "ONAP Data Feed",
+ "business_description": "Updated ONAP Feed",
+ "aaf_instance": "legacy",
+ "publisher": "dradmin",
+ "links": {
+ "subscribe": "https://dmaap-dr-prov/subscribe/1",
+ "log": "https://dmaap-dr-prov/feedlog/1",
+ "publish": "https://dmaap-dr-prov/publish/1",
+ "self": "https://dmaap-dr-prov/feed/1"
+ }
+ }
+
+
+Delete a Feed
+-------------
+
+**Description**: Deletes a specified feed
+
+.. code-block:: bash
+
+ DELETE /feed/{feedId}
+
+
+**Request Parameters:**
+
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| Field | Description | Param Type | Data Type | MaxLen | Required |
++========================+=================================+=============+===============+============+=============+
+| publisher | Publisher identity as passed | Header | String | <=8 | Y |
+| | in X-DMAAP-DR-ON-BEHALF-OF at | | | | |
+| | creation time | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+| Authorization | The user / AppId to be | Header | String | | Y if AAF |
+| | authorized by the AAF CADI | | | | enabled |
+| | framework | | | | |
++------------------------+---------------------------------+-------------+---------------+------------+-------------+
+
+**Response Codes**
+
+* Success:
+ 204
+
+* Error:
+ See `Response Codes`_
+
+**Sample Request**
+
+.. code-block:: bash
+
+ curl -k -X DELETE -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}
+
+
+Subscribe to Feed
+-----------------
+
+**Description**: Subscribes to a created feed to receive files published to that feed.
+
+.. code-block:: bash
+
+ POST /subscribe/{feedId}
+
+
+**Request Parameters:**
+
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| Field | Description | Param Type | Data Type | MaxLen | Set By | Updatable? | Required | Valid/Example Values |
++=================+=================================+===============+=================+========+========+============+==========+======================================+
+| feedId | ID for the feed you are | Path | String | | Client | N | Y | 1 |
+| | subscribing to | | | | | | | |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| delivery | Address and credentials for | Body | `Del Object`_ | | Client | Y | Y | |
+| | delivery | | | | | | | |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| follow_redirect | Set to true if feed redirection | Body | Boolean | | Client | Y | N | * true |
+| | is expected | | | | | | | * false (default) |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| metadata_only | Set to true if subscription is | Body | Boolean | | Client | Y | Y | * true |
+| | to receive per-file metadata | | | | | | | * false |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| suspend | Set to true if the subscription | Body | Boolean | | Client | Y | N | * true |
+| | is in the suspended state | | | | | | | * false (default) |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| decompress | Set to true if the data is to | Body | Boolean | | Client | Y | N | * true |
+| | be decompressed for subscriber | | | | | | | * false (default) |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| group-id | Auth group for sub management | Body | Integer | | Client | Y | Y | 22 |
+| | | | | | | | | |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| aaf_instance | The instance passed to aaf | Body | String | <=256 | Client | N | N | * legacy (default) |
+| | during permission checks | | | | | | | |
+| | | | | | | | | |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| Content-type | To specify type of message | Header | String | | Client | N | Y | application/vnd.dmaap-dr.subscription|
+| | (feed,subscriber,publisher) | | | | | | | |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| subscriber | Subscriber identity as passed | Header | String | <=8 | DR | N | Y | username |
+| | in X-DMAAP-DR-ON-BEHALF-OF at | | | | | | | |
+| | creation time | | | | | | | |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| Authorization | The user / AppId to be | Header | String | | Client | N | Y if AAF | dcae@dcae.onap.org:{password} |
+| | authorized by the AAF CADI | | | | | | enabled | |
+| | framework | | | | | | | |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| X-EXCLUDE-AAF | To determine if the feed to | Header | Boolean | | Client | N | Y if AAF | * true (for legacy feed) |
+| | create is legacy or AAF | | | | | | enabled | * false (for AAF feed) |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+| Links | URLs related to this | Body |`Sub Links Obj`_ | | DR | N | N | |
+| | subscription | | | | | | | |
++-----------------+---------------------------------+---------------+-----------------+--------+--------+------------+----------+--------------------------------------+
+
+**Response Codes**
+
+* Success:
+ 201
+
+* Error:
+ See `Response Codes`_
+
+**Consumes**
+ application/json
+
+**Produces**
+ application/json
+
+
+**Sample Request**
+
+.. code-block:: bash
+
+ 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}
+
+**Sample Body**
+
+.. code-block:: json
+
+ {
+ "delivery": {
+ "url": "http://dmaap-dr-subscriber:7070/",
+ "user": "LOGIN",
+ "password": "PASSWORD",
+ "use100": true
+ },
+ "metadataOnly": false,
+ "groupid": 22,
+ "follow_redirect": true,
+ "suspend": false,
+ "decompress": true
+ }
+
+**Sample Response**
+
+.. code-block:: json
+
+ {
+ "suspend": false,
+ "delivery": {
+ "use100": true,
+ "password": "PASSWORD",
+ "user": "LOGIN",
+ "url": "http://dmaap-dr-subscriber:7070/"
+ },
+ "subscriber": "onap",
+ "groupid": 1,
+ "metadataOnly": false,
+ "follow_redirect": true,
+ "decompress": true,
+ "aaf_instance": "legacy",
+ "links": {
+ "feed": "https://dmaap-dr-prov/feed/1",
+ "log": "https://dmaap-dr-prov/sublog/1",
+ "self": "https://dmaap-dr-prov/subs/1"
+ },
+ "created_date": 1553707279509
+ }
+
+
+
+Update subscription
+-------------------
+
+**Description**: Update a subscription to a feed.
+
+.. code-block:: bash
+
+ PUT /subs/{subId}
+
+
+**Request Parameters:**
+
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| Field | Description | Param Type | Data Type | MaxLen | Required |
++=================+=================================+==============+===============+========+=============+
+| subId | ID for the subscription you are | Path | String | | Y |
+| | updating | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| delivery | Address and credentials for | Body | `Del Object`_ | | Y |
+| | delivery | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| follow_redirect | Set to true if feed redirection | Body | Boolean | | N |
+| | is expected | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| metadata_only | Set to true if subscription is | Body | Boolean | | Y |
+| | to receive per-file metadata | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| suspend | Set to true if the subscription | Body | Boolean | | N |
+| | is in the suspended state | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| decompress | Set to true if the data is to | Body | Boolean | | N |
+| | be decompressed for subscriber | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| group-id | Auth group for sub management | Body | Integer | | Y |
+| | | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| Content-type | To specify type of message | Header | String | | Y |
+| | (feed,subscriber,publisher) | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| subscriber | Subscriber identity as passed | Header | String | <=8 | Y |
+| | in X-DMAAP-DR-ON-BEHALF-OF at | | | | |
+| | creation time | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| Authorization | The user / AppId to be | Header | String | | Y if AAF |
+| | authorized by the AAF CADI | | | | enabled |
+| | framework | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| X-EXCLUDE-AAF | To determine if the feed to | Header | Boolean | | Y if AAF |
+| | create is legacy or AAF | | | | enabled |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+
+**Response Codes**
+
+* Success:
+ 200
+
+* Error:
+ See `Response Codes`_
+
+**Consumes**
+ application/json
+
+**Produces**
+ application/json
+
+**Sample Request**
+
+.. code-block:: bash
+
+ 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}
+
+**Sample Body**
+
+.. code-block:: json
+
+ {
+ "delivery": {
+ "url": "http://dmaap-dr-subscriber:7070/",
+ "user": "NEW_LOGIN",
+ "password": "NEW_PASSWORD",
+ "use100": false
+ },
+ "metadataOnly": true,
+ "groupid": 67,
+ "follow_redirect": false,
+ "decompress": false
+ }
+
+
+**Sample Response**
+
+.. code-block:: json
+
+ {
+ "suspend": false,
+ "delivery": {
+ "use100": false,
+ "password": "NEW_PASSWORD",
+ "user": "NEW_LOGIN",
+ "url": "http://dmaap-dr-subscriber:7070/"
+ },
+ "subscriber": "onap",
+ "groupid": 67,
+ "metadataOnly": true,
+ "follow_redirect": false,
+ "decompress": false,
+ "aaf_instance": "legacy",
+ "links": {
+ "feed": "https://dmaap-dr-prov/feed/1",
+ "log": "https://dmaap-dr-prov/sublog/1",
+ "self": "https://dmaap-dr-prov/subs/1"
+ },
+ "created_date": 1553714446614
+ }
+
+
+
+Get a Subscription
+------------------
+
+**Description**: Retrieves a representation of the specified subscription.
+
+.. code-block:: bash
+
+ GET /subs/{subId}
+
+
+**Request Parameters:**
+
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| Field | Description | Param Type | Data Type | MaxLen | Required |
++=================+=================================+==============+===============+========+=============+
+| subscriber | Subscriber identity as passed | Header | String | <=8 | Y |
+| | in X-DMAAP-DR-ON-BEHALF-OF at | | | | |
+| | creation time | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| Authorization | The user / AppId to be | Header | String | | Y if AAF |
+| | authorized by the AAF CADI | | | | enabled |
+| | framework | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+
+**Response Codes**
+
+* Success:
+ 200
+
+* Error:
+ See `Response Codes`_
+
+**Produces**
+ application/json
+
+**Sample Request**
+
+.. code-block:: bash
+
+ curl -k -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}
+
+**Sample Response**
+
+.. code-block:: json
+
+ {
+ "suspend": false,
+ "delivery": {
+ "use100": false,
+ "password": "NEW_PASSWORD",
+ "user": "NEW_LOGIN",
+ "url": "http://dmaap-dr-subscriber:7070/"
+ },
+ "subscriber": "onap",
+ "groupid": 67,
+ "metadataOnly": true,
+ "privilegedSubscriber": false,
+ "follow_redirect": false,
+ "decompress": false,
+ "aaf_instance": "legacy",
+ "links": {
+ "feed": "https://dmaap-dr-prov/feed/2",
+ "log": "https://dmaap-dr-prov/sublog/6",
+ "self": "https://dmaap-dr-prov/subs/6"
+ }
+ }
+
+
+
+Delete a subscription
+---------------------
+
+**Description**: Deletes a specified subscription
+
+.. code-block:: bash
+
+ DELETE /subs/{subId}
+
+
+**Request Parameters:**
+
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| Field | Description | Param Type | Data Type | MaxLen | Required |
++=================+=================================+==============+===============+========+=============+
+| subscriber | Subscriber identity as passed | Header | String | <=8 | Y |
+| | in X-DMAAP-DR-ON-BEHALF-OF at | | | | |
+| | creation time | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+| Authorization | The user / AppId to be | Header | String | | Y if AAF |
+| | authorized by the AAF CADI | | | | enabled |
+| | framework | | | | |
++-----------------+---------------------------------+--------------+---------------+--------+-------------+
+
+**Response Codes**
+
+* Success:
+ 204
+
+* Error:
+ See `Response Codes`_
+
+**Sample Request**
+
+.. code-block:: bash
+
+ curl -k -X DELETE -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}
+
+
+Publish to Feed
+---------------
+
+**Description**: Publish data to a given feed
+
+.. code-block:: bash
+
+ PUT /publish/{feedId}/{fileId}
+
+
+**Request parameters**
+
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+
+| Name | Description | Param Type | Data Type | MaxLen | Required | 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 | | Y | application/octet-stream |
+| | format | | | | | |
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+
+| X-DMAAP-DR-META | Metadata for the file. Accepts | Header | String | <=4096 | N | '{“compressionType”: ”gzip”, |
+| | only non nested json objects | | | | | ”id”: 1234, |
+| | of the following type: | | | | | “transferred”: true, |
+| | | | | | | “size”: null }’ |
+| | * Numbers | | | | | |
+| | * Strings | | | | | |
+| | * Lowercase boolean | | | | | |
+| | * null | | | | | |
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+
+| Authorization | An `EID Object`_ with publish | Header | String | | Y | * (legacy Feed) dradmin:dradmin |
+| | permissions. | | | | | * (AAF Feed) dcae@dcae.onap.org:{password}|
+| | If AAF CADI is enabled, use a | | | | | |
+| | valid AAF user/AppId instead. | | | | | |
++------------------------+---------------------------------+------------------+------------+--------------+-------------+-------------------------------------------+
+
+**Response Codes**
+
+* Success:
+ 204
+
+* Error:
+ See `Response Codes`_
+
+**Sample Request**
+
+.. code-block:: bash
+
+ 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}
+
+
+
+Delete/Retract a Published file
+-------------------------------
+
+**Description**: Deletes/retracts a specified published file
+
+.. code-block:: bash
+
+ DELETE /publish/{feedId}/{fileId}
+
+
+**Request Parameters:**
+
++-----------------+---------------------------------+--------------+---------------+------------+-------------------------------------------+
+| Field | Description | Param Type | Data Type | Required | Valid/Example Values |
++=================+=================================+==============+===============+============+===========================================+
+| Authorization | An `EID Object`_ with publish | Header | String | Y | * (legacy Feed) dradmin:dradmin |
+| | permissions. | | | | * (AAF Feed) dcae@dcae.onap.org:{password}|
+| | If AAF CADI is enabled, use a | | | | |
+| | valid AAF user/AppId instead. | | | | |
++-----------------+---------------------------------+--------------+---------------+------------+-------------------------------------------+
+| feedId | ID of the feed that was | Path | String | Y | |
+| | publishing to | | | | |
++-----------------+---------------------------------+--------------+---------------+------------+-------------------------------------------+
+| fileId | Name of the file when it was | Path | String | Y | |
+| | published to subscribers | | | | |
++-----------------+---------------------------------+--------------+---------------+------------+-------------------------------------------+
+
+**Response Codes**
+
+* Success:
+ 204
+
+* Error:
+ See `Response Codes`_
+
+
+**Sample Request**
+
+.. code-block:: bash
+
+ curl -k -X DELETE --user {user}:{password} --location-trusted https://{host}:{port}/publish/{feedId}/{fileId}
+
+
+
+Feed logging
+------------
+
+**Description**: View logging information for specified feeds, which can be narrowed down with further parameters
+
+.. code-block:: bash
+
+ GET /feedlog/{feedId}?{queryParam}
+
+
+**Request parameters**
+
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+
+| Name | Description | Param Type | Data Type | Required | Valid/Example Values |
++========================+=================================+==================+============+=============+======================================+
+| feedId | Id of the feed you want | Path | String | Y | 1 |
+| | logs for | | | | |
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+
+| 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-DMAAP-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 | | | | |
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+
+| filename | Select published records with | Path | String | N | |
+| | the specified filename | | | | |
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+
+
+**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-DMAAP-DR-PUBLISH-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 |
++------------------------+----------------------------------------------+
+| filename | File name associated with a publish record |
++------------------------+----------------------------------------------+
+
+**Response Codes**
+
+* Success:
+ 200
+
+* Error:
+ See `Response Codes`_
+
+**Produces**
+ application/json
+
+
+**Sample Request**
+
+.. code-block:: bash
+
+ curl -k https://{host}:{port}/feedlog/{feedId}?statusCode=204``
+
+**Sample Response**
+
+.. code-block:: json
+
+ [
+ {
+ "statusCode": 204,
+ "publishId": "1553715307322.dmaap-dr-node",
+ "requestURI": "https://dmaap-dr-node/publish/1/hello",
+ "sourceIP": "172.19.0.1",
+ "method": "PUT",
+ "contentType": "application/octet-stream",
+ "endpointId": "dradmin",
+ "type": "pub",
+ "date": "2019-03-27T19:35:07.324Z",
+ "contentLength": 14,
+ "fileName": "hello"
+ },
+ {
+ "statusCode": 204,
+ "publishId": "1553715312071.dmaap-dr-node",
+ "requestURI": "https://dmaap-dr-node/publish/2/hello",
+ "sourceIP": "172.19.0.1",
+ "method": "PUT",
+ "contentType": "application/octet-stream",
+ "endpointId": "onap",
+ "type": "pub",
+ "date": "2019-03-27T19:35:12.072Z",
+ "contentLength": 14,
+ "fileName": "hello2"
+ }
+ ]
+
+
+Subscription logging
+--------------------
+
+**Description**: View logging information for specified subscriptions, which can be narrowed down with further parameters
+
+.. code-block:: bash
+
+ GET /sublog/{subId}?{queryParam}
+
+
+**Request parameters**
+
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+
+| Name | Description | Param Type | Data Type | Required | Valid/Example Values |
++========================+=================================+==================+============+=============+======================================+
+| subId | Id of the subscription you want | Path | String | Y | 1 |
+| | logs for | | | | |
++------------------------+---------------------------------+------------------+------------+-------------+--------------------------------------+
+| 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-DMAAP-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-DMAAP-DR-PUBLISH-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 Codes**
+
+* Success:
+ 200
+
+* Error:
+ See `Response Codes`_
+
+**Produces**
+ application/json
+
+**Sample Request**
+
+.. code-block:: bash
+
+ curl -k https://{host}:{port}/sublog/{subId}?statusCode=204
+
+**Sample Response**
+
+.. code-block:: json
+
+ [
+ {
+ "statusCode": 204,
+ "publishId": "1553715307322.dmaap-dr-node",
+ "requestURI": "https://dmaap-dr-node/publish/1/hello",
+ "sourceIP": "172.19.0.1",
+ "method": "PUT",
+ "contentType": "application/octet-stream",
+ "endpointId": "dradmin",
+ "type": "pub",
+ "date": "2019-03-27T19:35:07.324Z",
+ "contentLength": 14,
+ "fileName": "hello"
+ },
+ {
+ "statusCode": 204,
+ "publishId": "1553715312071.dmaap-dr-node",
+ "requestURI": "https://dmaap-dr-node/publish/2/hello",
+ "sourceIP": "172.19.0.1",
+ "method": "PUT",
+ "contentType": "application/octet-stream",
+ "endpointId": "onap",
+ "type": "pub",
+ "date": "2019-03-27T19:35:12.072Z",
+ "contentLength": 14,
+ "fileName": "hello2"
+ }
+ ]
+
+
+**Feed Authorization Object**
+
+.. _`Auth Object`:
+
++----------------+-----------------+--------------------------------+------------------------------+
+| Field | Type | Description | Restrictions |
++================+=================+================================+==============================+
+| classification | string | An indicator of the feed’s | Length <=32 |
+| | | data security classification | |
++----------------+-----------------+--------------------------------+------------------------------+
+| endpoint_ids |`EID Object`_ [] | Array of objects defining the | At least 1 id in the array |
+| | | identities that are allowed | |
+| | | to publish to this feed | |
++----------------+-----------------+--------------------------------+------------------------------+
+| endpoint_addrs | string[] | Array of IP addresses or IP | Each string must be a valid |
+| | | subnetwork addresses that | textual representation of |
+| | | are allowed to publish to this | IPv4 or IPv6 host address or |
+| | | feed; an empty array indicates | subnetwork address. |
+| | | that publish requests are | |
+| | | permitted from any IP address | |
++----------------+-----------------+--------------------------------+------------------------------+
+
+
+**Endpoint Identity Object**
+
+.. _`EID Object`:
+
++----------+--------+--------------------------+--------------+
+| Field | Type | Description | Restrictions |
++==========+========+==========================+==============+
+| id | string | Publishing endpoint | Length <= 20 |
+| | | identifier | |
++----------+--------+--------------------------+--------------+
+| password | string | Password associated with | Length <= 32 |
+| | | id | |
++----------+--------+--------------------------+--------------+
+
+
+**Feed Links Object**
+
+.. _`Feed Links Obj`:
+
++-----------+---------------------------------------------------+----------------+
+| Field | Description | Symbolic Name |
++===========+===================================================+================+
+| self | URL pointing to this feed, used for updating and | <feedURL> |
+| | deleting the feed. | |
++-----------+---------------------------------------------------+----------------+
+| publish | URL for publishing requests for this feed | <publishURL> |
++-----------+---------------------------------------------------+----------------+
+| subscribe | URL for subscribing to this feed | <subscribeURL> |
++-----------+---------------------------------------------------+----------------+
+| log | URL for accessing log information about this feed | <feedLogURL> |
++-----------+---------------------------------------------------+----------------+
+
+
+**Delivery Object**
+
+.. _`Del Object`:
+
++----------+---------+-----------------------------------------------+-------------------------------------+
+| Field | Type | Description | Restrictions |
++==========+=========+===============================================+=====================================+
+| url | string | URL to which deliveries for this subscription | length <= 256 |
+| | | should be directed Valid HTTPS URL | |
++----------+---------+-----------------------------------------------+-------------------------------------+
+| user | string | User ID to be passed in the Authorization | Length <= 20 |
+| | | header when deliveries are made | |
++----------+---------+-----------------------------------------------+-------------------------------------+
+| password | string | Password to be passed in the Authorization | Length <= 32 |
+| | | header when deliveries are made | |
++----------+---------+-----------------------------------------------+-------------------------------------+
+| use100 | boolean | Flag indicating whether the DR should use | Must be: true to use 100-continue |
+| | | the HTTP 100-continue feature | |
+| | | | false to disable using 100-continue |
++----------+---------+-----------------------------------------------+-------------------------------------+
+
+
+**Sub Links Object**
+
+.. _`Sub Links Obj`:
+
++-----------+---------------------------------------------------+-------------------+
+| Field | Description | Symbolic Name |
++===========+===================================================+===================+
+| self | URL pointing to this subscription, used for | <subscriptionURL> |
+| | updating and deleting the subscription. | |
++-----------+---------------------------------------------------+-------------------+
+| feed | URL of the feed to which this subscription | <feedURL> |
+| | applies; the same URL as the <feedURL> in the | |
+| | representation of the feed | |
++-----------+---------------------------------------------------+-------------------+
+| log | URL for accessing log information about this | <subLogURL> |
+| | subscription | |
++-----------+---------------------------------------------------+-------------------+
+
+
+**Response/Error Codes**
+
+.. _`Response Codes`:
+
++------------------------+-------------------------------------------+
+| Response statusCode | Response Description |
++========================+===========================================+
+| 200 to 299 | Success Response |
++------------------------+-------------------------------------------+
+| 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 | Forbidden - 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-DMAAP-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. |
++------------------------+-------------------------------------------+
+| 406 | Not Acceptable - The request has an Accept|
+| | header indicating that the requester will |
+| | not accept a response with |
+| | application/vnd.dmaap-dr.log-list content.|
++------------------------+-------------------------------------------+
+| 415 | Unsupported Media Type - The media type in|
+| | the requests 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 |
++------------------------+-------------------------------------------+ \ No newline at end of file
diff --git a/docs/data-router/release-notes.rst b/docs/release-notes.rst
index b879c6bc..12014e69 100644
--- a/docs/data-router/release-notes.rst
+++ b/docs/release-notes.rst
@@ -1,12 +1,16 @@
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
+.. toctree::
+ :maxdepth: 2
+
Release-notes
==============
-Version: 1.0.3 (Casablanca)
+
+Version: 2.0.1 (Dublin)
---------------------------
-:Release Date: 2018-11-30
+:Release Date: 2019-02-28
The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and
subscriptions.
@@ -16,24 +20,22 @@ New Features:
+--------------+------------------------------------------------------------------+
| JIRA ID | Description |
+==============+==================================================================+
-| DMAAP-20 | REST api for publishing data to DR |
-+--------------+------------------------------------------------------------------+
-| DMAAP-21 | REST api for subscribing to data in DR |
+| DMAAP-988 | Update to new oparent |
+--------------+------------------------------------------------------------------+
Bug Fixes:
-+----------------+---------------------------------------------------------------------------------------------------------------------------------+
-| JIRA ID | Description |
-+================+=================================================================================================================================+
-| DMAAP-877 | DR Logging API not storing Feed/Sub data |
-+----------------+---------------------------------------------------------------------------------------------------------------------------------+
-| DMAAP-850 | Second subscriber not receiving the published file |
-+----------------+---------------------------------------------------------------------------------------------------------------------------------+
-| DMAAP-596 | DR - datarouter-prov container fails to come up successfully |
-+----------------+---------------------------------------------------------------------------------------------------------------------------------+
-| DMAAP-565 | Incorrect nexusUrl parameter in datarouter pom files |
-+----------------+---------------------------------------------------------------------------------------------------------------------------------+
++----------------+--------------------------------------------------------------------------------------------------+
+| JIRA ID | Description |
++================+==================================================================================================+
+| DMAAP-964 | DMAAP deployment failures starting 20190115 on casablanca branch |
++----------------+--------------------------------------------------------------------------------------------------+
+| DMAAP-1047 | Data Router docker version missing explicit version number |
++----------------+--------------------------------------------------------------------------------------------------+
+| DMAAP-1048 | [DR] AAF certs expired on dmaap-dr-prov and dmaap-dr-node |
++----------------+--------------------------------------------------------------------------------------------------+
+| DMAAP-1064 | [DR] Update datarouter POM version following AAF cert updates |
++----------------+--------------------------------------------------------------------------------------------------+
Known Issues
N/A
@@ -56,6 +58,7 @@ N/A
Other
N/A
+
Version: 1.0.8 (Casablanca)
---------------------------
@@ -101,10 +104,10 @@ Other
N/A
-Version: 2.0.1 (Dublin)
+Version: 1.0.3 (Casablanca)
---------------------------
-:Release Date: 2019-02-28
+:Release Date: 2018-11-30
The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and
subscriptions.
@@ -114,22 +117,24 @@ New Features:
+--------------+------------------------------------------------------------------+
| JIRA ID | Description |
+==============+==================================================================+
-| DMAAP-988 | Update to new oparent |
+| DMAAP-20 | REST api for publishing data to DR |
++--------------+------------------------------------------------------------------+
+| DMAAP-21 | REST api for subscribing to data in DR |
+--------------+------------------------------------------------------------------+
Bug Fixes:
-+----------------+--------------------------------------------------------------------------------------------------+
-| JIRA ID | Description |
-+================+==================================================================================================+
-| DMAAP-964 | DMAAP deployment failures starting 20190115 on casablanca branch |
-+----------------+--------------------------------------------------------------------------------------------------+
-| DMAAP-1047 | Data Router docker version missing explicit version number |
-+----------------+--------------------------------------------------------------------------------------------------+
-| DMAAP-1048 | [DR] AAF certs expired on dmaap-dr-prov and dmaap-dr-node |
-+----------------+--------------------------------------------------------------------------------------------------+
-| DMAAP-1064 | [DR] Update datarouter POM version following AAF cert updates |
-+----------------+--------------------------------------------------------------------------------------------------+
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
+| JIRA ID | Description |
++================+=================================================================================================================================+
+| DMAAP-877 | DR Logging API not storing Feed/Sub data |
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
+| DMAAP-850 | Second subscriber not receiving the published file |
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
+| DMAAP-596 | DR - datarouter-prov container fails to come up successfully |
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
+| DMAAP-565 | Incorrect nexusUrl parameter in datarouter pom files |
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
Known Issues
N/A
@@ -150,4 +155,4 @@ Deprecation Notes
N/A
Other
-N/A \ No newline at end of file
+N/A