Extras Extension
The ckanext-extras CKAN’s extension provides external_resource_list action, which returns list of public resources, which are not local (are served by external service).
Requirements
CKAN 2.4.3 or later.
Features
- New API endpoint:
/api/action/external_resource_list
- Pagination support with limit and offset parameters
- Smart local/external URL detection
- Support for proxied external sites
- Configurable local and external site prefixes
Installation
git clone https://github.com/geosolutions-it/ckanext-extras.git
cd ckanext-extras
pip install -e .
Add external_resource_list to ckan.plugins in your CKAN config file.
Configuration
Uses ckan.site_url to resolve if URL is external. Additional options:
ckan.site_url = http://public.address
# Additional URLs to consider as local
ckanext.extras.local_sites =
http://localhost
http://127.0.0.1
# URLs that look local but are actually external (proxied)
ckanext.extras.external_sites =
http://localhost/proxied
http://public.address/remote/
API Usage
GET /api/action/external_resource_list?limit=50&offset=0
Returns paginated list of external resources.