DownloadDocumentObject
The DownloadDocumentObject API downloads a streamed file from a document object.
Note: This topic is for REST version 1. See DownloadDocumentObject for the REST version 2.
| GET | /io/downloaddocobj |
|---|---|
| http://localhost/IDORequestService/MGRESTService.svc/xml/io/xml/downloaddocobj?ido=UserNames&&rp=7dbf8871-e688-44af-b4dd-111fce42395b&docname=WeeklyReport | |
Parameters
| Name | In | Required? | Description |
|---|---|---|---|
| ido | Query | Yes | The name of the IDO collection |
| rp | Query | No | The value of an IDO row pointer
Note: This parameter is optional if the filter parameter is used.
|
| docname | Query | No | The name of the document object
Note: This parameter is optional if the refseq parameter is used.
|
| refseq | Query | No | 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 | The name of a configuration that is available on the application server
This header is required only when using the Mongoose API through the ION API. |
Request data
None
Response data
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;
}
}