Skip to content

Latest commit

 

History

History
654 lines (441 loc) · 20.2 KB

FactorsApi.md

File metadata and controls

654 lines (441 loc) · 20.2 KB

swagger.api.FactorsApi

Load the API package

import 'package:swagger/api.dart';

All URIs are relative to https://localhost

Method HTTP request Description
createFactor POST /core/experiments/factors Create a factor
deleteFactor DELETE /core/experiments/factors/{uri} Delete a factor
deleteFactorLevel DELETE /core/experiments/factors/levels/{uri} Delete a factor level
getFactorAssociatedExperiments GET /core/experiments/factors/{uri}/experiments Get factor associated experiments
getFactorByURI GET /core/experiments/factors/{uri} Get a factor
getFactorLevel GET /core/experiments/factors/levels/{uri} Get a factor level
getFactorLevelDetail GET /core/experiments/factors/levels/{uri}/details Get a factor level
getFactorLevels GET /core/experiments/factors/{uri}/levels Get factor levels
getFactorsByURIs GET /core/experiments/factors/by_uris Get a list of factors by their URIs
searchCategories GET /core/experiments/factors/categories Search categories
searchFactorLevels GET /core/experiments/factors/factor_levels Search factors levels
searchFactors GET /core/experiments/factors Search factors
updateFactor PUT /core/experiments/factors Update a factor

createFactor

createFactor(authorization, body, acceptLanguage)

Create a factor

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var authorization = authorization_example; // String | Authentication token
var body = new FactorCreationDTO(); // FactorCreationDTO | Factor description
var acceptLanguage = "en"; // String | Request accepted language

try { 
    api_instance.createFactor(authorization, body, acceptLanguage);
} catch (e) {
    print("Exception when calling FactorsApi->createFactor: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
body FactorCreationDTO Factor description [optional]
acceptLanguage String Request accepted language [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFactor

ObjectUriResponse deleteFactor(uri, authorization, acceptLanguage)

Delete a factor

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var uri = "platform-factor:irrigation"; // String | Factor URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.deleteFactor(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->deleteFactor: $e\n");
}

Parameters

Name Type Description Notes
uri String Factor URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFactorLevel

ObjectUriResponse deleteFactorLevel(uri, authorization, acceptLanguage)

Delete a factor level

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var uri = "platform-factor:irrigation"; // String | Factor level URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.deleteFactorLevel(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->deleteFactorLevel: $e\n");
}

Parameters

Name Type Description Notes
uri String Factor level URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFactorAssociatedExperiments

List getFactorAssociatedExperiments(uri, authorization, acceptLanguage)

Get factor associated experiments

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var uri = "platform-factor:irrigation"; // String | Factor URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.getFactorAssociatedExperiments(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->getFactorAssociatedExperiments: $e\n");
}

Parameters

Name Type Description Notes
uri String Factor URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

List

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFactorByURI

FactorDetailsGetDTO getFactorByURI(uri, authorization, acceptLanguage)

Get a factor

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var uri = "platform-factor:irrigation"; // String | Factor URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.getFactorByURI(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->getFactorByURI: $e\n");
}

Parameters

Name Type Description Notes
uri String Factor URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

FactorDetailsGetDTO

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFactorLevel

List getFactorLevel(uri, authorization, acceptLanguage)

Get a factor level

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var uri = "http://opensilex/set/factorLevel/irrigation.ww"; // String | Factor Level URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.getFactorLevel(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->getFactorLevel: $e\n");
}

Parameters

Name Type Description Notes
uri String Factor Level URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

List

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFactorLevelDetail

List getFactorLevelDetail(uri, authorization, acceptLanguage)

Get a factor level

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var uri = "http://opensilex/set/factorLevel/irrigation.ww"; // String | Factor Level URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.getFactorLevelDetail(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->getFactorLevelDetail: $e\n");
}

Parameters

Name Type Description Notes
uri String Factor Level URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

List

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFactorLevels

List getFactorLevels(uri, authorization, acceptLanguage)

Get factor levels

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var uri = "platform-factor:irrigation"; // String | Factor URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.getFactorLevels(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->getFactorLevels: $e\n");
}

Parameters

Name Type Description Notes
uri String Factor URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

List

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFactorsByURIs

List getFactorsByURIs(uris, authorization, acceptLanguage)

Get a list of factors by their URIs

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var uris = []; // List<String> | Factors URIs
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.getFactorsByURIs(uris, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->getFactorsByURIs: $e\n");
}

Parameters

Name Type Description Notes
uris List<String> Factors URIs
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

List

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

searchCategories

List searchCategories(name, orderBy, acceptLanguage)

Search categories

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var name = "describing"; // String | Category name regex pattern
var orderBy = ["name=asc"]; // List<String> | List of fields to sort as an array of fieldName=asc|desc
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.searchCategories(name, orderBy, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->searchCategories: $e\n");
}

Parameters

Name Type Description Notes
name String Category name regex pattern [optional]
orderBy List<String> List of fields to sort as an array of fieldName=asc desc
acceptLanguage String Request accepted language [optional]

Return type

List

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

searchFactorLevels

List searchFactorLevels(authorization, name, orderBy, page, pageSize, acceptLanguage)

Search factors levels

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var authorization = authorization_example; // String | Authentication token
var name = "WW"; // String | Regex pattern for filtering on name
var orderBy = ["name=asc"]; // List<String> | List of fields to sort as an array of fieldName=asc|desc
var page = 0; // int | Page number
var pageSize = 20; // int | Page size
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.searchFactorLevels(authorization, name, orderBy, page, pageSize, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->searchFactorLevels: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
name String Regex pattern for filtering on name [optional]
orderBy List<String> List of fields to sort as an array of fieldName=asc desc
page int Page number [optional] [default to 0]
pageSize int Page size [optional] [default to 20]
acceptLanguage String Request accepted language [optional]

Return type

List

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

searchFactors

List searchFactors(authorization, name, description, category, experiment, orderBy, page, pageSize, acceptLanguage)

Search factors

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var authorization = authorization_example; // String | Authentication token
var name = "irrigation"; // String | Regex pattern for filtering on name
var description = "20ml of water"; // String | Regex pattern for filtering on description
var category = "http://aims.fao.org/aos/agrovoc/c_32668"; // String | Filter by category of a factor
var experiment = "demo-exp:experiment1"; // String | Filter by experiment
var orderBy = ["uri=asc"]; // List<String> | List of fields to sort as an array of fieldName=asc|desc
var page = 0; // int | Page number
var pageSize = 20; // int | Page size
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.searchFactors(authorization, name, description, category, experiment, orderBy, page, pageSize, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->searchFactors: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
name String Regex pattern for filtering on name [optional]
description String Regex pattern for filtering on description [optional]
category String Filter by category of a factor [optional]
experiment String Filter by experiment [optional]
orderBy List<String> List of fields to sort as an array of fieldName=asc desc
page int Page number [optional] [default to 0]
pageSize int Page size [optional] [default to 20]
acceptLanguage String Request accepted language [optional]

Return type

List

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateFactor

ObjectUriResponse updateFactor(authorization, body, acceptLanguage)

Update a factor

Example

import 'package:swagger/api.dart';

var api_instance = new FactorsApi();
var authorization = authorization_example; // String | Authentication token
var body = new FactorUpdateDTO(); // FactorUpdateDTO | Factor description
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.updateFactor(authorization, body, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling FactorsApi->updateFactor: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
body FactorUpdateDTO Factor description [optional]
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]