/{version}/files
The following operations are supported on this resource:
Adds a new file to the system and associates it with a resource or artifact.
This action does not place a file on the server.
Before you can import files through the API, you must POST a request to the glsstorage resource. This
allocates a location where you can place the file that you want to work with through the API. Once the
glsstorage resource returns a location, you can place the file in the specified location, and then POST the
returned XML to the files resource in order to associate the file in the system. For more information, please
refer to the glsstorage resource section of this reference guide.
To associate a new file in the system, your POST request must contain values in the original-location,
attached-to, and content-location elements. The content-location element must reference a storage location
that has been previously allocated by POSTing to the glsstorage resource or a location on another remote file store that has been configured.
In addition, the content-location cannot already be used by a different file resource.
You may POST to the files resource before placing the desired file in the location specified by the content-location element without an error.
However, if the file does not reside in this location, any attempts by the system to download the file will cause an error.
For this reason, it is recommended to place the file in the content-location before POSTing or soon immediately after POSTing using the /files/{limsid}/upload endpoint.
An example of a <file> POST is as follows:
<file:file xmlns:file="http://genologics.com/ri/file">
<content-location>sftp://localhost/local_home/glsftp/Process/2005/6/HDX-FWX-050601-79-2/HDE2A1TP16-10-13.raw</content-location>
<attached-to>http://localhost:8080/api/v2/artifacts/LUN3A1PA1</attached-to>
<original-location>/home/glsftp/Testing/results.csv</original-location>
<is-published>false</is-published>
</file:file>
Input Payload
element |
consumeable content type(s) |
file (XML)
|
|
description |
The information about the file you want to associate in the system. Here is an example <file> in xml format. Note the attached-to uri will need to match an existing resource in your system. Allowed resource types are: project, sample, process, or a file artifact type such as a result file. The content-location will also need to match an existing file uri in your system.
|
Output Payload
element |
produceable content type(s) |
file (XML)
|
|
description |
When the file is successfully associated, the system returns an HTTP 201 (Created) code with a response
body that includes information about the newly associated file. |
Displays a list of files that are associated with resources or artifacts in the system.
If the number of files returned exceeds the display maximum, the results are paged.
When submitting a GET request, you can use the following query parameters to filter the results. For more information about
using query parameters, please refer to the Filtering list resources section under REST General Concepts.
Parameters
name |
description |
type |
default |
start-index |
When working with large lists of results, displays the results from a set point. If omitted, the first page of results is returned.
|
query |
0 |
last-modified |
Displays only the files modified since the specified date, in YYYY-MM-DDThh:mm:ssTZD format. For more information on this format, please refer to the ISO 8601 Complete Date (plus hours, minutes and seconds) standard.
|
query |
|
published |
A boolean value that displays files that have or have not been published to LabLink. To view files that are available in LabLink, use 'true'. To view files that are only available in the client, use 'false'.
|
query |
|
processlimsid |
Displays only the files that are associated with the specified process LIMS ID. When filtering a list of files, you can repeat this parameter, specifying a new value each time.
|
query |
|
projectlimsid |
Displays only the files that are associated with the specified project LIMS ID. When filtering a list of files, you can repeat this parameter, specifying a new value each time.
|
query |
|
samplelimsid |
Displays only the files that are associated with the specified sample LIMS ID. When filtering a list of files, you can repeat this parameter, specifying a new value each time.
|
query |
|
fileartifactlimsid |
Displays only the files that are associated with the specified LIMS ID for file-based artifacts, such as Result Files, Search Result Files, and Gel Spots. When filtering a list of files, you can repeat this parameter, specifying a new value each time.
|
query |
|
processtype |
Displays only the files that are attached to the outputs produced by the specified process type (the name of the process in the client).
|
query |
|
unattached |
When a file is captured using the ADC plug-in, GenoLogics LIMS will attempt to automatically attach and associate it with the correct location. Files that cannot be automatically associated are stored in a separate Captured Files area. Captured Files can subsequently be manually attached and associated in GenoLogics LIMS. An unattached=true will return only those files still in the Captured Files list. An unattached=false will return files that have successfully been attached and associated within the LIMS.
|
query |
|
outputname |
Displays only the files that are associated with the specified output name (the name of the output produced by the process). When filtering a list of files, you can repeat this parameter, specifying a new value each time.
|
query |
|
automationid |
Displays only the files that are attached to automations with the given ids. When filtering a list of files, you can repeat this parameter, specifying a new value each time.
|
query |
|
automationname |
Displays only the files that are attached to an automation with one of the given names. When filtering a list of files, you can repeat this parameter, specifying a new value each time.
|
query |
|
originallocation |
Displays only the files whose original location matches the specified path, including the name of the file. For example, /home/user/docs/Letter.txt. When filtering a list of files you can repeat this parameter, specifying a new value each time.
|
query |
|
originalname |
Displays only the files whose original-name matches one of the specified names. When filtering a list of files you can repeat this parameter, specifying a new value each time.
|
query |
|
Output Payload
element |
produceable content type(s) |
files (XML)
|
|
description |
The system returns a response that includes a list of files and URI links, starting from the start-index offset. |