Skip to content

nodes_samples_list

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

List the information related to all the samples objects.

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

Workspace ID

alias
string
descendant_samples
boolean

Should samples from descendant nodes be included in the list

include_metadata
boolean

When true, each sample in the page includes a metadata array with the same item shape as GET /api/nodes/{nid}/samples/{sid}/metadata?include_inherited=true (full unpaginated field list per sample).

inherited_samples
boolean

Should inherited samples be included in the list

ordering
string

Which field to use when ordering the results.

p
integer

A page number within the paginated result set.

page_size
integer

Number of results to return per page.

search
string

A search term.

title
string
Media typeapplication/json
object
count
required
integer
next
string format: uri
nullable
previous
string format: uri
nullable
results
required
Array<object>

OpenAPI response for sample list items.

Documents the optional metadata heritage array returned when include_metadata=true.

object
id
required
string format: uuid
alias
required
string
<= 50 characters /^[-a-zA-Z0-9_]+$/
title
required
string
<= 1000 characters
node
required
string format: uuid
source
required

Determine source of object as either ‘local’, ‘inherited’, or ‘descendant’.

The function checks if the given object is:

  • local: if it is not associated with the current node’s ancestors or descendants.
  • inherited: if it is associated with one of the ancestors of the current node.
  • descendant: if it is associated with one of the descendants of the current node.

Parameters

obj : Sample Object being checked for its source.

Returns

source : str Source of object: - “inherited”: if object is from ancestor node. - “descendant”: if object is from descendant node. - “local”: if object is not associated with current node’s ancestors or descendants.

string
data
required

Return information about a given object, including the count of bound samples and a related URL.

Parameters

obj : Sample Object containing information about a sample.

Returns

dict Dictionary containing: - “count”: The count of bound samples for the given object (obj). - “related”: The URL for accessing bound data related to the object.

object
key
additional properties
datalink
required

Return information about bound datalinks related to a given object.

The method retrieves information about bound datalinks associated with the object, including the count of distinct datalink values and a URL for accessing the bound datalinks.

Parameters

obj : Sample Object containing information about a sample.

Returns

dict Dictionary containing: - “count”: The number of distinct values in the “datalink” field of the bound_data related to the given obj. - “related”: The URL for accessing the bound datalinks related to the given obj.

object
key
additional properties
created_time
required
string format: date-time
created_by
required

Return interactor information of the object’s creator.

Parameters

obj : Sample Object containing the creator information.

Returns

dict Interactor information of the creator.

object
key
additional properties
last_edited_time
required
string format: date-time
last_edited_by
required

Return information about the last interactor who edited the object.

Parameters

obj : Sample Object containing the last editor information.

Returns

dict Interactor information of the last editor.

object
key
additional properties
metadata

Present only when include_metadata=true. Same item shape as GET /api/nodes/{nid}/samples/{sid}/metadata?include_inherited=true (full unpaginated field list per sample).

Array<object>

Shape for one metadata heritage field + its values.

object
field
required

Metadata field description.

object
key
additional properties
values
required

Values / selected values for the field.

Array<object>
object
key
additional properties

Example

{
"count": 123,
"next": "http://api.example.org/accounts/?p=4",
"previous": "http://api.example.org/accounts/?p=2"
}
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": "uri_validation_error",
"message": "Invalid URI parameters. Check the `details` property for more details.",
"details": [
{
"parameter": "<parameter>",
"code": "invalid",
"message": "\"<parameter_value>\" is not a valid UUID."
}
]
}
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."
}
]
}