curl -X GET\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"https://elab.local:3148/api/v2/experiments?q=&extended=&related=&related_origin=&cat=&status=&tags[]=&limit=&offset=&owner=&scope=&order=&sort=&state="
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)
String cat = cat_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.
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.
try {
array[experiment] result = apiInstance.readExperiments(q, extended, related, relatedOrigin, cat, status, tags[], limit, offset, owner, scope, order, sort, state);
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)
String cat = cat_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.
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.
try {
array[experiment] result = apiInstance.readExperiments(q, extended, related, relatedOrigin, cat, status, tags[], limit, offset, owner, scope, order, sort, state);
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)
String *cat = cat_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)
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)
ExperimentsApi *apiInstance = [[ExperimentsApi alloc] init];
// Read all experiments that are accessible
[apiInstance readExperimentsWith:q
extended:extended
related:related
relatedOrigin:relatedOrigin
cat:cat
status:status
tags[]:tags[]
limit:limit
offset:offset
owner:owner
scope:scope
order:order
sort:sort
state:state
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)
'cat': cat_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.
'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.
};
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 cat = cat_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 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)
try
{
// Read all experiments that are accessible
array[experiment] result = apiInstance.readExperiments(q, extended, related, relatedOrigin, cat, status, tags[], limit, offset, owner, scope, order, sort, state);
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)
$cat = cat_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.
$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.
try {
$result = $api_instance->readExperiments($q, $extended, $related, $relatedOrigin, $cat, $status, $tags[], $limit, $offset, $owner, $scope, $order, $sort, $state);
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 $cat = cat_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 $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.
eval {
my $result = $api_instance->readExperiments(q => $q, extended => $extended, related => $related, relatedOrigin => $relatedOrigin, cat => $cat, status => $status, tags[] => $tags[], limit => $limit, offset => $offset, owner => $owner, scope => $scope, order => $order, sort => $sort, state => $state);
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)
cat = cat_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)
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)
try:
# Read all experiments that are accessible
api_response = api_instance.read_experiments(q=q, extended=extended, related=related, relatedOrigin=relatedOrigin, cat=cat, status=status, tags[]=tags[], limit=limit, offset=offset, owner=owner, scope=scope, order=order, sort=sort, state=state)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExperimentsApi->readExperiments: %s\n" % e)