Extension Validationapi


Extension Basics

Title
Validationapi
Name
ckanext-validationapi
Type
Public extension
Description
A public API for CKAN's validator functions
CKAN versions
Download-Url (zip)
Last commit
a year ago (2024-12-20 07:45:06)
Url to repo
Category
Standards Compliance


Background Infos

Description (long)
Show details

ckanext-validationapi

Tests Code Coverage

This plugin belongs to a set of plugins for the Datenregister – the non-public CKAN instance that is part of Berlin’s open data portal daten.berlin.de.

ckanext-validationapi provides an API as a public wrapper around the internal validator functions of CKAN.

The plugin implements the following CKAN interfaces:

Requirements

This plugin has been tested with CKAN 2.9 (which requires Python 3).

Using the API

All validator functions that are available through ckan.plugins.toolkit.get_validator() can be used. The list of standard validators that CKAN offers is available at https://docs.ckan.org/en/latest/extensions/validators.html. Plugins can add more validators by implementing the IValidators interface.

The API is accessible via $CKAN_URL/api/validation; currently its only method is validate. Only POST requests with content type application/json are accepted.

The expected payload to validate is a JSON object with two attributes:

  • validator: The name of the validator as it would be passed to ckan.plugins.toolkit.get_validator().
  • value: The value we want to submit for validation.

Here is an example:

“`json { “validator”: “email_validator” , “value”: “jane.do

Version
Version release date
(not set)
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

This plugin has been tested with CKAN 2.9 (which requires Python 3).

Plugins to configure (ckan.ini)
validationapi
CKAN Settings (ckan.ini)
DB migration to be executed
(not set)
<< back to Extensions