Send Report Output to External REST Service v2

post

/jderest/v2/external/rest/report

Send the output of a report to an external REST service (using multi-part/formdata).

Request

Supported Media Types
Header Parameters
Body ()
Input to the external report service to send report output through a multi-part external REST call.
Root Schema : ExternalReport
Type: object
Input to the external report service to send report output through a multi-part external REST call.
Show Source
Nested Schema : additionalParts
Type: array
Any additional parts (not files) required to process the multi-part request.
Show Source
Nested Schema : headers
Type: array
A set of name-value pairs to send to the external service as HTTP headers.
Show Source
Nested Schema : parameters
Type: array
A set of name-value pairs to send to the external service as URL parameters.
Show Source
Nested Schema : MultiPart
Type: object
Input to External Service, information that describes a part of a multi-part request
Show Source
Nested Schema : NVPair
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful Execution

400 Response

Bad Request - Invalid JSON Input

403 Response

Authorization Failure

415 Response

Invalid Content-Type Header - Must use application/json

444 Response

Invalid Token
Body ()
Root Schema : ServiceErrorResponse
Type: object
Error Response
Show Source

500 Response

Server Failed to Process Request
Body ()
Root Schema : ServiceErrorResponse
Type: object
Error Response
Show Source
Back to Top

Examples

Example Request

The following shows an example of a REST request to send report output to an external REST service. The token value is from a prior call to the tokenrequest service to establish an AIS session.

In this example, the media object upload service on another AIS Server is used to demonstrate sending report output via a multi-part HTTP request. The report output PDF file will be uploaded and saved in Media Objects. The AISREST soft coding (connection) record was already configured to point to the URL of the AIS REST ending with jderest.

curl -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/v2/external/rest/report -d
{
	"token": "044krG3bJ9WvTHK9FpXOkizBnYCAgqd93G2HtCH9YfSm/E=MDE5MDEzMzYyNzcyNTQxMTA4MTA1MDI1MDEwLjEzOS4xMTAuNjQxNTEwNjgzNjkxMzAw",
   
    "method": "POST",
    "softCodingRecordKey": "AISREST",
    "appendPath": "/v2/file/upload",    
    "filePartName": "file",
    "viewType":"PDF",
    "jobNumber":"1266",
    "executionServer":"den00gyz",   
    "additionalParts": [
        {
            "contentType": "application/json",
            "name": "moAdd",
            "partBody": "{  \"moStructure\": \"ABGT\",  \"file\": {           \"fileName\": \"R064011_XJDE0001_1266.pdf\",      \"itemName\": \"R064011_1266\"  },  \"moKey\": [      \"7\"  ],       \"version\": \"ZJDE0001\",  \"formName\": \"P01012_W01012B\"}"                    
        }
    ]
}

Example Response

The following example shows the contents of the response body. In this case, the response is from the media object upload service, since that is the external service that was called.

{
   "uniquefilename": "FILE-5507065071835691596-1510775215177.pdf",
   "itemName": "R064011_1266.pdf",
   "sequence": 5
}
Back to Top