Skip to content

Instantly share code, notes, and snippets.

View kyyberi's full-sized avatar

Jarkko Moilanen kyyberi

View GitHub Profile
curl -X POST \
https://beta.avoindata.fi/data/api/action/package_delete \
-H 'authorization: CKAN-API-Key' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"id": "name of the dataset"
}'
curl -X POST \
https://kokeilu.apinf.io:3002/avoindatabeta/package_delete \
-H 'authorization: CKAN-API-key' \
-H 'x-api-key: APInf-Platform-API-key' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"id": "name of the dataset"
}'
#!/bin/bash
declare -a arr=( "https://apinf.io:3002/apinf/management/api/v1/organizations"
"https://apinf.io:3002/apinf/management/api/v1/organizations/6aK5CAKQGqg7k8wub"
"https://apinf.io:3002/apinf/management/api/v1/organizations/zekreYMx5aXuuMJpW"
"https://apinf.io:3002/apinf/management/api/v1/organizations/btB3ZGMJCnnoEyyrz"
"https://apinf.io:3002/apinf/management/api/v1/organizations/btB3ZGMJCnnoEyyrz"
"https://apinf.io:3002/apinf/management/api/v1/organizations/sf3xzgosQsbPoLwnW"
"https://apinf.io:3002/apinf/management/api/v1/organizations/gD8wyLfkeFoH9yQLz"
"https://apinf.io:3002/apinf/management/api/v1/organizations?q=apinf"
#!/bin/bash
declare -a arr=( "https://apinf.io:3002/apinf/catalog/api/v1/apis?limit=200&managedAPIs=true"
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=100"
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=10&limit=50&lifecycle=design"
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=10&limit=50&lifecycle=production"
"https://apinf.io:3002/apinf/catalog/api/v1/apis?limit=70"
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=100"
"https://apinf.io:3002/apinf/catalog/api/v1/apis?ski=1&limit=50&lifecycle=design"
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=200&limit=10&lifecycle=production"
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$.ajax({
type: "GET",
url: "https://apis-guru.github.io/api-models/apis.json",
dataType: 'json',
cache: false,
success: function(data)
{
{
"Config": {
"configName": "Apinf",
"configTitle": "Build custom APIs. Fast.",
"configSubtitle": "Create custom API mashups, really quick."
},
"Sidebar": {
"masterLayout_sidebar_Menu": "Menu",
@kyyberi
kyyberi / gist:c9a3cbf989f387021997
Created August 23, 2014 10:26
qa-lang-admin.php lisäykset
//More additions from 1.5
'moderate_title' => "Moderera",
'cancel_mailing_button' => "Avbryt mailskickning",
'category_no_sub_error' => "^q fråga/frågor i denna kategori har ingen underkategori - ^1välj underkategori^2",
'category_no_sub_to' => "Flytta frågor i ^ som saknar underkategori till:",
'category_none_error' => "^q fråga/frågor har just nu ingen kategori - ^1välj kategori^2",
'category_none_to' => "Flytta frågor som saknar kategori till:",
'characters' => "tecken",
'check_language_suffix' => " - ^1kontrollera språkfiler^2",
//Additions from 1.6.1
@kyyberi
kyyberi / apimanifest.json
Last active August 29, 2015 14:02
Default apimanifest.json for {API:Suomi} service
{
"name": "API ryhmittymän nimi",
"description": "Kuvaus mitä rajapintoja sisältää.",
"apis": [
{
"name": "API nimi",
"description": "kuvaus toiminnasta ja mikä sen tuottaman lisäarvo on.",
"image": "https://example.com/image.png",
"humanUrl": "URL osoite tietovarantoon API:sta",
"machineUrl": "API:n root",
@kyyberi
kyyberi / gist:9830146
Created March 28, 2014 10:59
x-road sample org service WSDL
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://persons_register.x-road.eu/producer" xmlns:wsdl="http://www.w3.org/ns/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xrd="http://x-road.eu/xsd/x-road.xsd" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" targetNamespace="http://persons_register.x-road.eu/producer">
<types>
<schema targetNamespace="http://persons_register.x-road.eu/producer" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://x-road.eu/xsd/x-road.xsd" schemaLocation="https://x-road.eu/xsd/x-road.xsd"/>
<import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
<element name="personList">
<complexType>
<sequence>
<element name="request">
@kyyberi
kyyberi / gist:9702279
Last active August 29, 2015 13:57
List latest issues from GitHub (PHP)
<h3>Puuttuuko metodi? Löytyikö bugi?</h3>
<p>Mikäli mielestäsi puuttuu jokin metodi, tee siitä <a href="https://github.com/kyyberi/avoindata-net/issues" target="top">'bugiraportti' GitHubiin<img class="extlink" src="/images/link.png"/></a>. Sitä ennen tarkista ettei joku ole jo ilmoittanut samasta asiasta. </p>
<div id="tab-container" class="tab-container">
<ul class='etabs'>
<?php $data = json_decode(file_get_contents('https://api.github.com/repos/kyyberi/avoindata-net/issues'));?>
<li class='tab'><a href="#tabs1-open">Avoimet bugit (<?php echo sizeof($data);?>)</a></li>
<?php
$data2 = json_decode(file_get_contents('https://api.github.com/repos/kyyberi/avoindata-net/issues?state=closed'));
?>