REST API

/{version}/glsstorage

The following operations are supported on this resource:

POST

Creates a new file storage location in the server file repository. The location sets up a file location on a disk mount point 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.

To request a storage location, your POST request must contain values in the original-location and attached-to elements. The system uses these values to determine the target location for the file, and to generate and assign a LIMS ID. This information is returned to you as a value in the content-location element of the response XML. Once you have the information, you must 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.

To summarize, when importing a file using the API, you must:

  1. Construct XML using the file element, and the attached-to and original-location child elements. The attached-to element must contain the resource or artifact you want to associate the file with. The original-location element must contain the name and path of the file you want to eventually import into the system.
  2. POST the XML to the glsstorage resource.
  3. Receive the response from the glsstorage resource, noting the URI specified by the content-location element.
  4. Place the desired file in the location specified by the content-location element in the response XML.
  5. POST the returned XML to the files resource.
  6. Input Payload

    element consumeable content type(s)
    file (XML)
    • application/xml
    description
    The information about the file you want to eventually import into the system. Here is an example 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.\\ \\ {{}}\\ {{  http://localhost:8080/api/v2/artifacts/LUN3A1PA1}}\\ {{  /home/glsftp/Testing/results.csv}}\\ {{}}\\

    Output Payload

    element produceable content type(s)
    file (XML)
    • application/xml
    description
    When the storage location is successfully allocated, the system returns an HTTP 200 (Ok) code with a response body containing a value in the content-location element, indicating where you should store the file. Here is an example response in xml format: \\ \\ {{}}\\ {{  sftp://localhost/local_home/glsftp/Process/2005/6/HDX-FWX-050601-79-2/HDE2A1TP16-10-13.raw}}\\ {{  http://localhost:8080/api/v2/artifacts/LUN3A1PA1}}\\ {{  /home/glsftp/Testing/results.csv}}\\ {{}}\\

/{version}/glsstorage

Home

REST Endpoints

XML Data Elements

XML Data Types