Download Document Object
The Download Document Object API downloads a streamed file from a
document object.
Note: This topic is for REST
Version 1. There is also an API for REST Version 2.
Parameters
Name | In | Required? | Description |
---|---|---|---|
ido | Query | Yes | This is the name of the IDO collection. |
rp | Query | No | This is the value of an IDO row pointer. Note: This is optional if the filter parameter is used.
|
docname | Query | No | This is the name of the document object. Note: This parameter is optional if the refseq parameter is used.
|
refseq | Query | No | This is the reference sequence number of the document object. Note: This
parameter is optional if the docname
parameter is used.
|
Headers
Name | Description |
---|---|
Authorization | If the API is called directly, then a Mongoose security token
is obtained through a call to the GetSecurityToken API. If the API is called through ION API, then a valid OAuth2.0 bearer token is provided by ION API. |
X-Infor-MongooseConfig | This is the name of a configuration that is available on the application server. This is required only when using the Mongoose API through the ION API. |
Request data
None
Response data
The response is an unencoded binary stream of the file, with the content-type of application/octet-stream.
Example
This example code downloads a document object from the referenced IDO and IDO rowpointer.
string xml = string.Empty; using ( var client = new HttpClient() ) { string ido = "UserNames"; string docname = "WeeklyReport"; string rp = "2807a627-577b-462e-9494-aee568152c54"; string requestUrl = $"http://server/IDORequestService/MGRESTService.svc/io/downloaddocobj/?ido={ido}&rp={rp}&docname={docname}"; // provide token in the Authorization header client.DefaultRequestHeaders.TryAddWithoutValidation( "Authorization", "b/XdI6IQzCviZOGJ0E+002DoKUFOPmVDkwpQDbQj…==" ); HttpResponseMessage response = client.GetAsync( requestUrl ).Result; using ( var content = response.Content ) { Task<string> result = content.ReadAsStringAsync(); xml = result.Result; } }