remove message filtering from documentation
[dmaap/messagerouter/messageservice.git] / docs / offeredapis / offeredapis.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 Offered APIs
5 ~~~~~~~~~~~~
6
7 .. toctree::
8     :maxdepth: 3
9
10 DMaaP Message Router utilizes an HTTP REST API to service all Publish
11 and Consume transactions. HTTP and REST standards are followed so
12 clients as varied as CURL, Java applications and even Web Browsers will
13 work to interact with Message Router.Message Router uses AAF for user's
14 authentication and authorization.
15
16 General HTTP Requirements
17 -------------------------
18
19 A DMaaP Message Router transactions consists of 4 distinct segments,
20 HTTP URL, HTTP Header, HTTP Body (POST) and HTTP Response. The general
21 considerations for each segment are as follows and are required for each
22 of the specific transactions described in this section.
23
24 HTTP URL
25 -------
26
27 http[s]://serverBaseURL{/routing}{resourcePath}
28
29 - The serverBaseURL points to DMaaP Message Router host/port that will service the request.
30
31 - The resourcePath specifies the specific service, or Topic, that the client is attempting to reach
32
33 HTTP Header
34 -----------
35
36 Specifies HTTP Headers, such as Content-Type, that define the parameters
37 of the HTTP Transaction
38
39 HTTP Body
40 ---------
41
42 The HTTP Body contains the topic content when Publishing or Consuming.
43 The Body may contain topic messages in several formats (like below) but
44 it must be noted, that, except in very specific circumstances, messages
45 are not inspected for content.
46
47
48 +-------------------------+-----------------------------------------------------------------------------------------------------------------+
49 | Content-Type            |  Description                                                                                                    |
50 +=========================+=================================================================================================================+
51 | text/plain              | Each line in the POST body is treated as a separate message. No partition key is specified, and therefore no    |
52 |                         | order is guaranteed. This format is mainly for test, as messages are highly likely to be re-ordered when        |
53 |                         | delivered through the Kafka cluster.                                                                            |
54 +-------------------------+-----------------------------------------------------------------------------------------------------------------+
55 | application/json        | The payload maybe a single JSON object or a JSON array of JSON objects. Each object is handled as an individual |
56 |                         | message..Note that use of this format may result in equivalent but altered JSON objects sent to consumers.      |
57 |                         | That's because MR uses a standard JSON parser to read each object into memory before pushing the object to the  |
58 |                         | Kafka system. At that point, the JSON object is re-written from the in-memory object. This can result in        |
59 |                         | re-ordered fields or changes in whitespace. If you want to preseve JSON objects exactly,                        |
60 |                         | use application/cambria. Recommended to follow the JSON format.                                                 |
61 +-------------------------+-----------------------------------------------------------------------------------------------------------------+
62
63 Publishers
64 -----------
65
66 **Description**:Publishes data to Kafka server on the topic mentioned in the URL.
67 Messages will be in the request body
68
69 The MessageRouter service has no requirements on what publishers can put
70 onto a topic. The messages are opaque to the service and are treated as
71 raw bytes. In general, passing JSON messages is preferred, but this is
72 due to higher-level features and related systems, not the MessageRouter
73 broker itself. The only constraint placed on messages is their on their
74 size � messages must be under the maximum size, which is currently
75 configured at 1 MB.
76
77 Request URL
78 ===========
79
80 POST http(s)://{HOST:PORT}/events/{topicname}
81
82 Request Parameters
83 ==================
84
85 +--------------------+------------------------------+------------------+------------+-----------+-------------+--------------------------------+-----------------------------+
86 | Name               | Description                  | Param Type       | Data type  | Max Len   | Required    | Format                         | Valid/EXample values        |
87 +====================+==============================+==================+============+===========+=============+================================+=============================+
88 | Topicname          | topic name to be posted      | Path             | String     | 40        | Y           |  <app namespace>.<topicname>   | org.onap.crm.empdetails     |
89 +--------------------+------------------------------+------------------+------------+-----------+-------------+--------------------------------+-----------------------------+
90 | content-type       | To specify type of message   | Header           | String     | 20        | N           |                                | application/json            |
91 +--------------------+------------------------------+------------------+------------+-----------+-------------+--------------------------------+-----------------------------+
92 | Username           | userid                       | Header           | String     |           | N           | Basic Authentication Header    |                             |
93 +--------------------+------------------------------+------------------+------------+-----------+-------------+--------------------------------+-----------------------------+
94 | Password           |                              | Header           | String     |           | N           | Basic Authentication Header    |                             |
95 +--------------------+------------------------------+------------------+------------+-----------+-------------+--------------------------------+-----------------------------+
96 | partitionKey       |                              | QueryParam       | String     |           | N           | String value                   | ?Partitionkey=123           |
97 +--------------------+------------------------------+------------------+------------+-----------+-------------+--------------------------------+-----------------------------+
98
99 **NOTE**: Publishers/user should have access on the topics. The user (id) and
100 permissions details needs to be in AAF.
101
102 Response Parameters
103 ===================
104
105 +------------------+------------------------+------------+--------------+------------------------------+
106 | Name             | Description            | Type       | Format       | Valid/Example Values         |
107 +==================+========================+============+==============+==============================+
108 | httpStatusCode   |                        |            |              | 200, 201 etc.                |
109 +------------------+------------------------+------------+--------------+------------------------------+
110 | mrErrorCode      | Numeric error code     |            |              | 200, 201 etc.                |
111 +------------------+------------------------+------------+--------------+------------------------------+
112 | errorMessage     |                        |            |              | SUCCESS, or error message.   |
113 +------------------+------------------------+------------+--------------+------------------------------+
114 | helpURL          | helpurl                |            |              |                              |
115 +------------------+------------------------+------------+--------------+------------------------------+
116 | transactionid    | transaction-id value   |            |              |                              |
117 +------------------+------------------------+------------+--------------+------------------------------+
118
119
120
121 Response /Error Codes
122 =====================
123
124 +---------------------------+------------------------------------+
125 | Response statusCode       |  Response statusMessage            |
126 +===========================+====================================+
127 | 200-299                   | Success                            |
128 +---------------------------+------------------------------------+
129 | 400-499                   | the client request has a problem   |
130 +---------------------------+------------------------------------+
131 | 500-599                   | the DMaaP service has a problem    |
132 +---------------------------+------------------------------------+
133
134 +------------------------+---------------+---------------------------------+---------------------------------------------------------------------------------------------------------+
135 | Error code             |  HTTPCode     |  Description                    | Issue Reason                                                                                            |
136 +========================+===============+=================================+=========================================================================================================+
137 | DMaaP\_MR\_ERR\_3001   | 413           | Request Entity too large        | Message size exceeds the batch limit <limit>.Reduce the batch size and try again                        |
138 +------------------------+---------------+---------------------------------+---------------------------------------------------------------------------------------------------------+
139 | DMaaP\_MR\_ERR\_3002   | 500           | Internal Server Error           | Unable to publish messages. Please contact administrator                                                |
140 +------------------------+---------------+---------------------------------+---------------------------------------------------------------------------------------------------------+
141 | DMaaP\_MR\_ERR\_3003   | 400           | Bad Request                     | Incorrect Batching format. Please correct the batching format and try again                             |
142 +------------------------+---------------+---------------------------------+---------------------------------------------------------------------------------------------------------+
143 | DMaaP\_MR\_ERR\_3004   | 413           | Request Entity too large        | Message size exceeds the message size limit <limit>.Reduce the message size and try again               |
144 +------------------------+---------------+---------------------------------+---------------------------------------------------------------------------------------------------------+
145 | DMaaP\_MR\_ERR\_3005   | 400           | Bad Request                     | Incorrect JSON object. Please correct the JSON format and try again                                     |
146 +------------------------+---------------+---------------------------------+---------------------------------------------------------------------------------------------------------+
147 | DMaaP\_MR\_ERR\_3006   | 504           | Network Connect Timeout Error   | Connection to the DMaaP MR was timed out.Please try again                                               |
148 +------------------------+---------------+---------------------------------+---------------------------------------------------------------------------------------------------------+
149 | DMaaP\_MR\_ERR\_3007   | 500           | Internal Server Error           | Failed to publish  messages to topic <topicName>. Successfully published <count > number of messages.   |
150 +------------------------+---------------+---------------------------------+---------------------------------------------------------------------------------------------------------+
151
152 Sample Request:
153 ===============
154
155 +-----------------------------------------------------------------------------------+
156 | POST                                                                              |
157 |                                                                                   |
158 | *Payload-* *{"message":"message description"}* *Content-Type: application/json*   |
159 |                                                                                   |
160 | Example:                                                                          |
161 |                                                                                   |
162 | curl -u XXXX@abc.com:X -H 'Content-Type:text/plain' -X POST -d @sampleMsg.txt     |
163 |                                                                                   |
164 | {    "count": 1,                                                                  |
165 |                                                                                   |
166 |     "serverTimeMs": 19"                                                           |
167 |                                                                                   |
168 | }                                                                                 |
169 +-----------------------------------------------------------------------------------+
170
171 Sample Response:
172 ================
173
174 +---------------------------------------------------------------------+
175 | HTTP/1.1 200 OK                                                     |
176 |                                                                     |
177 |     Server: Apache-Coyote/1.1                                       |
178 |                                                                     |
179 |     transactionId: 28-12-2015::08:18:50:682::<IP>::28122015552391   |
180 |                                                                     |
181 |     Content-Type: application/json                                  |
182 |                                                                     |
183 |     Content-Length: 42                                              |
184 |                                                                     |
185 |     Date: Mon, 28 Dec 2015 13:18:50 GMT                             |
186 +---------------------------------------------------------------------+
187
188
189
190 Subscribers
191 -----------
192 **Description**:To subscribe to a MessageRouter topic, a subscriber issues a GET to the RESTful HTTP endpoint for events.
193
194 Request URL:
195 ============
196
197 GET http(s)://{HOST:PORT}}/events/{topicname}/{consumegroup}/{consumerid}/{timeout=x}
198
199 Request Parameters:
200 ===================
201
202 +--------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+------------------------+
203 | Name         | Description                     |  Param Type      |  data type |   MaxLen     |  Required   |  Format             |  Valid/Example Values  |
204 +==============+=================================+==================+============+==============+=============+=====================+========================+
205 | Topicname    | topic name to be posted         |     Path         |   String   |    40        |     Y       | namespace.String    |                        |
206 +--------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+------------------------+
207 | Consumer     | A name that uniquely identifies |     Path         |   String   |              |     Y       |                     | CG1                    |
208 | group        | your subscribers                |                  |            |              |             |                     |                        |
209 +--------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+------------------------+
210 | consumerId   | Within your subscribers group,  |     Path         |   String   |              |     Y       |                     | C1                     |
211 |              | a name that uniquely identifies |                  |            |              |             |                     |                        |
212 |              | your subscribers  process       |                  |            |              |             |                     |                        |
213 +--------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+------------------------+
214 | content-type | To specify type of message      |     Header       |   String   |     20       |     N       |                     | aplication/json        |
215 |              | content(json,text or cambria)   |                  |            |              |             |                     |                        |
216 +--------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+------------------------+
217 | Username     | userid                          |     Header       |   String   |     1        |     N       |                     |                        |
218 +--------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+------------------------+
219 | Password     |                                 |     Header       |   String   |     1        |     N       |                     |                        |
220 +--------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+------------------------+
221
222 **NOTE1**:Subscribers /user should have access on the topics. The user () and
223 permissions details needs to be in AAF.
224
225 Response Parameters:
226 ====================
227
228 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
229 | Name             | Description                    |  Type      | Format       | Valid/Example Values                                      |
230 +==================+================================+============+==============+===========================================================+
231 | httpStatusCode   |                                |            |              | 200, 201 etc.                                             |
232 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
233 | mrErrorCode      | Numeric error code             |            |              | 200, 201 etc.                                             |
234 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
235 | errorMessage     |                                |            |              | SUCCESS, or error message.                                |
236 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
237 | helpURL          | helpurl                        |            |              |                                                           |
238 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
239 | tranactionid     | transaction-id value           |            |              | 28-12-2015::08:18:50:682::135.25.227.66::28122015552391   |
240 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
241 | ResponseBody     | Messages consumed from topic   | Json       | Json         |                                                           |
242 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
243
244
245 Response /Error Codes
246 =====================
247
248
249 +---------------------------+------------------------------------+
250 | Response statusCode       | Response statusMessage             |
251 +===========================+====================================+
252 | 200-299                   | Success                            |
253 +---------------------------+------------------------------------+
254 | 400-499                   | the client request has a problem   |
255 +---------------------------+------------------------------------+
256 | 500-599                   | the DMaaP service has a problem    |
257 +---------------------------+------------------------------------+
258
259 +-------------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------+
260 | Error code              |  HTTPCode       |  Description               | Issue Reason                                                                                |
261 +=========================+=================+============================+=============================================================================================+
262 | DMaaP\_MR\_ERR\_3008    | 413             | Request Entity too large   | Message size exceeds the batch limit <limit>.Reduce the batch size and try again            |
263 +-------------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------+
264 | DMaaP\_MR\_ERR\_3009    | 500             | Internal Server Error      | Unable to publish messages. Please contact administartor                                    |
265 +-------------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------+
266 | DMaaP\_MR\_ERR\_3010    | 400             | Bad Request                | Incorrect Batching format. Please correct the batching format and try again                 |
267 +-------------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------+
268 | DMaaP\_MR\_ERR\_3011    | 413             | Request Entity too large   | Message size exceeds the message size limit <limit>.Reduce the message size and try again   |
269 +-------------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------+
270 | DMaaP\_MR\_ERR\_5012    | 429             | Too many requests          | This client is making too many requests. Please use a long poll setting to decrease the     |
271 |                         |                 |                            | number of requests that result in empty responses.                                          |
272 +-------------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------+
273 |                         | 503             | Service Unavailable        | Service Unavailable.                                                                        |
274 +-------------------------+-----------------+----------------------------+---------------------------------------------------------------------------------------------+
275
276 Sample Request:
277 ===============
278
279 +----------------------------------------------------------------------------------------------------+
280 | GET  http://<hostname>:3904/events/com.att.dmaap.mr.sprint/mygroup/mycus                           |
281 |                                                                                                    |
282 | Content-Type: application/json                                                                     |
283 |                                                                                                    |
284 | Example:                                                                                           |
285 |                                                                                                    |
286 |curl -u XXX@csp.abc.com:MRDmap2016$ -X GET -d 'MyfirstMessage'                                      |
287 |                                                                                                    |
288 |http://mrlocal00.dcae.proto.research.att.com:3904/events/com.att.ecomp_test.crm.preDeo/myG/C1       |
289 |                                                                                                    |
290 |[I am r sending first msg,I am R sending first msg]                                                 |
291 +----------------------------------------------------------------------------------------------------+
292
293 Provisioning
294 ------------
295 **Description**: To create , modify or delete the MessageRouter topics. Generally Invenio application will use these  below apis to create , assign topics to the users. These APIs can also be used by other applications to provision topics in MessageRouter
296
297 Create Topic
298 ============
299 Request URL:
300 ============
301
302 POST http(s)://{HOST:PORT}/topics/create
303
304 Request Parameters:
305 ===================
306
307 +-------------------+---------------------------------+------------------+------------+--------------+-------------+-------------+-----------------------------------+
308 | Name              | Description                     |  Param Type      |  datatype  |   MaxLen     |  Required   |  Format     |  Valid/Example Values             |
309 +===================+=================================+==================+============+==============+=============+=============+===================================+
310 | Topicname         | topicname to be created in MR   |     Body         |   String   |     20       |     Y       | Json        | com.att.dmaap.mr.metrics          |
311 +-------------------+---------------------------------+------------------+------------+--------------+-------------+-------------+-----------------------------------+
312 | topicDescription  | description for topic           |     Body         |   String   |     15       |     Y       |             |                                   |
313 +-------------------+---------------------------------+------------------+------------+--------------+-------------+-------------+-----------------------------------+
314 | partitionCount    | Kafka topic partition           |     Body         |   String   |     1        |    Y        |             |                                   |
315 +-------------------+---------------------------------+------------------+------------+--------------+-------------+-------------+-----------------------------------+
316 | replicationCount  | Kafka topic replication         |     Body         |   String   |     1        |    Y        |             | 3 (Default -for 3 node Kafka )    |
317 +-------------------+---------------------------------+------------------+------------+--------------+-------------+-------------+-----------------------------------+
318 | transaction       | to create transaction id for    |     Body         |  Boolean   |     1        |    N        |             | true                              |
319 | Enabled           | each message transaction        |                  |            |              |             |             |                                   |
320 +-------------------+---------------------------------+------------------+------------+--------------+-------------+-------------+-----------------------------------+
321 | Content-Type      | application/json                |     Header       |   String   |              |             |             | application/json                  |
322 +-------------------+---------------------------------+------------------+------------+--------------+-------------+-------------+-----------------------------------+
323
324 +---------------------------+------------------------------------+
325 | Response statusCode       | Response statusMessage             |
326 +===========================+====================================+
327 | 200-299                   | Success                            |
328 +---------------------------+------------------------------------+
329 | 400-499                   | the client request has a problem   |
330 +---------------------------+------------------------------------+
331 | 500-599                   | the DMaaP service has a problem    |
332 +---------------------------+------------------------------------+
333
334
335 +-------------------------+-----------------+--------------------------------------------------+
336 | Error code              |  HTTP Code      |  Description                                     |
337 +=========================+=================+==================================================+
338 | DMaaP\_MR\_ERR\_5001    | 500             | Failed to retrieve list of all topics            |
339 +-------------------------+-----------------+--------------------------------------------------+
340 | DMaaP\_MR\_ERR\_5002    | 500             | Failed to retrieve details of topic:<topicName>  |
341 +-------------------------+-----------------+--------------------------------------------------+
342 | DMaaP\_MR\_ERR\_5003    | 500             | Failed to create topic:<topicName>               |
343 +-------------------------+-----------------+--------------------------------------------------+
344 | DMaaP\_MR\_ERR\_5004    | 500             | Failed to delete topic:<topicName>               |
345 +-------------------------+-----------------+--------------------------------------------------+
346
347
348 Response Parameters
349 ====================
350
351 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
352 | Name             | Description                    |  Type      | Format       | Valid/Example Values                                      |
353 +==================+================================+============+==============+===========================================================+
354 | httpStatusCode   |                                |            |              | 200, 201 etc.                                             |
355 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
356 | mrErrorCode      | Numeric error code             |            |              | 5005                                                      |
357 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
358 | errorMessage     |                                |            |              | SUCCESS, or error message.                                |
359 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
360 | helpURL          | helpurl                        |            |              |                                                           |
361 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
362 | ResponseBody     | Topic details (owner,          |  Json      |  Json        |                                                           |
363 |                  | trxEnabled=true)               |            |              |                                                           |
364 +------------------+--------------------------------+------------+--------------+-----------------------------------------------------------+
365
366
367 Sample Request:
368 ===============
369
370     .. code:: bash
371
372       POST   http://<hostname>:3904/topic/create
373   Request Body
374   {"topicName":"com.abc.dmaap.mr.topicname","description":"This is a SAPTopic ",
375   "partitionCount":"1","replicationCount":"3","transactionEnabled":"true"}
376   Content-Type: application/json
377   Example:
378   curl -u XXXc@csp.abc.com:xxxxx$  -H 'Content-Type:application/json' -X POST -d
379   @topicname.txt  http://mrlocal00.dcae.proto.research.abc.com:3904/topics/create
380   {
381   "writerAcl": {
382   "enabled": false,
383   "users": []
384   },
385   "description": "This is a TestTopic",
386   "name": "com.abc.ecomp_test.crm.Load9",
387   "readerAcl": {
388   "enabled": false,
389   "users": []
390
391
392 GetTopic Details
393 ----------------
394
395 Request URL
396 ===========
397
398 GET http(s)://{HOST:PORT}/topics    : To list the details of all the topics in Message Router.
399
400 GET http(s)://{HOST:PORT}/topics/{topicname} : To list the details of specified topic .
401
402 Request Parameters
403 ==================
404
405 +--------------------------+-------------------------+------------------+------------+-----------+-------------+-----------------+-----------------------------+
406 | Name                     | Description             | Param Type       | Data type  | Max Len   | Required    | Format          | Valid/EXample values        |
407 +==========================+=========================+==================+============+===========+=============+=================+=============================+
408 | Topicname                | topic name details      | Body             | String     | 20        | Y           |  Json           | com.abc.dmaap.mr.metrics    |
409 +--------------------------+-------------------------+------------------+------------+-----------+-------------+-----------------+-----------------------------+
410
411
412 Response Parameters
413 ====================
414
415 +------------------+------------------------+------------+----------+---------+--------------------------+
416 | Name             | Description            | ParamType  | datatype |Format   | Valid/Example Values     |
417 +==================+========================+============+==========+=========+==========================+
418 | topicname        |  topic name details    |      Body  |   String |   Json  | com.abc.dmaap.mr.metrics |
419 +------------------+------------------------+------------+----------+---------+--------------------------+
420 | description      |                        |            |   String |         |                          |
421 +------------------+------------------------+------------+----------+---------+--------------------------+
422 | owner            |user id who created the |            |          |         |                          |
423 |                  |         topic          |            |          |         |                          |
424 +------------------+------------------------+------------+----------+---------+--------------------------+
425 | txenabled        |     true or false      |            |  boolean |         |                          |
426 +------------------+------------------------+------------+----------+---------+--------------------------+
427
428 +---------------------------+------------------------------------+
429 | Response statusCode       | Response statusMessage             |
430 +===========================+====================================+
431 | 200-299                   | Success                            |
432 +---------------------------+------------------------------------+
433 | 400-499                   | the client request has a problem   |
434 +---------------------------+------------------------------------+
435 | 500-599                   | the DMaaP service has a problem    |
436 +---------------------------+------------------------------------+
437
438
439 Sample Request:
440 ===============
441
442 +-----------------------------------------------------------------------------------------------------------------------------------+
443 | GET   http://<hostname>:3904/topic/com.att.dmaap.mr.testtopic                                                                     |
444 |       curl -u XXX@csp.abc.com:x$  -X                                                                                              |
445 | GET  http://mrlocal00.dcae.proto.research.att.com:3904/topics                                                                     |
446 |    {"topics": [                                                                                                                   |
447 |    {"txenabled": true,"description": "This is a TestTopic","owner": "XXXX@csp.abc.com","topicName": "com.abc.ecomp_test.crm.Load9"|
448 |    {"txenabled": false,"description": "", "owner": "", "topicName": "com.abc.ecomp_test.crm.Load1"                                |
449 |    ]},                                                                                                                            |
450 +-----------------------------------------------------------------------------------------------------------------------------------+
451
452
453 Delete Topics
454 -------------
455
456 Request URL:
457 ============
458
459 DELETE http(s)://{HOST:PORT}/topic/{topicname}
460
461 Sample Request:
462 ===============
463 ex: http://<hostname>:3904/dmaap/v1/topics/com.att.dmaap.mr.testopic
464
465 +---------------------------+------------------------------------+
466 | Response statusCode       | Response statusMessage             |
467 +===========================+====================================+
468 | 200-299                   | Success                            |
469 +---------------------------+------------------------------------+
470 | 400-499                   | the client request has a problem   |
471 +---------------------------+------------------------------------+
472 | 500-599                   | the DMaaP service has a problem    |
473 +---------------------------+------------------------------------+
474
475 +-------------------------+---------------------------------------------+----------------------+
476 | Error code              |    Description                              |HTTP code             |
477 +=========================+=============================================+======================+
478 |  DMaaP\_MR\_ERR\_5004   |  Failed to delete topic:<topicName>         |   500                |
479 +-------------------------+---------------------------------------------+----------------------+
480
481 API Inventory
482 -------------
483
484 +-----------+--------------------+-----------------------------------------+---------------------------------------+----------------+----------------------------------+
485 |           |   API Name         |   API Method                            |   REST API Path                       |                | Comments                         |
486 +===========+====================+=========================================+=======================================+================+==================================+
487 | Topics    | GetAll Topics      | getTopics()                             | /topics                               | GET            |                                  |
488 |           | List               |                                         |                                       |                |                                  |
489 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+----------------------------------+
490 |           | Get All Topics     |                                         |                                       |                |                                  |
491 |           | List with details  | getAllTopics()                          | /topics/listAll                       | GET            |                                  |
492 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+----------------------------------+
493 |           | Get individual     |                                         |                                       |                |                                  |
494 |           | Topic Details      | getTopic(String topicName)              | /topics/{topicName}                   | GET            |                                  |
495 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+----------------------------------+
496 |           | Create Topic       | createTopic(TopicBean topicBean)        | /topics/create                        | POST           |                                  |
497 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+----------------------------------+
498 |           | Delete Topic       | deleteTopicString topicName)            | /topics/{topicName}                   | DELETE         |  Not used in current MR version  |
499 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+----------------------------------+
500 |           | Get Publishers     | getPublishersByTopicName                |                                       |                |                                  |
501 |           | for a Topic        | String topicName)                       | /topics/{topicName}/producers         | GET            |  UEB Backward Compatibility      |
502 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+                                  |
503 |           | Add a Publisher    | permitPublisherForTopic                 | /topics/{topicName}/producers/        | PUT            |                                  |
504 |           | to write ACLon     | (String topicName, String producerId)   | {producerId}                          |                |                                  |
505 |           | a Topic            |                                         |                                       |                |                                  |
506 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+                                  |
507 |           | Remove a Publisher | denyPublisherForTopic(String topicName, | /topics/{topicName}/producers/        | DELETE         |                                  |
508 |           | from write ACL on  | String producerId)                      | {producerId}                          |                |                                  |
509 |           | a Topic            |                                         |                                       |                |                                  |
510 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+                                  |
511 |           | Get Consumers for  | getConsumersByTopicName                 | /topics/{topicName}/consumers         |  GET           |                                  |
512 |           | a Topic            | (String topicName)                      |                                       |                |                                  |
513 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+                                  |
514 |           | Add a Consumer     | permitConsumerForTopic(String           | /topics/{topicName}/consumers/        |  PUT           |                                  |
515 |           | to read ACL        | topicName,String consumerId)            | {consumerId}                          |                |                                  |
516 |           | on a Topic         |                                         |                                       |                |                                  |
517 |           +--------------------+-----------------------------------------+---------------------------------------+----------------+                                  |
518 |           | Remove a consumer  | denyPublisherForTopic(String topicName, | /topics/{topicName}/consumers/        | DELETE         |                                  |
519 |           | from write         | String consumerId)                      | {consumerId}                          |                |                                  |
520 |           | ACL on a Topic     |                                         |                                       |                |                                  |
521 +-----------+--------------------+-----------------------------------------+---------------------------------------+----------------+----------------------------------+
522
523
524