Sample Sheets API

The REST API for sample sheet operations is described in this document.

API Views

class samplesheets.views_api.InvestigationRetrieveAPIView(**kwargs)[source]

Retrieve metadata of an investigation with its studies and assays.

This view can be used to e.g. retrieve assay UUIDs for landing zone operations.

URL: /samplesheets/api/investigation/retrieve/{Project.sodar_uuid}

Methods: GET

Returns:

  • archive_name: Original archive name if imported from a zip (string)

  • comments: Investigation comments (JSON)

  • description: Investigation description (string)

  • file_name: Investigation file name (string)

  • identifier: Locally unique investigation identifier (string)

  • irods_status: Whether iRODS collections for the investigation have been created (boolean)

  • parser_version: Version of altamISA used in importing (string)

  • project: Project UUID (string)

  • sodar_uuid: Investigation UUID (string)

  • studies: Study and assay information (JSON, using study UUID as key)

  • title: Investigation title (string)

class samplesheets.views_api.IrodsCollsCreateAPIView(**kwargs)[source]

Create iRODS collections for a project.

URL: /samplesheets/api/irods/collections/create/{Project.sodar_uuid}

Methods: POST

Returns:

  • path: Full iRODS path to the root of created collections (string)

class samplesheets.views_api.SheetImportAPIView(**kwargs)[source]

Upload sample sheet as separate ISA-Tab TSV files or a zip archive. Will replace existing sheets if valid.

The request should be in format of multipart/form-data. Content type for each file must be provided.

URL: /samplesheets/api/import/{Project.sodar_uuid}

Methods: POST

Return:

  • detail: Detail of project success (string)

  • sodar_warnings: SODAR import issue warnings (list of srings, optional)

class samplesheets.views_api.SheetISAExportAPIView(**kwargs)[source]

Export sample sheets as ISA-Tab TSV files, either packed in a zip archive or wrapped in a JSON structure.

URL for zip export: /samplesheets/api/export/zip/{Project.sodar_uuid}

URL for JSON export: /samplesheets/api/export/json/{Project.sodar_uuid}

Methods: GET

class samplesheets.views_api.SampleDataFileExistsAPIView(**kwargs)[source]

Return status of data object existing in SODAR iRODS by MD5 checksum. Includes all projects in search regardless of user permissions.

URL: /samplesheets/api/file/exists

Methods: GET

Parameters:

  • checksum: MD5 checksum (string)

Returns:

  • detail: String

  • status: Boolean

Versioning

For accept header versioning, the following header is expected in the current SODAR version:

Accept: application/vnd.bihealth.sodar+json; version=0.11.2