Skip to content

nodes_datalinks_sample_proposals_retrieve

GET
/api/nodes/{node_pk}/datalinks/sample-proposals
curl --request GET \
--url https://example.com/api/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/datalinks/sample-proposals \
--header 'Authorization: Bearer <token>' \
--header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'

Propose one sample per file of the node that no sample is linked to.

Each proposal holds its files, and a title drawn from the name of the file without its extension; a compound extension ending with a compression (.fastq.gz, .tar.gz) is removed in full. The two files of a paired-end sequencing (_R1/_R2, _1/_2…), recognised as the sample suggestions do, are proposed as one sample titled by the name they share. Nothing else is grouped. No alias is proposed. The proposals are meant to fill a batch (POST /api/nodes/{nid}/samples/batch), which checks them like any other sample: two files of the same name are both proposed, and the batch reports the name as ambiguous.

Only the datalinks of the node are read, not those of its parents or children. The list is not paginated.

node_pk
required
string format: uuid
X-Workspace
required
string format: uuid

Workspace ID

Media typeapplication/json

Serializer for the samples proposed from the files of a node.

object
count
required
integer
results
required
Array<object>

Serializer for a sample proposed from files that no sample is linked to.

object
title
required

The name of the file without its extension, or the name the two files of a read pair share.

string
files
required

One file, or the two files of a paired-end sequencing.

Array<object>

Serializer for a file of a sample proposed from the files of a node.

object
file_name
required

The name of the file.

string
datalink
required
string format: uuid
connection
required

The name of the connection.

string
path
required

The path of the file in its source.

string

Example generated

{
"count": 1,
"results": [
{
"title": "example",
"files": [
{
"file_name": "example",
"datalink": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"connection": "example",
"path": "example"
}
]
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "forbidden",
"message": "You do not have permission to perform this operation. Check the `details` property for more details.",
"details": [
{
"parameter": "node",
"code": "not_allowed",
"message": "You are not a member of this node."
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "object_not_found",
"message": "Object not found. Check the `details` property for more details.",
"details": [
{
"parameter": "<id>",
"code": "does_not_exist",
"message": "\"<id>\" does not exist."
}
]
}