DownloadFileStream
The DownloadFileStream API downloads a streamed file from an IDO collection. The IDO collection must have a property for storing binary data.
Note: This topic is for REST version 1.
See DownloadFileStream for REST version 2.
GET | /io/uploadfile |
---|---|
http://localhost/IDORequestService/MGRESTService.svc/io/downloadfile/?ido=UserNames&prop=UserImage&rp=2807a627-577b-462e-9494-aee568152c54 |
Parameters
Name | In | Required? | Description |
---|---|---|---|
ido | Query | Yes | The name of the IDO collection |
prop | Query | Yes | The name of an IDO property |
rp | Query | No | The value of an IDO row pointer Note: This parameter is optional if the filter parameter is used.
|
filter | Query | No | Applies a filter for the required row If multiple rows returned, the first row is selected. For optimal performance, use a filter that returns only one row. Note: This parameter is optional if the rp 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 user image from the users table.
var xml = string.Empty; using ( HttpClient client = new HttpClient() ) { string ido = "UserNames"; string prop = "UserImage"; string rp = "2807a627-577b-462e-9494-aee568152c54"; string requestUrl = $"http://server/IDORequestService/MGRESTService.svc/io/downloadfile/?ido={ido}&prop={prop}&rp={rp}"; // 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(); xml = result.Result; } }