curl -X GET\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"https://elab.localhost:3148/api/v2/experiments?q=&extended=&related=&related_origin=&compound=&category=&status=&tags[]=&extra_fields[]=&limit=&offset=&owner=&scope=&order=&sort=&state=&full=&reaction_q=&reaction_structure=&reaction_structure_type=&reaction_exact=&reaction_role=&reaction_compound=&reaction_item=&reaction_key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExperimentsApi;
import java.io.File;
import java.util.*;
public class ExperimentsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: token
ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token");
token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//token.setApiKeyPrefix("Token");
ExperimentsApi apiInstance = new ExperimentsApi();
String q = q_example; // String | Search for a term in title, body or elabid.
String extended = extended_example; // String | Extended search (advanced query).
Integer related = 56; // Integer | Look only for entries linked to this entry id.
String relatedOrigin = relatedOrigin_example; // String | When using the "related" query parameter, select the type of the related ID (experiments or items)
Integer compound = 56; // Integer | Look only for entries linked to this compound id.
String category = category_example; // String | Add a filter on the Category. Supports comma separated list of numbers, including "null".
String status = status_example; // String | Add a filter on the Status. Supports comma separated list of numbers, including "null".
array[String] tags[] = ; // array[String] | An array of tags for filtering results containing all of these tags.
array[String] extraFields[] = ; // array[String] | Names of custom fields (keys of metadata.extra_fields) to include in the response. Each entry will then have an `extra_fields_values` object, with the requested names as keys, holding the `value` (multiple values are joined with a comma), `values` (an array with each individual value), `unit` and `type` of that custom field. Entries without the custom field won't have that key. This parameter does not filter the results. It also applies with `fast`.
Integer limit = 56; // Integer | Limit the number of results.
Integer offset = 56; // Integer | Skip a number of results. Use with limit to work the pagination.
String owner = owner_example; // String | Filter results by author (user id)
Integer scope = 56; // Integer | Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
String order = order_example; // String | Change the ordering of the results.
String sort = sort_example; // String | Change the sorting of results: ascending or descending.
String state = state_example; // String | Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
Integer full = 56; // Integer | Return all columns of each entry when set to 1.
String reactionQ = reactionQ_example; // String | Only entries with a reaction containing this text in its title, conditions or atmosphere, or in the name or formula of a component.
String reactionStructure = reactionStructure_example; // String | Only entries with a reaction component matching this structure, given as a SMILES or an InChIKey.
A SMILES finds components containing it as a substructure (fingerprint screening, it can return false positives).
An InChIKey finds components with the same connectivity (first block of the key).
Use reaction_exact to require the same structure, or reaction_structure_type to give a SMARTS pattern instead.
String reactionStructureType = reactionStructureType_example; // String | With smarts, reaction_structure is a SMARTS pattern: only entries with a reaction component matching it.
reaction_exact does not apply. The candidate components are limited to 20000: narrow them with reaction_role,
reaction_compound or reaction_item if needed.
Integer reactionExact = 56; // Integer | With reaction_structure: match the full InChIKey, or the complete fingerprint of the SMILES, instead of related structures.
String reactionRole = reactionRole_example; // String | Restrict reaction_structure, reaction_compound and reaction_item to components with this role.
Integer reactionCompound = 56; // Integer | Only entries with a reaction component linked to this compound.
Integer reactionItem = 56; // Integer | Only entries with a reaction component linked to this resource (bottle, batch or sample).
String reactionKey = reactionKey_example; // String | Only entries with the same transformation: the reaction_key of a reaction, derived from the InChIKeys of its reactants and products.
try {
array[experiment] result = apiInstance.readExperiments(q, extended, related, relatedOrigin, compound, category, status, tags[], extraFields[], limit, offset, owner, scope, order, sort, state, full, reactionQ, reactionStructure, reactionStructureType, reactionExact, reactionRole, reactionCompound, reactionItem, reactionKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ExperimentsApi#readExperiments");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ExperimentsApi;
public class ExperimentsApiExample {
public static void main(String[] args) {
ExperimentsApi apiInstance = new ExperimentsApi();
String q = q_example; // String | Search for a term in title, body or elabid.
String extended = extended_example; // String | Extended search (advanced query).
Integer related = 56; // Integer | Look only for entries linked to this entry id.
String relatedOrigin = relatedOrigin_example; // String | When using the "related" query parameter, select the type of the related ID (experiments or items)
Integer compound = 56; // Integer | Look only for entries linked to this compound id.
String category = category_example; // String | Add a filter on the Category. Supports comma separated list of numbers, including "null".
String status = status_example; // String | Add a filter on the Status. Supports comma separated list of numbers, including "null".
array[String] tags[] = ; // array[String] | An array of tags for filtering results containing all of these tags.
array[String] extraFields[] = ; // array[String] | Names of custom fields (keys of metadata.extra_fields) to include in the response. Each entry will then have an `extra_fields_values` object, with the requested names as keys, holding the `value` (multiple values are joined with a comma), `values` (an array with each individual value), `unit` and `type` of that custom field. Entries without the custom field won't have that key. This parameter does not filter the results. It also applies with `fast`.
Integer limit = 56; // Integer | Limit the number of results.
Integer offset = 56; // Integer | Skip a number of results. Use with limit to work the pagination.
String owner = owner_example; // String | Filter results by author (user id)
Integer scope = 56; // Integer | Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
String order = order_example; // String | Change the ordering of the results.
String sort = sort_example; // String | Change the sorting of results: ascending or descending.
String state = state_example; // String | Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
Integer full = 56; // Integer | Return all columns of each entry when set to 1.
String reactionQ = reactionQ_example; // String | Only entries with a reaction containing this text in its title, conditions or atmosphere, or in the name or formula of a component.
String reactionStructure = reactionStructure_example; // String | Only entries with a reaction component matching this structure, given as a SMILES or an InChIKey.
A SMILES finds components containing it as a substructure (fingerprint screening, it can return false positives).
An InChIKey finds components with the same connectivity (first block of the key).
Use reaction_exact to require the same structure, or reaction_structure_type to give a SMARTS pattern instead.
String reactionStructureType = reactionStructureType_example; // String | With smarts, reaction_structure is a SMARTS pattern: only entries with a reaction component matching it.
reaction_exact does not apply. The candidate components are limited to 20000: narrow them with reaction_role,
reaction_compound or reaction_item if needed.
Integer reactionExact = 56; // Integer | With reaction_structure: match the full InChIKey, or the complete fingerprint of the SMILES, instead of related structures.
String reactionRole = reactionRole_example; // String | Restrict reaction_structure, reaction_compound and reaction_item to components with this role.
Integer reactionCompound = 56; // Integer | Only entries with a reaction component linked to this compound.
Integer reactionItem = 56; // Integer | Only entries with a reaction component linked to this resource (bottle, batch or sample).
String reactionKey = reactionKey_example; // String | Only entries with the same transformation: the reaction_key of a reaction, derived from the InChIKeys of its reactants and products.
try {
array[experiment] result = apiInstance.readExperiments(q, extended, related, relatedOrigin, compound, category, status, tags[], extraFields[], limit, offset, owner, scope, order, sort, state, full, reactionQ, reactionStructure, reactionStructureType, reactionExact, reactionRole, reactionCompound, reactionItem, reactionKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ExperimentsApi#readExperiments");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: token)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *q = q_example; // Search for a term in title, body or elabid.
(optional)
String *extended = extended_example; // Extended search (advanced query).
(optional)
Integer *related = 56; // Look only for entries linked to this entry id.
(optional)
String *relatedOrigin = relatedOrigin_example; // When using the "related" query parameter, select the type of the related ID (experiments or items)
(optional)
Integer *compound = 56; // Look only for entries linked to this compound id.
(optional)
String *category = category_example; // Add a filter on the Category. Supports comma separated list of numbers, including "null".
(optional)
String *status = status_example; // Add a filter on the Status. Supports comma separated list of numbers, including "null".
(optional)
array[String] *tags[] = ; // An array of tags for filtering results containing all of these tags.
(optional)
array[String] *extraFields[] = ; // Names of custom fields (keys of metadata.extra_fields) to include in the response. Each entry will then have an `extra_fields_values` object, with the requested names as keys, holding the `value` (multiple values are joined with a comma), `values` (an array with each individual value), `unit` and `type` of that custom field. Entries without the custom field won't have that key. This parameter does not filter the results. It also applies with `fast`.
(optional)
Integer *limit = 56; // Limit the number of results.
(optional) (default to 15)
Integer *offset = 56; // Skip a number of results. Use with limit to work the pagination.
(optional) (default to 0)
String *owner = owner_example; // Filter results by author (user id)
(optional)
Integer *scope = 56; // Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
(optional)
String *order = order_example; // Change the ordering of the results.
(optional)
String *sort = sort_example; // Change the sorting of results: ascending or descending.
(optional)
String *state = state_example; // Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
(optional) (default to 1)
Integer *full = 56; // Return all columns of each entry when set to 1.
(optional)
String *reactionQ = reactionQ_example; // Only entries with a reaction containing this text in its title, conditions or atmosphere, or in the name or formula of a component.
(optional)
String *reactionStructure = reactionStructure_example; // Only entries with a reaction component matching this structure, given as a SMILES or an InChIKey.
A SMILES finds components containing it as a substructure (fingerprint screening, it can return false positives).
An InChIKey finds components with the same connectivity (first block of the key).
Use reaction_exact to require the same structure, or reaction_structure_type to give a SMARTS pattern instead.
(optional)
String *reactionStructureType = reactionStructureType_example; // With smarts, reaction_structure is a SMARTS pattern: only entries with a reaction component matching it.
reaction_exact does not apply. The candidate components are limited to 20000: narrow them with reaction_role,
reaction_compound or reaction_item if needed.
(optional)
Integer *reactionExact = 56; // With reaction_structure: match the full InChIKey, or the complete fingerprint of the SMILES, instead of related structures.
(optional) (default to 0)
String *reactionRole = reactionRole_example; // Restrict reaction_structure, reaction_compound and reaction_item to components with this role.
(optional)
Integer *reactionCompound = 56; // Only entries with a reaction component linked to this compound.
(optional)
Integer *reactionItem = 56; // Only entries with a reaction component linked to this resource (bottle, batch or sample).
(optional)
String *reactionKey = reactionKey_example; // Only entries with the same transformation: the reaction_key of a reaction, derived from the InChIKeys of its reactants and products.
(optional)
ExperimentsApi *apiInstance = [[ExperimentsApi alloc] init];
// Read all experiments that are accessible
[apiInstance readExperimentsWith:q
extended:extended
related:related
relatedOrigin:relatedOrigin
compound:compound
category:category
status:status
tags[]:tags[]
extraFields[]:extraFields[]
limit:limit
offset:offset
owner:owner
scope:scope
order:order
sort:sort
state:state
full:full
reactionQ:reactionQ
reactionStructure:reactionStructure
reactionStructureType:reactionStructureType
reactionExact:reactionExact
reactionRole:reactionRole
reactionCompound:reactionCompound
reactionItem:reactionItem
reactionKey:reactionKey
completionHandler: ^(array[experiment] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ELabFtwRestApiV2Documentation = require('e_lab_ftw_rest_api_v2_documentation');
var defaultClient = ELabFtwRestApiV2Documentation.ApiClient.instance;
// Configure API key authorization: token
var token = defaultClient.authentications['token'];
token.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//token.apiKeyPrefix['Authorization'] = "Token"
var api = new ELabFtwRestApiV2Documentation.ExperimentsApi()
var opts = {
'q': q_example, // {{String}} Search for a term in title, body or elabid.
'extended': extended_example, // {{String}} Extended search (advanced query).
'related': 56, // {{Integer}} Look only for entries linked to this entry id.
'relatedOrigin': relatedOrigin_example, // {{String}} When using the "related" query parameter, select the type of the related ID (experiments or items)
'compound': 56, // {{Integer}} Look only for entries linked to this compound id.
'category': category_example, // {{String}} Add a filter on the Category. Supports comma separated list of numbers, including "null".
'status': status_example, // {{String}} Add a filter on the Status. Supports comma separated list of numbers, including "null".
'tags[]': , // {{array[String]}} An array of tags for filtering results containing all of these tags.
'extraFields[]': , // {{array[String]}} Names of custom fields (keys of metadata.extra_fields) to include in the response. Each entry will then have an `extra_fields_values` object, with the requested names as keys, holding the `value` (multiple values are joined with a comma), `values` (an array with each individual value), `unit` and `type` of that custom field. Entries without the custom field won't have that key. This parameter does not filter the results. It also applies with `fast`.
'limit': 56, // {{Integer}} Limit the number of results.
'offset': 56, // {{Integer}} Skip a number of results. Use with limit to work the pagination.
'owner': owner_example, // {{String}} Filter results by author (user id)
'scope': 56, // {{Integer}} Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
'order': order_example, // {{String}} Change the ordering of the results.
'sort': sort_example, // {{String}} Change the sorting of results: ascending or descending.
'state': state_example, // {{String}} Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
'full': 56, // {{Integer}} Return all columns of each entry when set to 1.
'reactionQ': reactionQ_example, // {{String}} Only entries with a reaction containing this text in its title, conditions or atmosphere, or in the name or formula of a component.
'reactionStructure': reactionStructure_example, // {{String}} Only entries with a reaction component matching this structure, given as a SMILES or an InChIKey.
A SMILES finds components containing it as a substructure (fingerprint screening, it can return false positives).
An InChIKey finds components with the same connectivity (first block of the key).
Use reaction_exact to require the same structure, or reaction_structure_type to give a SMARTS pattern instead.
'reactionStructureType': reactionStructureType_example, // {{String}} With smarts, reaction_structure is a SMARTS pattern: only entries with a reaction component matching it.
reaction_exact does not apply. The candidate components are limited to 20000: narrow them with reaction_role,
reaction_compound or reaction_item if needed.
'reactionExact': 56, // {{Integer}} With reaction_structure: match the full InChIKey, or the complete fingerprint of the SMILES, instead of related structures.
'reactionRole': reactionRole_example, // {{String}} Restrict reaction_structure, reaction_compound and reaction_item to components with this role.
'reactionCompound': 56, // {{Integer}} Only entries with a reaction component linked to this compound.
'reactionItem': 56, // {{Integer}} Only entries with a reaction component linked to this resource (bottle, batch or sample).
'reactionKey': reactionKey_example // {{String}} Only entries with the same transformation: the reaction_key of a reaction, derived from the InChIKeys of its reactants and products.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.readExperiments(opts, callback);
using System;
using System.Diagnostics;
using elabapi_python.Api;
using elabapi_python.Client;
using elabapi_python.Model;
namespace Example
{
public class readExperimentsExample
{
public void main()
{
// Configure API key authorization: token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new ExperimentsApi();
var q = q_example; // String | Search for a term in title, body or elabid.
(optional)
var extended = extended_example; // String | Extended search (advanced query).
(optional)
var related = 56; // Integer | Look only for entries linked to this entry id.
(optional)
var relatedOrigin = relatedOrigin_example; // String | When using the "related" query parameter, select the type of the related ID (experiments or items)
(optional)
var compound = 56; // Integer | Look only for entries linked to this compound id.
(optional)
var category = category_example; // String | Add a filter on the Category. Supports comma separated list of numbers, including "null".
(optional)
var status = status_example; // String | Add a filter on the Status. Supports comma separated list of numbers, including "null".
(optional)
var tags[] = new array[String](); // array[String] | An array of tags for filtering results containing all of these tags.
(optional)
var extraFields[] = new array[String](); // array[String] | Names of custom fields (keys of metadata.extra_fields) to include in the response. Each entry will then have an `extra_fields_values` object, with the requested names as keys, holding the `value` (multiple values are joined with a comma), `values` (an array with each individual value), `unit` and `type` of that custom field. Entries without the custom field won't have that key. This parameter does not filter the results. It also applies with `fast`.
(optional)
var limit = 56; // Integer | Limit the number of results.
(optional) (default to 15)
var offset = 56; // Integer | Skip a number of results. Use with limit to work the pagination.
(optional) (default to 0)
var owner = owner_example; // String | Filter results by author (user id)
(optional)
var scope = 56; // Integer | Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
(optional)
var order = order_example; // String | Change the ordering of the results.
(optional)
var sort = sort_example; // String | Change the sorting of results: ascending or descending.
(optional)
var state = state_example; // String | Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
(optional) (default to 1)
var full = 56; // Integer | Return all columns of each entry when set to 1.
(optional)
var reactionQ = reactionQ_example; // String | Only entries with a reaction containing this text in its title, conditions or atmosphere, or in the name or formula of a component.
(optional)
var reactionStructure = reactionStructure_example; // String | Only entries with a reaction component matching this structure, given as a SMILES or an InChIKey.
A SMILES finds components containing it as a substructure (fingerprint screening, it can return false positives).
An InChIKey finds components with the same connectivity (first block of the key).
Use reaction_exact to require the same structure, or reaction_structure_type to give a SMARTS pattern instead.
(optional)
var reactionStructureType = reactionStructureType_example; // String | With smarts, reaction_structure is a SMARTS pattern: only entries with a reaction component matching it.
reaction_exact does not apply. The candidate components are limited to 20000: narrow them with reaction_role,
reaction_compound or reaction_item if needed.
(optional)
var reactionExact = 56; // Integer | With reaction_structure: match the full InChIKey, or the complete fingerprint of the SMILES, instead of related structures.
(optional) (default to 0)
var reactionRole = reactionRole_example; // String | Restrict reaction_structure, reaction_compound and reaction_item to components with this role.
(optional)
var reactionCompound = 56; // Integer | Only entries with a reaction component linked to this compound.
(optional)
var reactionItem = 56; // Integer | Only entries with a reaction component linked to this resource (bottle, batch or sample).
(optional)
var reactionKey = reactionKey_example; // String | Only entries with the same transformation: the reaction_key of a reaction, derived from the InChIKeys of its reactants and products.
(optional)
try
{
// Read all experiments that are accessible
array[experiment] result = apiInstance.readExperiments(q, extended, related, relatedOrigin, compound, category, status, tags[], extraFields[], limit, offset, owner, scope, order, sort, state, full, reactionQ, reactionStructure, reactionStructureType, reactionExact, reactionRole, reactionCompound, reactionItem, reactionKey);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ExperimentsApi.readExperiments: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: token
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$api_instance = new Swagger\Client\ApiExperimentsApi();
$q = q_example; // String | Search for a term in title, body or elabid.
$extended = extended_example; // String | Extended search (advanced query).
$related = 56; // Integer | Look only for entries linked to this entry id.
$relatedOrigin = relatedOrigin_example; // String | When using the "related" query parameter, select the type of the related ID (experiments or items)
$compound = 56; // Integer | Look only for entries linked to this compound id.
$category = category_example; // String | Add a filter on the Category. Supports comma separated list of numbers, including "null".
$status = status_example; // String | Add a filter on the Status. Supports comma separated list of numbers, including "null".
$tags[] = ; // array[String] | An array of tags for filtering results containing all of these tags.
$extraFields[] = ; // array[String] | Names of custom fields (keys of metadata.extra_fields) to include in the response. Each entry will then have an `extra_fields_values` object, with the requested names as keys, holding the `value` (multiple values are joined with a comma), `values` (an array with each individual value), `unit` and `type` of that custom field. Entries without the custom field won't have that key. This parameter does not filter the results. It also applies with `fast`.
$limit = 56; // Integer | Limit the number of results.
$offset = 56; // Integer | Skip a number of results. Use with limit to work the pagination.
$owner = owner_example; // String | Filter results by author (user id)
$scope = 56; // Integer | Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
$order = order_example; // String | Change the ordering of the results.
$sort = sort_example; // String | Change the sorting of results: ascending or descending.
$state = state_example; // String | Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
$full = 56; // Integer | Return all columns of each entry when set to 1.
$reactionQ = reactionQ_example; // String | Only entries with a reaction containing this text in its title, conditions or atmosphere, or in the name or formula of a component.
$reactionStructure = reactionStructure_example; // String | Only entries with a reaction component matching this structure, given as a SMILES or an InChIKey.
A SMILES finds components containing it as a substructure (fingerprint screening, it can return false positives).
An InChIKey finds components with the same connectivity (first block of the key).
Use reaction_exact to require the same structure, or reaction_structure_type to give a SMARTS pattern instead.
$reactionStructureType = reactionStructureType_example; // String | With smarts, reaction_structure is a SMARTS pattern: only entries with a reaction component matching it.
reaction_exact does not apply. The candidate components are limited to 20000: narrow them with reaction_role,
reaction_compound or reaction_item if needed.
$reactionExact = 56; // Integer | With reaction_structure: match the full InChIKey, or the complete fingerprint of the SMILES, instead of related structures.
$reactionRole = reactionRole_example; // String | Restrict reaction_structure, reaction_compound and reaction_item to components with this role.
$reactionCompound = 56; // Integer | Only entries with a reaction component linked to this compound.
$reactionItem = 56; // Integer | Only entries with a reaction component linked to this resource (bottle, batch or sample).
$reactionKey = reactionKey_example; // String | Only entries with the same transformation: the reaction_key of a reaction, derived from the InChIKeys of its reactants and products.
try {
$result = $api_instance->readExperiments($q, $extended, $related, $relatedOrigin, $compound, $category, $status, $tags[], $extraFields[], $limit, $offset, $owner, $scope, $order, $sort, $state, $full, $reactionQ, $reactionStructure, $reactionStructureType, $reactionExact, $reactionRole, $reactionCompound, $reactionItem, $reactionKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ExperimentsApi->readExperiments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExperimentsApi;
# Configure API key authorization: token
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";
my $api_instance = WWW::SwaggerClient::ExperimentsApi->new();
my $q = q_example; # String | Search for a term in title, body or elabid.
my $extended = extended_example; # String | Extended search (advanced query).
my $related = 56; # Integer | Look only for entries linked to this entry id.
my $relatedOrigin = relatedOrigin_example; # String | When using the "related" query parameter, select the type of the related ID (experiments or items)
my $compound = 56; # Integer | Look only for entries linked to this compound id.
my $category = category_example; # String | Add a filter on the Category. Supports comma separated list of numbers, including "null".
my $status = status_example; # String | Add a filter on the Status. Supports comma separated list of numbers, including "null".
my $tags[] = []; # array[String] | An array of tags for filtering results containing all of these tags.
my $extraFields[] = []; # array[String] | Names of custom fields (keys of metadata.extra_fields) to include in the response. Each entry will then have an `extra_fields_values` object, with the requested names as keys, holding the `value` (multiple values are joined with a comma), `values` (an array with each individual value), `unit` and `type` of that custom field. Entries without the custom field won't have that key. This parameter does not filter the results. It also applies with `fast`.
my $limit = 56; # Integer | Limit the number of results.
my $offset = 56; # Integer | Skip a number of results. Use with limit to work the pagination.
my $owner = owner_example; # String | Filter results by author (user id)
my $scope = 56; # Integer | Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
my $order = order_example; # String | Change the ordering of the results.
my $sort = sort_example; # String | Change the sorting of results: ascending or descending.
my $state = state_example; # String | Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
my $full = 56; # Integer | Return all columns of each entry when set to 1.
my $reactionQ = reactionQ_example; # String | Only entries with a reaction containing this text in its title, conditions or atmosphere, or in the name or formula of a component.
my $reactionStructure = reactionStructure_example; # String | Only entries with a reaction component matching this structure, given as a SMILES or an InChIKey.
A SMILES finds components containing it as a substructure (fingerprint screening, it can return false positives).
An InChIKey finds components with the same connectivity (first block of the key).
Use reaction_exact to require the same structure, or reaction_structure_type to give a SMARTS pattern instead.
my $reactionStructureType = reactionStructureType_example; # String | With smarts, reaction_structure is a SMARTS pattern: only entries with a reaction component matching it.
reaction_exact does not apply. The candidate components are limited to 20000: narrow them with reaction_role,
reaction_compound or reaction_item if needed.
my $reactionExact = 56; # Integer | With reaction_structure: match the full InChIKey, or the complete fingerprint of the SMILES, instead of related structures.
my $reactionRole = reactionRole_example; # String | Restrict reaction_structure, reaction_compound and reaction_item to components with this role.
my $reactionCompound = 56; # Integer | Only entries with a reaction component linked to this compound.
my $reactionItem = 56; # Integer | Only entries with a reaction component linked to this resource (bottle, batch or sample).
my $reactionKey = reactionKey_example; # String | Only entries with the same transformation: the reaction_key of a reaction, derived from the InChIKeys of its reactants and products.
eval {
my $result = $api_instance->readExperiments(q => $q, extended => $extended, related => $related, relatedOrigin => $relatedOrigin, compound => $compound, category => $category, status => $status, tags[] => $tags[], extraFields[] => $extraFields[], limit => $limit, offset => $offset, owner => $owner, scope => $scope, order => $order, sort => $sort, state => $state, full => $full, reactionQ => $reactionQ, reactionStructure => $reactionStructure, reactionStructureType => $reactionStructureType, reactionExact => $reactionExact, reactionRole => $reactionRole, reactionCompound => $reactionCompound, reactionItem => $reactionItem, reactionKey => $reactionKey);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ExperimentsApi->readExperiments: $@\n";
}
from __future__ import print_statement
import time
import elabapi_python
from elabapi_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: token
elabapi_python.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# elabapi_python.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = elabapi_python.ExperimentsApi()
q = q_example # String | Search for a term in title, body or elabid.
(optional)
extended = extended_example # String | Extended search (advanced query).
(optional)
related = 56 # Integer | Look only for entries linked to this entry id.
(optional)
relatedOrigin = relatedOrigin_example # String | When using the "related" query parameter, select the type of the related ID (experiments or items)
(optional)
compound = 56 # Integer | Look only for entries linked to this compound id.
(optional)
category = category_example # String | Add a filter on the Category. Supports comma separated list of numbers, including "null".
(optional)
status = status_example # String | Add a filter on the Status. Supports comma separated list of numbers, including "null".
(optional)
tags[] = # array[String] | An array of tags for filtering results containing all of these tags.
(optional)
extraFields[] = # array[String] | Names of custom fields (keys of metadata.extra_fields) to include in the response. Each entry will then have an `extra_fields_values` object, with the requested names as keys, holding the `value` (multiple values are joined with a comma), `values` (an array with each individual value), `unit` and `type` of that custom field. Entries without the custom field won't have that key. This parameter does not filter the results. It also applies with `fast`.
(optional)
limit = 56 # Integer | Limit the number of results.
(optional) (default to 15)
offset = 56 # Integer | Skip a number of results. Use with limit to work the pagination.
(optional) (default to 0)
owner = owner_example # String | Filter results by author (user id)
(optional)
scope = 56 # Integer | Set the scope for the results. 1: self, 2: team, 3: everything. It defaults to the user value stored in preferences.
(optional)
order = order_example # String | Change the ordering of the results.
(optional)
sort = sort_example # String | Change the sorting of results: ascending or descending.
(optional)
state = state_example # String | Filter results based on their state: 1 (Normal), 2 (Archived), 3 (Deleted). Supports comma separated values.
(optional) (default to 1)
full = 56 # Integer | Return all columns of each entry when set to 1.
(optional)
reactionQ = reactionQ_example # String | Only entries with a reaction containing this text in its title, conditions or atmosphere, or in the name or formula of a component.
(optional)
reactionStructure = reactionStructure_example # String | Only entries with a reaction component matching this structure, given as a SMILES or an InChIKey.
A SMILES finds components containing it as a substructure (fingerprint screening, it can return false positives).
An InChIKey finds components with the same connectivity (first block of the key).
Use reaction_exact to require the same structure, or reaction_structure_type to give a SMARTS pattern instead.
(optional)
reactionStructureType = reactionStructureType_example # String | With smarts, reaction_structure is a SMARTS pattern: only entries with a reaction component matching it.
reaction_exact does not apply. The candidate components are limited to 20000: narrow them with reaction_role,
reaction_compound or reaction_item if needed.
(optional)
reactionExact = 56 # Integer | With reaction_structure: match the full InChIKey, or the complete fingerprint of the SMILES, instead of related structures.
(optional) (default to 0)
reactionRole = reactionRole_example # String | Restrict reaction_structure, reaction_compound and reaction_item to components with this role.
(optional)
reactionCompound = 56 # Integer | Only entries with a reaction component linked to this compound.
(optional)
reactionItem = 56 # Integer | Only entries with a reaction component linked to this resource (bottle, batch or sample).
(optional)
reactionKey = reactionKey_example # String | Only entries with the same transformation: the reaction_key of a reaction, derived from the InChIKeys of its reactants and products.
(optional)
try:
# Read all experiments that are accessible
api_response = api_instance.read_experiments(q=q, extended=extended, related=related, relatedOrigin=relatedOrigin, compound=compound, category=category, status=status, tags[]=tags[], extraFields[]=extraFields[], limit=limit, offset=offset, owner=owner, scope=scope, order=order, sort=sort, state=state, full=full, reactionQ=reactionQ, reactionStructure=reactionStructure, reactionStructureType=reactionStructureType, reactionExact=reactionExact, reactionRole=reactionRole, reactionCompound=reactionCompound, reactionItem=reactionItem, reactionKey=reactionKey)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExperimentsApi->readExperiments: %s\n" % e)