| 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
+| 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 | 20 | N | | application/vnd.att-dr.subscription |\r
+| content-type | To specify type of message | Header | String | 20 | N | | application/vnd.att-dr.feed |\r
| | (feed,subscriber,publisher) | | | | | | |\r
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
-| X-ATT-DR-ON-BEHALF-OF | User id of subscriber | Header | String | 1 | N | | username |\r
+| X-ATT-DR-ON-BEHALF-OF | User id of owner of feed | Header | String | 1 | N | | 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-ATT-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": "m1.0",\r
+ "description": "Jettydemo",\r
+ "business_description": "Jettydemo",\r
+ "suspend": false,\r
+ "deleted": false,\r
+ "changeowner": true,\r
+ "authorization": {\r
+ "classification": "unclassified",\r
+ "endpoint_addrs": [\r
+ "172.18.0.3",\r
+ ],\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 -v -X PUT -H "Content-Type: application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF: {user}" --data-ascii @/opt/app/datartr/addFeed3.txt --location-trusted -k https:/{host}:{port}\r
+\r
+Request Parameters:\r
+===================\r
+\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
+| Name | Description | Param Type | Data Type | MaxLen | Required | Format | Valid/Example Values |\r
++========================+=================================+==================+============+==============+=============+=====================+======================================+\r
+| description | Feed description | Body | String | | Y | | |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
+| business description | Business description | Body | String | | 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 | 20 | N | | application/vnd.att-dr.feed |\r
+| | (feed,subscriber,publisher) | | | | | | |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
+| X-ATT-DR-ON-BEHALF-OF | User id of owner of feed | Header | String | 1 | N | | username |\r
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
\r
Response/Error Codes\r
\r
}\r
\r
-\r
Get a Feed\r
----------\r
\r
\r
http[s]://{host}:{port}/feed/{feedId}\r
\r
-* {feedId}: Id of the feed you wish to see a representation of\r
+* {feedId}: Id of the feed you want to see a representation of\r
\r
Sample Request\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 -v -X DELETE -H "X-ATT-DR-ON-BEHALF-OF: {user}" --location-trusted -k 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-ATT-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
| 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
+| 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
+| group-id | | Body | Integer | | Y | | |\r
+| | | | | | | | |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
+| content-type | To specify type of message | Header | String | 20 | N | | application/vnd.att-dr.subscription |\r
+| | (feed,subscriber,publisher) | | | | | | |\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
+| X-ATT-DR-ON-BEHALF-OF | User id of subscriber | Header | String | 1 | N | | 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-ATT-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
+ "suspend" : false,\r
+ "groupid" : 29,\r
+ "subscriber" : "subscriber123"\r
+\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}/subscribe/{feedId}\r
+\r
+Sample Request\r
+==============\r
+\r
+curl -v -X PUT -H "Content-Type: application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF: {user}" --data-ascii @/opt/app/datartr/addSubscriber.txt --location-trusted -k https://{host}:{port}/subscribe/{feedId}\r
+\r
+Request Parameters:\r
+===================\r
+\r
++------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
+| Name | Description | Param Type | Data Type | MaxLen | Required | Format | Valid/Example Values |\r
++========================+=================================+==================+============+==============+=============+=====================+======================================+\r
+| feedId | 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
+| 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
+| suspend | Set to true if the subscription | Body | Boolean | | N | | * true |\r
+| | is in the suspended state | | | | | | * false |\r
+------------------------+---------------------------------+------------------+------------+--------------+-------------+---------------------+--------------------------------------+\r
| group-id | | Body | Integer | | Y | | |\r
| | | | | | | | |\r
"metadataOnly" : false,\r
"suspend" : false,\r
"groupid" : 29,\r
- "subscriber" : "sg481n"\r
+ "subscriber" : "subscriber123"\r
\r
}\r
\r
\r
http[s]://{host}:{port}/subscribe/{subId}\r
\r
-* {subId}: Id of the subscription you wish to see a representation of\r
+* {subId}: Id of the subscription you want to see a representation of\r
\r
Sample Request\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}/feed/{feedId}\r
+\r
+* {feedId}: Id of the subscription you want to delete\r
+\r
+Sample Request\r
+==============\r
+\r
+curl -v -X DELETE -H "X-ATT-DR-ON-BEHALF-OF: {user}" --location-trusted -k https:/{host}:{port}/subscribe/{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-ATT-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
Sample Request\r
==============\r
\r
-curl -v -X PUT --user {user}:{password} -H "Content-Type: application/octet-stream" --data-binary @/opt/app/datartr/sampleFile.txt --post301 --location-trusted -k https://{host}:{port}/publish/{feedId}/sampleFile.txt\r
+curl -v -X PUT --user {user}:{password} -H "Content-Type: application/octet-stream" --data-binary @/opt/app/datartr/sampleFile.txt --location-trusted -k https://{host}:{port}/publish/{feedId}/sampleFile.txt\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 -v -X DELETE -H "X-ATT-DR-ON-BEHALF-OF: {user}" --location-trusted -k 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
http[s]://{host}:{port}/feedlog/{feedId}?{queryParameter}\r
\r
-* {feedId} is the id of the feed you wish to get logs from\r
-* {queryParameter} a parameter passed through to narrow the returned logs. multiple parameters can be passed\r
+* {feedId} : 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
Request parameters\r
==================\r
\r
http[s]://{host}:{port}/sublog/{subId}?{queryParameter}\r
\r
-* {subId} is the id of the feed you wish to get logs from\r
-* {queryParameter} a parameter passed through to narrow the returned logs. multiple parameters can be passed\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
Request parameters\r
==================\r