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