FAIRtracks APIs

Augmentation

augment

FAIRtracks metadata augmentation service

The augmentation endpoint creates and fills fields in the JSON that are supposed to be autogenerated. This includes labels fetched from the corresponding ontology files, and an ontology versions list.


/augment

Usage and SDK Samples

curl -X POST "https://fairtracks.elixir.no/api/augment"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AugmentationApi;

import java.io.File;
import java.util.*;

public class AugmentationApiExample {

    public static void main(String[] args) {
        
        AugmentationApi apiInstance = new AugmentationApi();
        Fairtracks fairData = ; // Fairtracks | Fair data to augment
        try {
            apiInstance.augment(fairData);
        } catch (ApiException e) {
            System.err.println("Exception when calling AugmentationApi#augment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AugmentationApi;

public class AugmentationApiExample {

    public static void main(String[] args) {
        AugmentationApi apiInstance = new AugmentationApi();
        Fairtracks fairData = ; // Fairtracks | Fair data to augment
        try {
            apiInstance.augment(fairData);
        } catch (ApiException e) {
            System.err.println("Exception when calling AugmentationApi#augment");
            e.printStackTrace();
        }
    }
}
Fairtracks *fairData = ; // Fair data to augment (optional)

AugmentationApi *apiInstance = [[AugmentationApi alloc] init];

// FAIRtracks metadata augmentation service
[apiInstance augmentWith:fairData
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FaiRtracksApIs = require('fai_rtracks_ap_is');

var api = new FaiRtracksApIs.AugmentationApi()

var opts = { 
  'fairData':  // {Fairtracks} Fair data to augment
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.augment(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class augmentExample
    {
        public void main()
        {
            
            var apiInstance = new AugmentationApi();
            var fairData = new Fairtracks(); // Fairtracks | Fair data to augment (optional) 

            try
            {
                // FAIRtracks metadata augmentation service
                apiInstance.augment(fairData);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AugmentationApi.augment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AugmentationApi();
$fairData = ; // Fairtracks | Fair data to augment

try {
    $api_instance->augment($fairData);
} catch (Exception $e) {
    echo 'Exception when calling AugmentationApi->augment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AugmentationApi;

my $api_instance = WWW::SwaggerClient::AugmentationApi->new();
my $fairData = WWW::SwaggerClient::Object::Fairtracks->new(); # Fairtracks | Fair data to augment

eval { 
    $api_instance->augment(fairData => $fairData);
};
if ($@) {
    warn "Exception when calling AugmentationApi->augment: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AugmentationApi()
fairData =  # Fairtracks | Fair data to augment (optional)

try: 
    # FAIRtracks metadata augmentation service
    api_instance.augment(fairData=fairData)
except ApiException as e:
    print("Exception when calling AugmentationApi->augment: %s\n" % e)

Parameters

Body parameters
Name Description
fairData

Responses

Status: 200 - successfully augmented

Status: 500 - augmentation error


Conversion

json2gsuite

FAIRtracks format conversion service

JSON-to-GSuite endpoint is used for converting JSON metadata, that follows the FAIR standard, to GSuite format. Such a conversion is needed in order to allow GSuite HyperBrowser to be a TrackFind client and to consume through its track search API.


/json2gsuite

Usage and SDK Samples

curl -X POST "https://fairtracks.elixir.no/api/json2gsuite"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ConversionApi;

import java.io.File;
import java.util.*;

public class ConversionApiExample {

    public static void main(String[] args) {
        
        ConversionApi apiInstance = new ConversionApi();
        Fairtracks fairData = ; // Fairtracks | Fair data to conver
        try {
            apiInstance.json2gsuite(fairData);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConversionApi#json2gsuite");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ConversionApi;

public class ConversionApiExample {

    public static void main(String[] args) {
        ConversionApi apiInstance = new ConversionApi();
        Fairtracks fairData = ; // Fairtracks | Fair data to conver
        try {
            apiInstance.json2gsuite(fairData);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConversionApi#json2gsuite");
            e.printStackTrace();
        }
    }
}
Fairtracks *fairData = ; // Fair data to conver (optional)

ConversionApi *apiInstance = [[ConversionApi alloc] init];

// FAIRtracks format conversion service
[apiInstance json2gsuiteWith:fairData
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FaiRtracksApIs = require('fai_rtracks_ap_is');

var api = new FaiRtracksApIs.ConversionApi()

var opts = { 
  'fairData':  // {Fairtracks} Fair data to conver
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.json2gsuite(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class json2gsuiteExample
    {
        public void main()
        {
            
            var apiInstance = new ConversionApi();
            var fairData = new Fairtracks(); // Fairtracks | Fair data to conver (optional) 

            try
            {
                // FAIRtracks format conversion service
                apiInstance.json2gsuite(fairData);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConversionApi.json2gsuite: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ConversionApi();
$fairData = ; // Fairtracks | Fair data to conver

try {
    $api_instance->json2gsuite($fairData);
} catch (Exception $e) {
    echo 'Exception when calling ConversionApi->json2gsuite: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ConversionApi;

my $api_instance = WWW::SwaggerClient::ConversionApi->new();
my $fairData = WWW::SwaggerClient::Object::Fairtracks->new(); # Fairtracks | Fair data to conver

eval { 
    $api_instance->json2gsuite(fairData => $fairData);
};
if ($@) {
    warn "Exception when calling ConversionApi->json2gsuite: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ConversionApi()
fairData =  # Fairtracks | Fair data to conver (optional)

try: 
    # FAIRtracks format conversion service
    api_instance.json2gsuite(fairData=fairData)
except ApiException as e:
    print("Exception when calling ConversionApi->json2gsuite: %s\n" % e)

Parameters

Body parameters
Name Description
fairData

Responses

Status: 200 - successfully converted

Status: 500 - conversion error