Skip to content

Restful APIs

Jeremy Debattista edited this page May 31, 2019 · 5 revisions

Assessment APIs

Assessing a Dataset

In order to assess a dataset, you need to use an application like cURL in order to send a request.

API URL: /v4/assessment/compute
Method: POST
Body Parameters:

  • Dataset-Location - Location of data dump (RDF/XML, TURTLE, NQUAD, NTRIPLES, GZ, etc..), SPARQL endpoint, or HDT file;
  • Quality-Report-Required - set to true if you want to get a problem report in TURTLE format;
  • Metrics-Configuration - Metrics that need to be assessed. The input format is JSON-LD;
  • Dataset-PLD - The HTTP pay-level domain of the dataset being assessed;
  • Crawl-Date - [OPTIONAL] string date in format YYYY-MM-DD if you need to assess a past dataset;
  • Is-Sparql-Endpoint - set to true the data you are reading is from a SPARQL endpoint instead of a data dump.

Input Example:

Dataset-Location:/Users/jeremy/Downloads/www.w3.org.nt.gz
Quality-Report-Required:true
Metrics-Configuration:{
  "@context": {
    "lmi": "http://purl.org/eis/vocab/lmi#",
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "xsd": "http://www.w3.org/2001/XMLSchema#" },
    "@id": "_:ub104bL6C1",
    "@type": "lmi:MetricConfiguration",
    "lmi:metric": [
      "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.MisusedOwlDatatypeOrObjectProperties",
      "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.MisplacedClassesOrProperties",
      "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.UsageOfDeprecatedClassesOrProperties"
    ]}
Dataset-PLD:http://www.w3.org
Is-Sparql-Endpoint:false

Output Format:JSON
Output:

Key Value Type Comment
Request-ID String The ID of the dataset under assessment.
Dataset-Location String Physical location of dataset being assessed
Status String Shows the current status of the assessment. The values are INPROGRESS, SUCCESSFUL, CANCELLED, or FAILED
Agent String The assessment framework's URL
Dataset-PLD String Dataset PLD being assessed
Assessment-Date Date Assessment initiation date.
Is-Sparql-Endpoint Boolean Returns true if the Dataset-Location is a SPARQL endpoint.

Output Example:

{
    "Request-ID": "60d3b77b-d4f2-4103-9d2e-266eae635e24",
    "Dataset-Location": "/Users/jeremy/Downloads/swdf-2012-11-28.hdt",
    "Status": "INPROGRESS",
    "Agent": "http://0.0.0.0:8080/Luzzu/",
    "Dataset-PLD": "http://swdf.org",
    "Assessment-Date": "2018-10-11 23:31:05",
    "Is-Sparql-Endpoint": false
}

Tracking the progress of Datasets under assessment

  • Statistics (GET Requests)

    1. Return a list of pending requests: /v4/assessment/pending
    2. Return a list of successful requests: /v4/assessment/successful
    3. Return a list of cancelled or failed requests: /v4/assessment/failed
    4. Return the statistics of a particular request (REQUEST-ID): /v4/assessment/statistics/[REQUEST-ID] - here you need to replace [REQUEST-ID] with the request id given during the initialisation of the assessment. You can get that ID from the pending requests.
    5. Return the status (INPROGRESS / SUCCESSFUL / CANCELLED / FAILED) of a request: /v4/assessment/status/[REQUEST-ID]
  • Modifying Assessment (POST Requests)

    1. Cancel a request: /v4/assessment/cancel. This is a post request and the required parameter is only Request-ID and the value should be the ID of the assessment you would like to cancel.

Dataset APIs

Get Profiling Data for an Observation

This call will return the profiling details of a particular observation

API URL: /v4/metric/observation/profile
Method: POST
Body Parameters:

  • Dataset-PLD - The PLD of the dataset for which the observation is present
  • Observation - The Observation URI for profiling

Output Format: JSON
Output:

Key Value Type Comment
Total-Dataset-Triples Long The total number of triples in a dataset.
Total-Dataset-Triples-Assessed Long The total number of triples assessed in a dataset
Estimation-Technique-Used String or URI The value holds either the name or the URI of the estimate technique used (if any)
Estimation-Technique-Used-ValueType String Gives the value of URI if the Estimation-Technique-Used value is a Web link or String if otherwise.
Estimation-Parameter Array The values in this array defines the parameters used for some estimation technique for the observation in question
Profiling-Properties Array Provides a list of extra profiling properties for an observation.
Provenance-Properties Array Provides a list of extra provenance properties for an observation that might be required to re-run the metric.

Estimation-Parameter Object:

Key Value Type Comment
Key String The parameter's name in the estimate algorithm
Value Double The value of the parameter (i.e. the Key)

Profiling-Properties and Provenance-Properties Objects:

Key Value Type Comment
Label String The property's label
Comment String The property's description
Value Object The value of the property. Has an open value type
Note: If the key has no value, it will not be returned by the API.

Example:

{
    "Total-Dataset-Triples": 182011590,
    "Total-Dataset-Triples-Assessed": 182011590,
    "Estimation-Technique-Used": "https://dblp.org/rec/journals/corr/abs-1212-3964",
    "Estimation-Technique-Used-ValueType": "URI",
    "Estimation-Parameter": [
        {
            "Key": "k",
            "Value": 13
        },
        {
            "Key": "M",
            "Value": 5500000
        }
    ],
    "Profiling-Properties": [
        {
            "Label": "Total Number of Literals",
            "Comment": "Profiling property which defines the total number of literals in a dataset that were identified during the assessment.",
            "Value": 64582282
        }
    ]
}
}

Get latest observations for a particular dataset

This call will return the latest observation of all assessed metrics in a given dataset

API URL: /v4/dataset/latest/
Method: POST
Body Parameters:

  • Dataset-PLD - The PLD of the dataset for which the observation is present

Output Format: JSON
Output:

Key Value Type Comment
Metrics Array Provides a list of Metrics assessed on the given dataset

Metrics Object:

Key Value Type Comment
Category String The category of the assessed metric.
Dimension String The dimension of the assessed metric.
Metric-Label String Textual description of the metric
Metric-URI URI The Linked Data resource URI of the assessed metric.
Observation Array Array of observations which in this case will only include one item, the latest one.

Observation Object:

Key Value Type Comment
Observation-URI URI The Linked Data resource URI of the observation.
Date-Computed String The date of the observation.
Value Object The value of the observation. Its type is defined by the Value-Type key
Value-Type String The datatype of the Value of the observation.
Computed-On URI The dataset URL, usually corresponds to the PLD, the observation was performed on.
Graph-URI URI The Linked Data graph URI the observation belongs to.

Example:

{
    "Metrics": [
        {
            "Dimension": "Versatility",
            "Category": "Representational",
            "Metric-Label": "Different Serialisation Metric",
            "Metric-URI": "https://w3id.org/lodquator/resource/6f48243f-91cb-4315-a745-8484bc18edec",
            "Observations": [
                {
                    "Observation-URI": "https://w3id.org/lodquator/resource/013df814-4c86-4266-88b3-91b231eb4b98",
                    "Date-Computed": "2018-04-22",
                    "Value": 0,
                    "Value-Type": "Integer",
                    "Computed-On": "http://id.loc.gov",
                    "Graph-URI": "https://w3id.org/lodquator/resource/09473d62-e080-4a8e-afa8-b3168d1c8f9f"
                }
            ]
        },
        {
            "Dimension": "Interpretability",
            "Category": "Representational",
            "Metric-Label": "Undefined classes and properties metric",
            "Metric-URI": "https://w3id.org/lodquator/resource/0a67959a-1a52-486f-8788-09916b2b8287",
            "Observations": [
                {
                    "Observation-URI": "https://w3id.org/lodquator/resource/bab6a454-fc47-44ac-938c-dfff52a38b77",
                    "Date-Computed": "2018-04-22",
                    "Value": 0.5459260973435813,
                    "Value-Type": "Double",
                    "Computed-On": "http://id.loc.gov",
                    "Graph-URI": "https://w3id.org/lodquator/resource/09473d62-e080-4a8e-afa8-b3168d1c8f9f"
                }
            ]
        }
    ]
}

Get all observation dates for a particular dataset

This call will return the dates when the dataset in question was assessed

API URL: /v4/dataset/assessment-dates/
Method: POST
Body Parameters:

  • Dataset-PLD - The PLD of the dataset for which the observation is present

Output Format: JSON
Output:

Key Value Type Comment
Assessment-Dates Array An array of string dates in yyyy-MM-dd format

Example:

{
    "Assessment-Dates": [
        "2018-04-23",
        "2018-04-22"
    ]
}

Get quality observations of a particular dataset for a specific date

This call will return the observations of all assessed metrics in a given dataset at a given day

API URL: /v4/dataset/quality/
Method: POST
Body Parameters:

  • Dataset-PLD - The PLD of the dataset for which the observation is present
  • Date - The requested date in yyyy-MM-dd format

Output Format: JSON
Output:

Key Value Type Comment
Metrics Array Provides a list of Metrics assessed on the given dataset at a given date (see Metrics and Observation objects above)

Ranking APIs

Perform weighted ranking on existing quality metadata

This call will return an ordered ranked set of datasets and their ranking value based on their weights

API URL: /v4/dataset/rank/weighted/
Method: POST
Input format: JSON
Input:

Key Value Type Comment
None Array The input is a simple array with different ranking configuration objects

Ranking Configuration Object:

Key Value Type Comment
type String The granularity of the ranking. The values for this should be category, dimension, or metric
uri String The URI resource of the category, dimension, or metric being assessed. This should be the same as defined in the semantic definition of the metric
weight Double The weight between 0.0 and 1.0 given to the particular measurement. All ranking configuration weights should add up to 1.0

Input Example:

[
    {
        "type":"metric",
        "uri":"http://purl.org/eis/vocab/dqm#MultipleLanguageUsageMetric",
        "weight":"0.5"
    },
    {
        "type":"metric",
        "uri":"http://purl.org/eis/vocab/dqm#DifferentSerialisationsMetric",
        "weight":"0.5"
    }
]

Output Format: JSON
Output:

Key Value Type Comment
Dataset-PLD String The dataset's Pay-Level Domain
Rank-Value Double The ranking value
Graph-URI URI The quality metadata graph uri.

Output Example:

[
    {
        "Dataset-PLD":"id.loc.gov",
        "Rank-Value":25.86093317665275,
        "Graph-URI":"https://w3id.org/lodquator/resource/09473d62-e080-4a8e-afa8-b3168d1c8f9f"
    }
]

Framework Operations APIs

Get all metrics available for assessment

This call will return all metrics that are installed in the Luzzu's framework.

API URL: /v4/framework/available-metrics/
Method: GET
Output Format: JSON-LD
Output:

Key Value Type Comment
@graph Array Array of installed metrics
@context Array Array with the namespaces of the keys used in the installed metrics object

Installed Metric Object:

Key Value Type Comment
javaPackageName String The java package name of the metric
comment String A human-readable description of the metric. This is usually defined in the semantic definition of the metric
label String A human-readable label of the metric
expectedDataType String (URI) Returns the expected datatype of the available metric, usually an XSD datatype
referTo String (URI) Returns the URI for the semantic description of the metric.

Example:

{
    "@graph": [
        {
            "@id": "_:b0",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.MisusedOwlDatatypeOrObjectProperties",
            "referTo": "http://purl.org/eis/vocab/dqm#MisusedOwlDatatypeOrObjectPropertiesMetric",
            "comment": "Detect properties that are defined as a owl:datatypeProperty but is used as objectProperty and properties defined as a owl:object property and used as datatype property The metric is computed as a ratio of misused properties",
            "label": "Misused Owl Datatype Or Object Properties"
        },
        {
            "@id": "_:b1",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.MisplacedClassesOrProperties",
            "referTo": "http://purl.org/eis/vocab/dqm#MisplacedClassesOrPropertiesMetric",
            "comment": "Find resources that are - defined as a property but also appear on subject or object positions in other triples (except cases like ex:prop rdf:type rdf:Property, ex:prop rds:subPropetyOf) - defined as a class but also appear on predicate position in other triples. The metric is computed as a ratio of misplaced classes and properties",
            "label": "Misplaced Classes Or Properties"
        },
        {
            "@id": "_:b10",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.syntacticvalidity.CompatibleDatatype",
            "referTo": "http://purl.org/eis/vocab/dqm#CompatibleDatatype",
            "comment": "** TODO **",
            "label": "Compatible Datatype"
        },
        {
            "@id": "_:b11",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.interlinking.EstimatedLinkExternalDataProviders",
            "referTo": "http://purl.org/eis/vocab/dqm#LinksToExternalDataProvidersMetric",
            "comment": "Measures the degree to which the resource is linked to external data providers, that is, refers to the detection of links that connect the resource to external data provided by another data sources",
            "label": "Links to External Data Providers (Estimated)"
        },
        {
            "@id": "_:b12",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.contextual.provenance.BasicProvenanceMetric",
            "referTo": "http://purl.org/eis/vocab/dqm#BasicProvenanceMetric",
            "comment": "Measures the degree of the basic provenance information, i.e. the creator or publisher, of a datasource",
            "label": "Basic Provenance Metric"
        },
        {
            "@id": "_:b13",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.UsageOfDeprecatedClassesOrProperties",
            "referTo": "http://purl.org/eis/vocab/dqm#UsageOfDeprecatedClassesOrProperties",
            "comment": "This metric checks if a dataset makes use of Deprecated Classes as resource types (defined as owl:DeprecatedClass) or Properties (defined as owl:DeprecatedProperty) in a resource property",
            "label": "Usage Of Deprecated Classes Or Properties"
        },
        {
            "@id": "_:b14",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.interlinking.LinkExternalDataProviders",
            "referTo": "http://purl.org/eis/vocab/dqm#LinksToExternalDataProvidersMetric",
            "comment": "Measures the degree to which the resource is linked to external data providers, that is, refers to the detection of links that connect the resource to external data provided by another data sources",
            "label": "Links to External Data Providers"
        },
        {
            "@id": "_:b15",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.AdvancedEntitiesAsMembersOfDisjointClasses",
            "referTo": "http://purl.org/eis/vocab/dqm#EntitiesAsMembersOfDisjointClassesMetric",
            "comment": "The ratio of entities described as members of disjoint classes (here: classes explicitly known as disjoint) to the total number of entities described in the dataset",
            "label": "Advanced Entities As Members Of Disjoint Classes"
        },
        {
            "@id": "_:b16",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.ValidIFPUsage",
            "referTo": "http://purl.org/eis/vocab/dqm#ValidIFPUsageMetric",
            "comment": "This metric checks if the Inverse Functional Properties (IFP) is used correctly, i.e. if we have S P O and P is set to be an owl:InverseFunctionalProperty, then S is the one and only resource connected to O. If there is a triple S1 P O, then the IFP is not used correctly and thus since S1 will be 'reasoned' to be the same as S.",
            "label": "Valid IFP Usage"
        },
        {
            "@id": "_:b17",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.conciseness.EstimatedExtensionalConciseness",
            "referTo": "http://purl.org/eis/vocab/dqm#ExtensionalConcisenessMetric",
            "comment": "Provides a measure of the redundancy of the dataset at the data level, computed as the ratio of the Number of Unique Subjects to the Total Number of Subjects",
            "label": "Extensional Conciseness (Estimated)"
        },
        {
            "@id": "_:b18",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#integer",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.representational.versatility.MultipleLanguageUsage",
            "referTo": "http://purl.org/eis/vocab/dqm#MultipleLanguageUsageMetric",
            "comment": "Detects if a dataset has more than one language",
            "label": "Usage of Multiple Languages"
        },
        {
            "@id": "_:b19",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.representational.interpretability.BlankNodeUsage",
            "referTo": "http://purl.org/eis/vocab/dqm#NoBlankNodeMetric",
            "comment": "Provides a measure for the usage of blank nodes in a dataset",
            "label": "Usage of Blank Nodes"
        },
        {
            "@id": "_:b2",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.contextual.understandability.HumanReadableLabelling",
            "referTo": "http://purl.org/eis/vocab/dqm#HumanReadableLabellingMetric",
            "comment": "Assesses the percentage of entities having an rdfs:label or rdfs:comment",
            "label": "Human Readable Labelling and Description"
        },
        {
            "@id": "_:b20",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.representational.conciseness.NoProlixRDF",
            "referTo": "http://purl.org/eis/vocab/dqm#NoProlixRDFMetric",
            "comment": "Detects the use of prolix RDF features, i.e reification statements, containers and collections",
            "label": "No Prolix RDF"
        },
        {
            "@id": "_:b21",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#boolean",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.availability.RDFAccessibility",
            "referTo": "http://purl.org/eis/vocab/dqm#RDFAvailabilityMetric",
            "comment": "Upon request of an RDF dump, checks whether it is provided as result",
            "label": "RDF Accessibility"
        },
        {
            "@id": "_:b22",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.contextual.understandability.PresenceOfURIRegEx",
            "referTo": "http://purl.org/eis/vocab/dqm#PresenceOfURIRegEx",
            "comment": "This metric checks if the dataset has a regular expression defined.",
            "label": "Presence of a URI Regex in dataset"
        },
        {
            "@id": "_:b23",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.contextual.provenance.ExtendedProvenanceMetric",
            "referTo": "http://purl.org/eis/vocab/dqm#ExtendedProvenanceMetric",
            "comment": "Measures the degree of the available provenance information (Agent and Datasource for Entities and Activities) that is available in a dataset for a consumer to get to know the origin of the datasource using the standard W3C Prov-O",
            "label": "Extended Provenance Metric"
        },
        {
            "@id": "_:b24",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#boolean",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.licensing.HumanReadableLicense",
            "referTo": "http://purl.org/eis/vocab/dqm#HumanReadableLicenseMetric",
            "comment": "Verifies whether a human-readable text, stating the licensing model attributed to the resource, has been provided as part of the dataset",
            "label": "Human-readable License"
        },
        {
            "@id": "_:b25",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.availability.MisreportedContentType",
            "referTo": "http://purl.org/eis/vocab/dqm#MisreportedContentTypesMetric",
            "comment": "Checks whether the content is suitable for consumption and if such content should be accessed",
            "label": "Misreported Content Types"
        },
        {
            "@id": "_:b26",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.availability.EstimatedDereferenceabilityByTld",
            "referTo": "http://purl.org/eis/vocab/dqm#DereferenceabilityMetric",
            "comment": "Determines whether requesting a resource, identified by a URI, results in an error code being returned (e.g. 4xx: client error or 5xx: server error), or in a broken link",
            "label": "Dereferenceability (Estimated using TLDs)"
        },
        {
            "@id": "_:b27",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.EstimateSimpleEntitiesAsMembersOfDisjointClasses",
            "referTo": "http://purl.org/eis/vocab/dqm#EntitiesAsMembersOfDisjointClassesMetric",
            "comment": "The ratio of entities described as members of disjoint classes (here: classes explicitly known as disjoint) to the total number of entities described in the dataset",
            "label": "Entities As Members Of Disjoint Classes"
        },
        {
            "@id": "_:b28",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#boolean",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.availability.SPARQLAccessibility",
            "referTo": "http://purl.org/eis/vocab/dqm#EndPointAvailabilityMetric",
            "comment": "Checks whether the server (endpoint) is reachable and responds to a SPARQL query",
            "label": "SPARQL Accessibility"
        },
        {
            "@id": "_:b29",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.contextual.understandability.VocabularyUsageIndication",
            "referTo": "http://purl.org/eis/vocab/dqm#VocabularyUsageIndication",
            "comment": "This metric checks the number of valid vocabularies indicated by the voID metadata against the number of different vocabularies used.",
            "label": "Vocabulary Usage Indication"
        },
        {
            "@id": "_:b3",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.EstimatedUsageOfIncorrectDomainOrRangeDatatypes",
            "referTo": "http://purl.org/eis/vocab/dqm#UsageOfIncorrectDomainOrRangeDatatypesMetric",
            "comment": "This metric tests if a property's domain and range are of the same type as declared in the corresponding schema",
            "label": "Usage Of Deprecated Classes Or Properties"
        },
        {
            "@id": "_:b30",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#boolean",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.licensing.MachineReadableLicense",
            "referTo": "http://purl.org/eis/vocab/dqm#MachineReadableLicenseMetric",
            "comment": "Verifies that the resource is annotated with a machine-readable indication of the license (e.g. a VoID description or dcterms:license property)",
            "label": "Machine-readable License"
        },
        {
            "@id": "_:b31",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.syntacticvalidity.CorrectLanguageTag",
            "referTo": "http://purl.org/eis/vocab/dqm#CorrectLanguageTag",
            "comment": "** TODO **",
            "label": "Correct Language Tag"
        },
        {
            "@id": "_:b32",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.representational.interpretability.UndefinedClassesAndProperties",
            "referTo": "http://purl.org/eis/vocab/dqm#UndefinedClassesAndPropertiesMetric",
            "comment": "Detects undefined classes and properties",
            "label": "Undefined Classes and Properties"
        },
        {
            "@id": "_:b33",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#integer",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.representational.versatility.DifferentSerialisationFormatsCount",
            "referTo": "http://purl.org/eis/vocab/dqm#DifferentSerialisationsMetric",
            "comment": "Detects if a dataset has more than one serialisation format",
            "label": "Different Serialisation Formats"
        },
        {
            "@id": "_:b34",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.representational.conciseness.ShortURIs",
            "referTo": "http://purl.org/eis/vocab/dqm#ShortURIsMetric",
            "comment": "Detects the use of short URIs (and the avoidance of query parameters), which suggests that information is compactly represented and favors readability",
            "label": "Short URIs"
        },
        {
            "@id": "_:b35",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.performance.LowLatency",
            "referTo": "http://purl.org/eis/vocab/dqm#LowLatencyMetric",
            "comment": "Measures the delay between the submission of a request to the data source and the reception of the respective response (or the first part of it)",
            "label": "Low Latency"
        },
        {
            "@id": "_:b36",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.representational.interoperability.ReuseExistingTerms",
            "referTo": "http://purl.org/eis/vocab/dqm#ReuseExistingTermsMetric",
            "comment": "Provides a qualitative measure for detecting the overlap of terms used in a dataset with existing terms.",
            "label": "Reuse of Existing Terms"
        },
        {
            "@id": "_:b37",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.consistency.OntologyHijacking",
            "referTo": "http://purl.org/eis/vocab/dqm#OntologyHijackingMetric",
            "comment": "Detects the redefinition by third parties of external classes/properties such that reasoning over data using those external terms is affected",
            "label": "Ontology Hijacking"
        },
        {
            "@id": "_:b4",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.performance.HighThroughput",
            "referTo": "http://purl.org/eis/vocab/dqm#HighThroughputMetric",
            "comment": "Measures the number of answered HTTP requests responsed by the source of the dataset, per second",
            "label": "High Throughput"
        },
        {
            "@id": "_:b5",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.intrinsic.conciseness.ExtensionalConciseness",
            "referTo": "http://purl.org/eis/vocab/dqm#ExtensionalConcisenessMetric",
            "comment": "Provides a measure of the redundancy of the dataset at the data level, computed as the ratio of the Number of Unique Subjects to the Total Number of Subjects",
            "label": "Extensional Conciseness"
        },
        {
            "@id": "_:b6",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.availability.Dereferenceability",
            "referTo": "http://purl.org/eis/vocab/dqm#DereferenceabilityMetric",
            "comment": "Determines whether requesting a resource, identified by a URI, results in an error code being returned (e.g. 4xx: client error or 5xx: server error), or in a broken link",
            "label": "Dereferenceability"
        },
        {
            "@id": "_:b7",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.availability.EstimatedMisreportedContentTypeByStratified",
            "referTo": "http://purl.org/eis/vocab/dqm#MisreportedContentTypesMetric",
            "comment": "Checks whether the content is suitable for consumption and if such content should be accessed",
            "label": "Misreported Content Types (Estimated)"
        },
        {
            "@id": "_:b8",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.availability.EstimatedDereferenceability",
            "referTo": "http://purl.org/eis/vocab/dqm#DereferenceabilityMetric",
            "comment": "Determines whether requesting a resource, identified by a URI, results in an error code being returned (e.g. 4xx: client error or 5xx: server error), or in a broken link",
            "label": "Dereferenceability (Estimated)"
        },
        {
            "@id": "_:b9",
            "expectedDataType": "http://www.w3.org/2001/XMLSchema#double",
            "javaPackageName": "io.github.luzzu.linkeddata.qualitymetrics.accessibility.availability.EstimatedDereferenceabilityByStratified",
            "referTo": "http://purl.org/eis/vocab/dqm#DereferenceabilityMetric",
            "comment": "Determines whether requesting a resource, identified by a URI, results in an error code being returned (e.g. 4xx: client error or 5xx: server error), or in a broken link",
            "label": "Dereferenceability (Estimated using Strata) - Recommended"
        }
    ],
    "@context": {
        "comment": {
            "@id": "http://www.w3.org/2000/01/rdf-schema#comment"
        },
        "expectedDataType": {
            "@id": "http://purl.org/eis/vocab/daq#expectedDataType",
            "@type": "@id"
        },
        "referTo": {
            "@id": "http://purl.org/eis/vocab/lmi#referTo",
            "@type": "@id"
        },
        "label": {
            "@id": "http://www.w3.org/2000/01/rdf-schema#label"
        },
        "javaPackageName": {
            "@id": "http://purl.org/eis/vocab/lmi#javaPackageName"
        }
    }
}

Get all metrics for the filtering and ranking facet

This call will return a list of categories, dimensions and metric that can be used to filter quality metadata

API URL: /v4/framework/filtering-facets/
Method: GET
Output Format: JSON
Output:

Key Value Type Comment
Categories Array Array of category objects

Category Object:

Key Value Type Comment
URI String The URI of the category's semantic resource
Comment String A human-readable description of the category. This is usually defined in the semantic definition of the category
Label String A human-readable label of the category.
Dimensions Array Array of dimension objects

Dimension Object:

Key Value Type Comment
URI String The URI of the dimension semantic resource
Comment String A human-readable description of the dimension. This is usually defined in the semantic definition of the dimension
Label String A human-readable label of the dimension.
Dimensions Array Array of dimension objects

Metric Object:

Key Value Type Comment
URI String The URI of the metric semantic resource
Comment String A human-readable description of the metric. This is usually defined in the semantic definition of the metric
Label String A human-readable label of the metric.

Example:

{
  "Categories": [
    {
      "Label": "Contextual",
      "Comment": "Comprises dimensions that highly depend on the context of the task to be performed",
      "URI": "http://purl.org/eis/vocab/dqm#Contextual",
      "Dimensions": [
        {
          "Label": "Provenance",
          "Comment": "Refers to the dataset's representation of provenance information",
          "URI": "http://purl.org/eis/vocab/dqm#Provenance",
          "Metrics": [
            {
              "Label": "Basic Provenance Metric",
              "Comment": "Measures the degree of the basic provenance information, i.e. the creator or publisher, of a datasource",
              "URI": "http://purl.org/eis/vocab/dqm#BasicProvenanceMetric"
            }
          ]
        },
        {
          "Label": "Understandability",
          "Comment": "Refers to the easy with which data can be comprehended without ambiguity and used by a human data consumer",
          "URI": "http://purl.org/eis/vocab/dqm#Understandability",
          "Metrics": [
            {
              "Label": "Human-readable labelling metric",
              "Comment": "Assesses the percentage of entities having an rdfs:label or rdfs:comment",
              "URI": "http://purl.org/eis/vocab/dqm#HumanReadableLabellingMetric"
            }
          ]
        }
      ]
    },
    {
      "Label": "Representational",
      "Comment": "Groups dimensions related to the design of the data, which provide information about how the chosen representation of the data affect its quality",
      "URI": "http://purl.org/eis/vocab/dqm#Representational",
      "Dimensions": [
        {
          "Label": "Versatility",
          "Comment": "Measures the availability of the data in different representations and in an internationalised way",
          "URI": "http://purl.org/eis/vocab/dqm#Versatility",
          "Metrics": [
            {
              "Label": "Different Serialisation Metric",
              "Comment": "Detects if a dataset has more than one serialisation format",
              "URI": "http://purl.org/eis/vocab/dqm#DifferentSerialisationsMetric"
            },
            {
              "Label": "Multiple Language Usage Metric",
              "Comment": "Detects if a dataset has more than one language",
              "URI": "http://purl.org/eis/vocab/dqm#MultipleLanguageUsageMetric"
            }
          ]
        },
        {
          "Label": "Interpretability",
          "Comment": "Refers to technical aspects of the data, that is, whether information is represented using an appropriate notation",
          "URI": "http://purl.org/eis/vocab/dqm#Interpretability",
          "Metrics": [
            {
              "Label": "No blank node metric",
              "Comment": "Provides a measure for the usage of blank nodes in a dataset",
              "URI": "http://purl.org/eis/vocab/dqm#NoBlankNodeMetric"
            },
            {
              "Label": "Undefined classes and properties metric",
              "Comment": "Detects undefined classes and properties",
              "URI": "http://purl.org/eis/vocab/dqm#UndefinedClassesAndPropertiesMetric"
            }
          ]
        },
        {
          "Label": "Representational conciseness",
          "Comment": "Measures the extent to which the representation of data is compact, clear and well formatted",
          "URI": "http://purl.org/eis/vocab/dqm#RepresentationalConciseness",
          "Metrics": [
            {
              "Label": "No Use of Prolix RDF features metric",
              "Comment": "Detects the use of prolix RDF features, i.e reification statements, containers and collections",
              "URI": "http://purl.org/eis/vocab/dqm#NoProlixRDFMetric"
            },
            {
              "Label": "Short URIs metric",
              "Comment": "Detects the use of short URIs (and the avoidance of query parameters), which suggests that information is compactly represented and favors readability",
              "URI": "http://purl.org/eis/vocab/dqm#ShortURIsMetric"
            }
          ]
        }
      ]
    },
    {
      "Label": "Intrinsic",
      "Comment": "Refers to dimensions that are independent of the user's context and that measure the correctness, succinctness and consistency of the dataset",
      "URI": "http://purl.org/eis/vocab/dqm#Intrinsic",
      "Dimensions": [
        {
          "Label": "Syntactic Validity",
          "Comment": "The Degree to which an RDF Document conforms to the specification of the serialisation formation",
          "URI": "http://purl.org/eis/vocab/dqm#SyntacticValidity",
          "Metrics": [
            {
              "Label": "Compatible Datatype",
              "Comment": "** TODO **",
              "URI": "http://purl.org/eis/vocab/dqm#CompatibleDatatype"
            }
          ]
        },
        {
          "Label": "Consistency",
          "Comment": "Consistency means that a knowledge base is free of (logical/formal) contradictions with respect to particular knowledge representation and inference mechanisms",
          "URI": "http://purl.org/eis/vocab/dqm#Consistency",
          "Metrics": [
            {
              "Label": "Entities as members of disjoint classes metric",
              "Comment": "The ratio of entities described as members of disjoint classes (here: classes explicitly known as disjoint) to the total number of entities described in the dataset",
              "URI": "http://purl.org/eis/vocab/dqm#EntitiesAsMembersOfDisjointClassesMetric"
            },
            {
              "Label": "Misplaced classes or properties metric",
              "Comment": "Find resources that are - defined as a property but also appear on subject or object positions in other triples (except cases like ex:prop rdf:type rdf:Property, ex:prop rds:subPropetyOf) - defined as a class but also appear on predicate position in other triples. The metric is computed as a ratio of misplaced classes and properties",
              "URI": "http://purl.org/eis/vocab/dqm#MisplacedClassesOrPropertiesMetric"
            },
            {
              "Label": "Misuse Owl datatype or object properties metric",
              "Comment": "Detect properties that are defined as a owl:datatypeProperty but is used as objectProperty and properties defined as a owl:object property and used as datatype property The metric is computed as a ratio of misused properties",
              "URI": "http://purl.org/eis/vocab/dqm#MisusedOwlDatatypeOrObjectPropertiesMetric"
            },
            {
              "Label": "Ontology hijacking metric",
              "Comment": "Detects the redefinition by third parties of external classes/properties such that reasoning over data using those external terms is affected",
              "URI": "http://purl.org/eis/vocab/dqm#OntologyHijackingMetric"
            },
            {
              "Label": "Usage of Deprecated Classesor Deprecated Properties",
              "Comment": "This metric checks if a dataset makes use of Deprecated Classes as resource types (defined as owl:DeprecatedClass) or Properties (defined as owl:DeprecatedProperty) in a resource property",
              "URI": "http://purl.org/eis/vocab/dqm#UsageOfDeprecatedClassesOrProperties"
            },
            {
              "Label": "Incorrect Domain or Range Datatypes",
              "Comment": "This metric tests if a property's domain and range are of the same type as declared in the corresponding schema",
              "URI": "http://purl.org/eis/vocab/dqm#UsageOfIncorrectDomainOrRangeDatatypesMetric"
            },
            {
              "Label": "Valid Usage of the owl:InverseFunctionalProperty",
              "Comment": "This metric checks if the Inverse Functional Properties (IFP) is used correctly, i.e. if we have S P O and P is set to be an owl:InverseFunctionalProperty, then S is the one and only resource connected to O. If there is a triple S1 P O, then the IFP is not used correctly and thus since S1 will be 'reasoned' to be the same as S.",
              "URI": "http://purl.org/eis/vocab/dqm#ValidIFPUsageMetric"
            }
          ]
        },
        {
          "Label": "Conciseness",
          "Comment": "Refers to the redundancy of entities, be it at the schema or the data level",
          "URI": "http://purl.org/eis/vocab/dqm#Conciseness",
          "Metrics": [
            {
              "Label": "Extensional conciseness metric",
              "Comment": "Provides a measure of the redundancy of the dataset at the data level, computed as the ratio of the Number of Unique Subjects to the Total Number of Subjects",
              "URI": "http://purl.org/eis/vocab/dqm#ExtensionalConcisenessMetric"
            }
          ]
        }
      ]
    }
  ]
}

Comparison APIs

Compare a number of datasets against a metric

This call will return the latest observation of a metric for all chosen datasets

API URL: /v4/compare/dataset-metrics/
Method: POST
Body Parameters:

  • Dataset-PLD - The PLD of the dataset for which comparison needs to be made to. There should be at least 1 Dataset-PLD value. Multiple Dataset-PLD values should be defined using a different body parameter.
  • Metric - The metric resource URI that is required to be assessed. There should be only one input for this.

Output Format: JSON
Output:

Key Value Type Comment
Datasets Array Provides a list the datasets (dataset objects) requested with the latest observation values for comparison

Dataset Object:

Key Value Type Comment
Dataset-PLD String The URI of the metric semantic resource
Metric-Observation String A human-readable description of the metric. This is usually defined in the semantic definition of the metric
Latest-Observation Object Provides the latest observation for comparison (see Observation Object above

Example:

{
    "Datasets": [
        {
            "Latest-Observation": {
                "Observation-URI": "https://w3id.org/lodquator/resource/9cc0c411-968c-4862-811b-4bb6c2e5d862",
                "Date-Computed": "2018-07-25",
                "Value": 1,
                "Value-Type": "Double",
                "Computed-On": "http://data.geohive.ie",
                "Graph-URI": "https://w3id.org/lodquator/resource/f3630193-5533-4beb-abd4-592bb9bdf788"
            },
            "Metric-Observation": "http://purl.org/eis/vocab/dqm#OntologyHijackingMetric",
            "Dataset-PLD": "http://data.geohive.ie"
        }
    ]
}

Export metadata into DQV format

This call will return the metadata converted using W3C DQV standard

API URL: /v4/export/toDQV/
Method: POST Body Parameters:

  • Dataset-PLD - The PLD of the dataset for which the observation is present

Output Format: application/trig
Output: Trig file with the converted metadata

Example:

<https://w3id.org/lodquator/resource/f3630193-5533-4beb-abd4-592bb9bdf788>
        a       <http://www.w3.org/ns/dqv#QualityMeasurementDataset> .


<https://w3id.org/lodquator/resource/f3630193-5533-4beb-abd4-592bb9bdf788> {
    <https://w3id.org/lodquator/resource/9cc0c411-968c-4862-811b-4bb6c2e5d862>
            a       <http://www.w3.org/ns/dqv#Observation> ;
            <http://www.w3.org/ns/dqv#computedOn>
                    <http://data.geohive.ie> ;
            <http://www.w3.org/ns/dqv#isMeasurementOf>
                    _:b0 ;
            <http://www.w3.org/ns/dqv#value>
                    "1.0"^^<http://www.w3.org/2001/XMLSchema#double> .


    <https://w3id.org/lodquator/resource/fb622c22-52aa-4875-88da-fd4054a26597>
            a       <http://www.w3.org/ns/dqv#Observation> ;
            <http://www.w3.org/ns/dqv#computedOn>
                    <http://data.geohive.ie> ;
            <http://www.w3.org/ns/dqv#isMeasurementOf>
                    _:b0 ;
            <http://www.w3.org/ns/dqv#value>
                    "0.9999978214599269"^^<http://www.w3.org/2001/XMLSchema#double> .


    <https://w3id.org/lodquator/resource/e74a7625-b358-4f02-b8d0-0477216ad895>
            a       <http://www.w3.org/ns/dqv#Observation> ;
            <http://www.w3.org/ns/dqv#computedOn>
                    <http://data.geohive.ie> ;
            <http://www.w3.org/ns/dqv#isMeasurementOf>
                    _:b0 ;
            <http://www.w3.org/ns/dqv#value>
                    "0.658801242316069"^^<http://www.w3.org/2001/XMLSchema#double> .


    _:b0    a       <http://www.w3.org/ns/dqv#Metric> ;
            <http://www.w3.org/2002/07/owl#equivalentClass>
                    <http://purl.org/eis/vocab/dqm#ShortURIsMetric> , <http://purl.org/eis/vocab/dqm#OntologyHijackingMetric> , <http://purl.org/eis/vocab/dqm#MisplacedClassesOrPropertiesMetric> ;
            <http://www.w3.org/ns/dqv#inDimension>
                    [ a       <http://www.w3.org/ns/dqv#Dimension> ;
                      <http://www.w3.org/2002/07/owl#equivalentClass>
                              <http://purl.org/eis/vocab/dqm#RepresentationalConciseness> , <http://purl.org/eis/vocab/dqm#Consistency> ;
                      <http://www.w3.org/ns/dqv#inCategory>
                              [ a       <http://www.w3.org/ns/dqv#Category> ;
                                <http://www.w3.org/2002/07/owl#equivalentClass>
                                        <http://purl.org/eis/vocab/dqm#Representational> , <http://purl.org/eis/vocab/dqm#Intrinsic>
                              ]
                    ] .
}