+``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