DownloadDocumentObject
The DownloadDocumentObject API downloads a streamed file from an IDO document object.
Note: This topic is for REST version 2.
See DownloadDocumentObject for the REST version 1.
GET | /docobj/{ido} |
---|---|
http://localhost/IDORequestService/ido/docobj/UserNames?rowPointer=8c66c936-d348-4c13-8684-69bc6fa10473&name=WeeklyReport&refseq=4 |
Parameters
Name | In | Required? | Description |
---|---|---|---|
ido | Path | Yes | The name of the IDO collection |
rowPointer | Query | Yes | The value of an IDO row pointer |
name | 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 name 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 content type of application/octet-stream.
Example
This example code downloads a document object from the referenced IDO and IDO rowpointer.
string json = string.Empty; using ( HttpClient client = new HttpClient() ) { string ido = "UserNames"; string rowpointer = "4d6cb1eb-e4fc-4e12-aae8-95ff1086ee8c"; string name = "WeeklyReport"; string requestUrl = $"http://server/IDORequestService/ido/docobj/{ido}?rowPointer={rowpointer}&name={name}"; // provide token in the Authorization header client.DefaultRequestHeaders.TryAddWithoutValidation( "Authorization", "b/XdI6IQzCviZOGJ0E+002DoKUFOPmVDkwpQDbQj…==" ); HttpResponseMessage response = client.GetAsync( requestUrl ).Result; using ( HttpContent content = response.Content ) { Task<string> result = content.ReadAsStringAsync(); json = result.Result; } }