Giter Site home page Giter Site logo

vrk-kpa / api-catalog Goto Github PK

View Code? Open in Web Editor NEW
17.0 35.0 3.0 26.14 MB

API Catalog for Suomi.fi Data Exchange Layer

Home Page: http://liityntakatalogi.suomi.fi

License: MIT License

Python 31.88% Shell 0.98% CSS 0.32% HTML 33.54% JavaScript 17.00% Less 11.12% Jinja 5.10% Mako 0.07%
ckan xroad finland palveluvayla ansible api hacktoberfest

api-catalog's Introduction

API Catalog (Liityntäkatalogi)

This repository provides the API catalog of the Finnish National Data Exchange Layer (Suomi.fi palveluväylä). The catalog provides a search engine for the interfaces available on the data exchange layer.

The catalog is available at liityntakatalogi.suomi.fi. A development sandbox of the catalog is available at liityntakatalogi.qa.suomi.fi

Getting started

Prerequisites:

Clone the repository and its submodules, and start Vagrant:

git clone https://github.com/vrk-kpa/api-catalog.git
cd api-catalog/
git submodule update --init --recursive
vagrant up

After Ansible provisions the system, the service will be running in the virtual machine and is available from your host machine at https://10.100.10.10/

User credentials for an administrator are admin:admin, and test:test for a regular user.

To reprovision the server (i.e. to run Ansible) again:

vagrant provision

You can ssh into the server:

vagrant ssh

And you can also run Ansible manually inside the virtual machine:

vagrant ssh
cd /src/ansible
ansible-playbook -v -i inventories/vagrant deploy-all.yml

Development

With Vagrant, the host machine shares the working directory into the virtual machine. The web server uses the CKAN extensions directly from the source code via symlinks. Depending on what you change however, some extra rules apply:

  • If you edit a Jinja template, changes apply instantly (only page refresh required)
  • If you edit Python code of the extensions, you need to restart the WSGI server (vagrant ssh and sudo supervisorctl restart all).
  • If you edit Javascript, you need to run the frontend build to compile and minify files (vagrant ssh, cd /vagrant/ansible and ansible-playbook -v -i inventories/vagrant frontend-build.yml).

Translations

Navigate into the root folder of module which translation keys need to be updated and run following commands:

# Need to be ran only if it's first time to extract translations
. /usr/lib/ckan/default/bin/activate
python setup.py extract_messages

Repository structure

.
├── ansible
│   ├── deploy-all.yml                  Top-level playbook for configuring complete service
│   ├── inventories                     Target server lists (hostname, ssh user and key)
│   ├── roles                           Main configuration
│   └── vars                            Variables common for all roles
│       ├── api-catalog-secrets         Passwords and other secrets (not included here)
│       ├── common.yml                  Variables common for all roles and environments
│       ├── environment-specific        Configuration specific for each deployment env
│       └── secrets-defaults.yml        Default passwords, used in Vagrant
├── ckanext                             Custom CKAN extensions, main source directory
├── doc                                 Documentation
└── Vagrantfile                         Configuration for local development environment

Support / Contact / Contribution

Please file a new issue at GitHub.

Copying and License

This material is copyright (c) 2015-2020 Digital and Population Data Services Agency, Finland.

CKAN-related content like CKAN extensions are licensed under the GNU Affero General Public License (AGPL) v3.0 whose full text may be found at: http://www.fsf.org/licensing/licenses/agpl-3.0.html

All other content in this repository is licensed under the MIT license.

api-catalog's People

Contributors

beazil avatar bertvi avatar bzar avatar dependabot[bot] avatar eetumans avatar i-tu avatar mygee avatar pasi-go avatar transifex-integration[bot] avatar zharktas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-catalog's Issues

Create account and get authentication key

How do I create account to liityntäkatalogi to be able to get keys for API-functions requiring authorization? For example I was trying to get list of revisioned APIs in catalogue with

https://liityntakatalogi.suomi.fi/api/3/action/revision_list

and response is:

{"help": "https://liityntakatalogi.suomi.fi/api/3/action/help_show?name=revision_list", "success": false, "error": {"message": "P\u00e4\u00e4sy ev\u00e4tty: <function admin_only at 0x7fe86007cf50> requires an authenticated user", "__type": "Authorization Error"}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.