Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode
OSTrails Documentation
Light Logo Dark Logo

Architecture

  • Introduction
  • DMP IF
  • SKG IF
  • FAIR IF

Commons

  • Introduction
  • Governance
  • DMP Commons
    • DMP Common Standard for maDMPs
    • OSTrails Application Profile for maDMPs
    • OSTrails maDMP API Specification
    • maDMP mappings
      • Science Europe maDMP mapping
      • Austrian FWF – maDMP mapping
  • SKG Commons
    • OSTrails Metadata Model for SKGs
    • OSTrails SKG-IF API Specification
    • OSTrails SKG-IF Extensions
    • SKG-IF mappings
      • DDI SKG-IF mapping
      • RO-Crate SKG-IF mapping
      • OpenAIRE Graph SKG-IF mapping
  • FAIR Commons
    • Guidance Element Specification
    • FAIR Test Results Vocabulary (FTR)
    • Assessment Recommended API
    • Catalogue of Benchmarks and Metrics
    • Catalogue of Tests
    • Catalogue of Benchmark Scoring Algorithms
    • Code of Shared Tests
    • Tutorials
      • How define my Benchmark and its associated specialised Metrics
      • How find a test for my digital object
      • How to run a test that exists
      • How to deploy Champion myself
      • How to define and run a scoring algorithm
      • How to create a benchmark
      • How to create a metric
      • How to know what are the tests in the CESSDA benchmark
      • How to register and curate a metric in FS
      • How create a test (service) following the FTR API
      • How register a test
      • How host/deploy a test
      • As a fair assessment developer, how comply to FTR spec to interoperate with others
        • How have others use my metrics
        • How to create a metric
        • Creating a FAIR Benchmark and Metrics
        • How to create a test (service) following the FTR API
        • Defining and Running a FAIR Benchmark Assessment Algorithm
        • How to run a test that exists
      • How have others use my metrics

Tools

  • FAIR Tools
    • FAIR Champion
    • FOOPS
    • FAIROS
    • FAIRsharing
    • FAIR Assessment Authoring Tool
    • FAIR Validator
  • DMP Tools
  • SKG Tools
    • OpenAIRE Graph SKG-IF API
    • RO-HUB SKG-IF API
    • CESSDA SKG-IF API

Other

  • Vocabulary and Terminology
  • Contributing Guidelines
  • Resources
  • Contributors and License
Back to top

Assessment Recommended API¶

The FAIR-IF follows, as closely as possible, the REST standard; however, unlike many REST architectures, not all identifiers in the IF are “local”, and thus it is often necessary to pass the full GUID of an identifier from one component to another, or from client to server. For example, the GUID of a Benchmark is the DOI of that Benchmark as recorded in the FAIRsharing registry, and as such, it cannot become part of the URL of the REST interface.

Nevertheless, there are two “types” of calls in the FAIR-IF. Calls that are intended to retrieve information and calls that are intended to trigger an activity (such as a test or assessment). The latter kinds of calls are prefixed with /assess/.

Please refer to the paragraphs below for API calls or implementation. An OpenAPI yaml specification for FTR is available in the following [link](https://github.com/OSTrails/FAIR_testing_resource_vocabulary/blob/main/development/api/open_api_description.yaml) including examples and method calls.

GET calls¶

Each of following methods will return metadata of the artifact in JSON-LD, following the FAIR-IF Application Profile. The method MUST accept a GET string with key/value as in the table below. The same method MAY accept a JSON Body as in Table 1, via HTTP POST.

GET endpoints¶

Method

Parameter

Returns

/tests/

testid

A list with all the test identifiers supported by the tool. When an id is sent, a DCAT record in JSON-LD is returned.

/benchmarks/

bmid

A list with all the benchmark identifiers supported by the tool. When an id is sent, a DCAT record in JSON-LD is returned.

/metrics/

mid

A list with all the metrics identifiers supported by the tool. When an id is sent, a DCAT record in JSON-LD is returned.

/algorithms/

aid

A list with all the algorithms identifiers supported by the tool. When an id is sent, a DCAT record in JSON-LD is returned.

POST calls¶

All post requests must submit a body with the resource to assess as follows:

{
    "resource_identifier": "https://w3id.org/example#"
}
POST endpoints¶

Method

Parameter

Returns

/assess/test/

testid and resource_identifier

Test result in JSON-LD

/assess/benchmark/

bmid and resource_identifier

Test result in JSON-LD

/assess/algorithm/

algoid and resource_identifier

Test result in JSON-LD

In some cases, FAIR assessments may require inspecting multiple large resources. This is, for example, the case when assessing Research Objects. In such situations, the API may not immediately return the test results in JSON-LD format. Instead, it returns a JSON response with the following information:

{
  "ticket_id": "<ID of the response>"
}

In this case, the API returns an HTTP status code 202 (Accepted), indicating that the assessment request has been successfully created. Additionally, the response header Location contains a link where the results will be available once generated.

The link follows this format:

/assess/algorithm/{ticket_id}

When accessing this link, you may receive one of the following HTTP status codes:

  • 404 (Not Found) if the results have not yet been generated

  • 200 (OK) if the results are available, returned in the same JSON-LD format as a standard test result

Next
Metric and Benchmark Commons
Previous
FAIR Testing Resource Vocabulary (FTR)
CC-BY 4.0
Supporting EOSC
EU Funded Project
On this page
  • Assessment Recommended API
    • GET calls
    • POST calls