Skip to content

StudySPoTAsUserApi

All URIs are relative to http://localhost

Method HTTP request Description
GetStudyAsUser GET /api/v1/as-user/studies/{id} Retrieve a single study object by ID (accession)
GetStudyByVersionAsUser GET /api/v1/as-user/studies/{id}/versions/{version} Retrieve a single study object by ID (accession)
GetStudyVersionsAsUser GET /api/v1/as-user/studies/{id}/versions Retrieve a list of object versions by ID
SearchStudiesAsUser GET /api/v1/as-user/studies List or search for study metadata objects

GetStudyAsUser

object GetStudyAsUser(id, response_format = var.response_format, returned_metadata_fields = var.returned_metadata_fields)

Retrieve a single study object by ID (accession)

Example

library(odmApi)

# Retrieve a single study object by ID (accession)
#
# prepare function argument(s)
var_id <- "id_example" # character | Unique identifier (accession) of the object.
var_response_format <- ResponseFormat$new() # ResponseFormat | Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. (Optional)
var_returned_metadata_fields <- "returned_metadata_fields_example" # character | The parameter defines amount of metadata attributes to return:  1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template, default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. (Optional)

api_instance <- StudySPoTAsUserApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GetStudyAsUser(var_id, response_format = var_response_format, returned_metadata_fields = var_returned_metadata_fieldsdata_file = "result.txt")
result <- api_instance$GetStudyAsUser(var_id, response_format = var_response_format, returned_metadata_fields = var_returned_metadata_fields)
dput(result)

Parameters

Name Type Description Notes
id character Unique identifier (accession) of the object.
response_format ResponseFormat Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. [optional]
returned_metadata_fields Enum [minimal_data, extended_data_included, original_data_included] The parameter defines amount of metadata attributes to return: 1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template, default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. [optional]

Return type

object

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The request was successful. The returned value is the object. -
400 The supplied object ID is invalid. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
404 No object exists with the given ID. -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -

GetStudyByVersionAsUser

object GetStudyByVersionAsUser(id, version, response_format = var.response_format, returned_metadata_fields = var.returned_metadata_fields)

Retrieve a single study object by ID (accession)

Example

library(odmApi)

# Retrieve a single study object by ID (accession)
#
# prepare function argument(s)
var_id <- "id_example" # character | Unique identifier (accession) of the object.
var_version <- "version_example" # character | Unique version of the object.
var_response_format <- ResponseFormat$new() # ResponseFormat | Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. (Optional)
var_returned_metadata_fields <- "returned_metadata_fields_example" # character | The parameter defines amount of metadata attributes to return:  1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template, default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. (Optional)

api_instance <- StudySPoTAsUserApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GetStudyByVersionAsUser(var_id, var_version, response_format = var_response_format, returned_metadata_fields = var_returned_metadata_fieldsdata_file = "result.txt")
result <- api_instance$GetStudyByVersionAsUser(var_id, var_version, response_format = var_response_format, returned_metadata_fields = var_returned_metadata_fields)
dput(result)

Parameters

Name Type Description Notes
id character Unique identifier (accession) of the object.
version character Unique version of the object.
response_format ResponseFormat Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. [optional]
returned_metadata_fields Enum [minimal_data, extended_data_included, original_data_included] The parameter defines amount of metadata attributes to return: 1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template, default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. [optional]

Return type

object

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The request was successful. The returned value is the object. -
400 The supplied object ID is invalid. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
404 No object exists with the given ID. -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -

GetStudyVersionsAsUser

array[CommitInfo] GetStudyVersionsAsUser(id)

Retrieve a list of object versions by ID

Example

library(odmApi)

# Retrieve a list of object versions by ID
#
# prepare function argument(s)
var_id <- "id_example" # character | Unique identifier (accession) of the object.

api_instance <- StudySPoTAsUserApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GetStudyVersionsAsUser(var_iddata_file = "result.txt")
result <- api_instance$GetStudyVersionsAsUser(var_id)
dput(result)

Parameters

Name Type Description Notes
id character Unique identifier (accession) of the object.

Return type

array[CommitInfo]

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The request was successful. The returned value is the list of object versions. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -

SearchStudiesAsUser

ListResponse SearchStudiesAsUser(response_format = var.response_format, filter = var.filter, query = var.query, search_specific_terms = var.search_specific_terms, returned_metadata_fields = var.returned_metadata_fields, sort = var.sort, page_limit = var.page_limit, page_offset = var.page_offset)

List or search for study metadata objects

Retrieve study metadata objects by searching/listing study metadata. ## Metadata full-text queries Single words can be supplied as is, otherwise use speech marks (\") to quote queries that include whitespace. Speech marks and backslash characters in the query need to be escaped with a backslash (\\). ## Metadata filters Metadata filters are key-value pairs joined by an operator. The = operator matches literal values/string. The != operator matches anything except the literal value/string. The < or > operators match numerical results that are less or greater than the supplied value. Strings containing whitespace need to be quoted with (\"). ## Combinations Metadata queries/filters for the same parameter can be combined with &&, AND, || and OR operators, using white-space to separate out the terms and operators. Parentheses ( ) can be used for complex expressions. ## Paging For performance reasons this endpoint returns results in \"pages\" of limited size. In order to retrieve all matching results the client needs to request multiple pages starting from an offset to the first result. You can do this using the pageOffset query parameter. A value of 0 (the default) instructs the server to return the first page of results, 100 would return a page of results starting from the 101st result and so on. To return all results iterate through pages using pageOffset values of n * pageLimit until the resultsExhausted response field is true. ## List operation This endpoint can be called with no query parameter. Doing so returns a list of all study objects.

Example

library(odmApi)

# List or search for study metadata objects
#
# prepare function argument(s)
var_response_format <- ResponseFormat$new() # ResponseFormat | Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. (Optional)
var_filter <- "filter_example" # character | Filter by study metadata (key-value metadata pair(s)). E.g. `\"Study Source\"=ArrayExpress`    (Optional)
var_query <- "query_example" # character | Search for study objects via a full-text query over all study metadata fields. E.g. `\"RNA-Seq of human dendritic cells\"`. Queries matching dictionary terms are automatically expanded to include synonyms. (Optional)
var_search_specific_terms <- "search_specific_terms_example" # character | If the full-text query term is present in an ODM dictionary, enabling this parameter will modify the query to include child terms of the full-text query.  For example, the search query \"Body fluid\" can be expanded to include the term \"Blood\" (a child term of  \"Body fluid\") so files containing either \"Body fluid\" or  \"Blood\"  in their metadata will be returned in the search results.  The parent-child relationship is defined by the key \"broaders\" or \"subClassOf\" in the dictionary.  If the full query term is not present in a dictionary then this parameter has no effect. (Optional)
var_returned_metadata_fields <- "returned_metadata_fields_example" # character | The parameter defines amount of metadata attributes to return:  1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template, default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. (Optional)
var_sort <- "sort_example" # character | Attribute to sort by, with optional ascending/descending marker, of the form `\"[+|-]<key_name>\"`.  No marker or `\"+\"` indicates ascending sort, and `\"-\"` indicates descending sort.  *Default:* sort by ID in ascending order. (Optional)
var_page_limit <- 56 # integer | Maximum number of results to return. This value must be between 0 and 2000 (inclusive). (Optional)
var_page_offset <- 56 # integer | Show the page {pageOffset+1} results from the start of the results. E.g. 100 will show a page of results  starting from the 101st result. The default value is 0. (Optional)

api_instance <- StudySPoTAsUserApi$new()
# Configure API key authorization: Access-token
api_instance$api_client$api_keys["Authorization"] <- Sys.getenv("API_KEY")
# Configure API key authorization: Genestack-API-Token
# api_instance$api_client$api_keys["Genestack-API-Token"] <- Sys.getenv("API_KEY")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$SearchStudiesAsUser(response_format = var_response_format, filter = var_filter, query = var_query, search_specific_terms = var_search_specific_terms, returned_metadata_fields = var_returned_metadata_fields, sort = var_sort, page_limit = var_page_limit, page_offset = var_page_offsetdata_file = "result.txt")
result <- api_instance$SearchStudiesAsUser(response_format = var_response_format, filter = var_filter, query = var_query, search_specific_terms = var_search_specific_terms, returned_metadata_fields = var_returned_metadata_fields, sort = var_sort, page_limit = var_page_limit, page_offset = var_page_offset)
dput(result)

Parameters

Name Type Description Notes
response_format ResponseFormat Supply this parameter with the value `term_id` as part of the query to return extended information including IDs for values and dictionaries. [optional]
filter character Filter by study metadata (key-value metadata pair(s)). E.g. `\"Study Source\"=ArrayExpress` [optional]
query character Search for study objects via a full-text query over all study metadata fields. E.g. `\"RNA-Seq of human dendritic cells\"`. Queries matching dictionary terms are automatically expanded to include synonyms. [optional]
search_specific_terms character If the full-text query term is present in an ODM dictionary, enabling this parameter will modify the query to include child terms of the full-text query. For example, the search query \"Body fluid\" can be expanded to include the term \"Blood\" (a child term of \"Body fluid\") so files containing either \"Body fluid\" or \"Blood\" in their metadata will be returned in the search results. The parent-child relationship is defined by the key \"broaders\" or \"subClassOf\" in the dictionary. If the full query term is not present in a dictionary then this parameter has no effect. [optional]
returned_metadata_fields Enum [minimal_data, extended_data_included, original_data_included] The parameter defines amount of metadata attributes to return: 1. `minimal_data` - return metadata attributes according to the default template. 2. `extended_data_included` - return metadata attributes according to applied template, if object doesn’t have applied template, default template will be used. This is the default for User endpoints. 3. `original_data_included` - return all metadata attributes with values and null attributes, if they are present in the applied template. This is the default for Curator endpoints. [optional]
sort Enum [id, creation, last_update, name, +id, +creation, +last_update, +name, -id, -creation, -last_update, -name] Attribute to sort by, with optional ascending/descending marker, of the form `\"[+ -]<key_name>\"`. No marker or `\"+\"` indicates ascending sort, and `\"-\"` indicates descending sort. Default: sort by ID in ascending order.
page_limit integer Maximum number of results to return. This value must be between 0 and 2000 (inclusive). [optional]
page_offset integer Show the page {pageOffset+1} results from the start of the results. E.g. 100 will show a page of results starting from the 101st result. The default value is 0. [optional]

Return type

ListResponse

Authorization

Access-token, Genestack-API-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/tab-separated-values

HTTP response details

Status code Description Response headers
200 The request was successful. The returned value is a list of objects. -
401 User is not authenticated. Please supply a valid Access Token in the `Authorization` HTTP header (e.g. Authorization: bearer [token]) or Genestack API token in the `Genestack-API-Token` header (this token may be obtained from the Genestack UI Profile page). -
500 An internal server error occurred. This indicates an unexpected failure in the Genestack system, please file a bug report to support@genestack.com, including the error details. -