From f860d6dfd31f59b79c70912ca2130b8d53a1e3c5 Mon Sep 17 00:00:00 2001 From: Sripad Date: Mon, 12 Feb 2018 17:58:20 +0000 Subject: [PATCH] Update index documentation file for Datarouter Issue-ID: DMAAP-109 Change-Id: I3db04ab9aa21d830c5b2cbe2adf12c764ff0288a Signed-off-by: Sai Gandham --- docs/data-router/data-router.rst | 73 ++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 15 +++++++++ 2 files changed, 88 insertions(+) create mode 100644 docs/data-router/data-router.rst create mode 100644 docs/index.rst diff --git a/docs/data-router/data-router.rst b/docs/data-router/data-router.rst new file mode 100644 index 00000000..16f44ba3 --- /dev/null +++ b/docs/data-router/data-router.rst @@ -0,0 +1,73 @@ +============================================ +Data Router (DR) API Guide +============================================ +Introduction +------------------ + +The DataRouter(DR)provisioning API is an HTTPS-based,REST-like API for creating and managing DR feeds and subscriptions. The Data Routing System project is intended to provide a common framework by which data producers can make data available to data consumers and a way for potential consumers to find feeds with the data they require. + + +HTTP Service APIs +------------------ + +DMaaP Message Router utilizes an HTTP REST API to service all transactions. HTTP and REST standards are followed so +clients as varied as CURL, Java applications and even Web Browsers will +work to interact with the Data Router. + +General HTTP Requirements +========================= + +A DMaaP Message Router transactions consists of 4 distinct segments, +HTTP URL, HTTP Header, HTTP Body (POST/PUT) and HTTP Response. The general +considerations for each segment are as follows and are required for each +of the specific transactions described in this section. + +HTTP URL +======== + +http[s]://serverBaseURL/{resourcePath} + + +HTTP Header +=========== + +Specifies HTTP Headers, such as Content-Type, that define the parameters +of the HTTP Transaction + +HTTP Body +========= + +The HTTP Body contains the topic content when Publishing or Consuming. +The Body may contain topic messages in several formats (like below) but +it must be noted, that, except in very specific circumstances, messages +are not inspected for content. + +Create a Feed +----------- + +**Description**:Creates the feed + +Sample Request +============== + +curl -v -X POST -H "Content-Type : application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF: rs873m" --data-ascii @/opt/app/datartr/addFeed3.txt --post301 --location-trusted -k https://prov.datarouternew.com:8443 + +Subscribe to Feed +----------- + +curl -v -X POST -H "Content-Type: application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF: rs873m" --data-ascii @/opt/app/datartr/addSubscriber.txt --post301 --location-trusted -k https://prov.datarouternew.com:8443/subscribe/1 + +Sample Request +============== + +POST http(s)://{HOST:PORT}/events/{topicname} + +Publish to feed +----------- + +**Description**:publish the feed + +Sample Request +============== + +curl -v -X PUT --user rs873m:rs873m -H "Content-Type: application/octet-stream" --data-binary @/opt/app/datartr/addFeed3.txt --post301 --location-trusted -k https://prov.datarouternew.com:8443/publish/1/test1 diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..77b53fb4 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,15 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright © 2017 AT&T Intellectual Property. All rights reserved. + +Message Router (MR) +==================== + + + +.. toctree:: + :maxdepth: 2 + + data-router/data-router + + -- 2.16.6