Difference between revisions of "DRAFT Data Process Service"
(Created page with "= Overview = The Data Process Service is a web service hosted by Fusion Registry which accepts a dataset (multiple formats supported) and a process instruction, which tells th...") |
(→Load Data) |
||
| Line 35: | Line 35: | ||
|style="background-color:#eaecf0"|<b>Response Statuses</b>|| <p><b>200</b> - Data file received</p> | |style="background-color:#eaecf0"|<b>Response Statuses</b>|| <p><b>200</b> - Data file received</p> | ||
<p><b>400</b> - If not dataset provided</p> | <p><b>400</b> - If not dataset provided</p> | ||
| + | <p><b>401</b> - Unauthorized (if access has been restricted)</p> | ||
| + | <p><b>500</b> - Server Error</p> | ||
| + | |} | ||
| + | |||
| + | '''<u>Response</u>''' | ||
| + | { | ||
| + | "token" : "uid123" | ||
| + | } | ||
| + | |||
| + | |||
| + | == Run Process == | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | |style="background-color:#eaecf0"|<b>Entry Point</b>|| <b> /ws/secure/dataprocess/run/{token}</b> | ||
| + | |- | ||
| + | |style="background-color:#eaecf0"|<b>Access</b>|| <span style='color:red'><b>Restricted</b></span> | ||
| + | |- | ||
| + | |style="background-color:#eaecf0"|<b>Http Method</b>|| POST | ||
| + | |- | ||
| + | |style="background-color:#eaecf0"|<b>Accepts</b> || Process Instruction (JSON format) | ||
| + | |- | ||
| + | |style="background-color:#eaecf0"|<b>Content-Type</b>|| <p>1. multipart/form-data (if attaching file) – the attached file must be in field name of uploadFile</p> | ||
| + | <p>2. application/json (if submitting data in the body of the POST)</p> | ||
| + | |- | ||
| + | |style="background-color:#eaecf0"|<b>Response Format</b>|| JSON | ||
| + | |- | ||
| + | |style="background-color:#eaecf0"|<b>Response Statuses</b>|| <p><b>200</b> - Data file received</p> | ||
| + | <p><b>400</b> - If the token does not match a known dataset</p> | ||
<p><b>401</b> - Unauthorized (if access has been restricted)</p> | <p><b>401</b> - Unauthorized (if access has been restricted)</p> | ||
<p><b>500</b> - Server Error</p> | <p><b>500</b> - Server Error</p> | ||
Revision as of 02:36, 2 February 2021
Contents
Overview
The Data Process Service is a web service hosted by Fusion Registry which accepts a dataset (multiple formats supported) and a process instruction, which tells the Fusion Registry how to process the data, for example validate, map, transform, export.
Workflow
The Data Process Service has the following workflow
- Load Data - Data is submitted using HTTP Post. The server provides a token to be able to perform further actions on the data
- Run Process - The process to execute is sent to the server, along with the token of which dataset to apply the process to. The server provides a token to track the process
- Track Progress - A GET request to track the progress of a running process, using the processes' unique token as supplied by the server
- Export Data - If the final stage of a Process is to store the data in a temporary store, then it can be exported in any data format supported by Fusion Registry
Any data loaded is stored for 2 minutes, if there is no activity on the data 2 minutes after it is loaded, it will be evicted from the system.
Load Data
| Entry Point | /ws/secure/dataprocess/load |
| Access | Restricted |
| Http Method | POST |
| Accepts | Any Supported Data Format |
| Compression | Zip files supported |
| Content-Type | 1. multipart/form-data (if attaching file) – the attached file must be in field name of uploadFile 2. application/text or application/xml (if submitting data in the body of the POST) |
| Response Format | JSON |
| Response Statuses | 200 - Data file received 400 - If not dataset provided 401 - Unauthorized (if access has been restricted) 500 - Server Error |
Response
{
"token" : "uid123"
}
Run Process
| Entry Point | /ws/secure/dataprocess/run/{token} |
| Access | Restricted |
| Http Method | POST |
| Accepts | Process Instruction (JSON format) |
| Content-Type | 1. multipart/form-data (if attaching file) – the attached file must be in field name of uploadFile 2. application/json (if submitting data in the body of the POST) |
| Response Format | JSON |
| Response Statuses | 200 - Data file received 400 - If the token does not match a known dataset 401 - Unauthorized (if access has been restricted) 500 - Server Error |
Response
{
"token" : "uid123"
}