Send Report Output to External REST Service v2

post

/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
  • additionalParts
    Any additional parts (not files) required to process the multi-part request.
  • Value to append to the endpoint defined in soft coding for identifying the path to the external endpoint.
  • An identifier for the device making the service call. If not provided, the requesting IP address is used.
  • Specify the environment to use for login. If not specified, the default environment configured for the AIS Server will be used.
  • The execution server for the report output.
  • The name of the multi-part part for the file (binary) attachment in the request.
  • When the value is true, the external call will run asynchronously in a thread, so that the call will return immediately without waiting for a response from the external service.
  • headers
    A set of name-value pairs to send to the external service as HTTP headers.
  • DEPRECATED - Use FireAndForget - When the value is true, the external call will run asynchronously in a thread, so that the call will return immediately without waiting for a response from the external service.
  • The HTML (JAS) Server to use for login. If not specified, the default HTML Server configured for the AIS Server will be used.
  • The job number for the report output.
  • Allowed Values: [ "BOTH", "JDE", "JDEDEBUG" ]
    If logs are requested, specify the type of logs you want.
  • The HTTP method to be used for the external call.
  • parameters
    A set of name-value pairs to send to the external service as URL parameters.
  • The JD Edwards EnterpriseOne password, which is required if other authentication methods are not being used.
  • A string to send as input in the body of the external REST service call.
  • Used for logging in with psToken. Primarily used by the HTML Server to establish a session with the AIS Server.
  • The role to use for login. If not specified, the default role configured for the AIS Server will be used.
  • The key of the soft coding record configured to call the external service.
  • The name of the AIS local file to be sent to an external multi-part file upload request.
  • The name of the file to send to the external REST, if different from the source file name.
  • The AIS token, which is required if other authentication methods are not being used.
  • JD Edwards EnterpriseOne username, which is required if other authentication methods are not being used.
  • Allowed Values: [ "PDF", "CSV", "OSA", "LOG" ]
    Specify the output file to send through an external REST service call.
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
  • The content type of the part, any text based Media Type, like application/json or text/xml
  • The name of the part.
  • The body of the part. This may be JSON text or XML or other String values matching the content type.
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