<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>api Archives - Turbolab Technologies</title>
	<atom:link href="https://turbolab.in/tag/api/feed/" rel="self" type="application/rss+xml" />
	<link>https://turbolab.in/tag/api/</link>
	<description>Big Data and News Analysis Startup in Kochi</description>
	<lastBuildDate>Sat, 29 Sep 2018 08:01:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://i0.wp.com/turbolab.in/wp-content/uploads/2018/03/turbo_black_trans-space.png?fit=32%2C32&#038;ssl=1</url>
	<title>api Archives - Turbolab Technologies</title>
	<link>https://turbolab.in/tag/api/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">98237731</site>	<item>
		<title>Key Authentication and Rate Limiting plugins of Kong on Flask API</title>
		<link>https://turbolab.in/key-authentication-and-rate-limiting-plugins-of-kong-on-flask-api/</link>
					<comments>https://turbolab.in/key-authentication-and-rate-limiting-plugins-of-kong-on-flask-api/#respond</comments>
		
		<dc:creator><![CDATA[Vasista Reddy]]></dc:creator>
		<pubDate>Fri, 28 Sep 2018 11:45:43 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[apigateway]]></category>
		<category><![CDATA[flask]]></category>
		<category><![CDATA[kong]]></category>
		<guid isPermaLink="false">https://turbolab.in/?p=405</guid>

					<description><![CDATA[<p>In the previous post, we discussed about registering the Flask API to KONG service. In this tutorial, we discussed about applying KONG plugins like Key Authentication and Rate Limiting on the registered API. Key-Authentication Rate-limiting Key-Authentication Plugin This Key Authentication plugin can be added to a service or a route. Consumers can add their Apikey either in a querystring parameter or a header to authenticate their requests. [&#8230;]</p>
<p>The post <a href="https://turbolab.in/key-authentication-and-rate-limiting-plugins-of-kong-on-flask-api/">Key Authentication and Rate Limiting plugins of Kong on Flask API</a> appeared first on <a href="https://turbolab.in">Turbolab Technologies</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p id="7c91" class="graf graf--p graf-after--h3">In the <a class="markup--anchor markup--p-anchor" href="https://turbolab.in/registering-the-api-as-service-in-kong/" target="_blank" rel="noopener"><strong class="markup--strong markup--p-strong">previous post</strong></a><strong class="markup--strong markup--p-strong">, </strong>we discussed about registering the <a class="markup--anchor markup--p-anchor" href="https://github.com/Vasistareddy/flaskapi_test_docker.git" target="_blank" rel="nofollow noopener"><strong class="markup--strong markup--p-strong">Flask API</strong></a> to <a class="markup--anchor markup--p-anchor" href="https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/" target="_blank" rel="nofollow noopener"><strong class="markup--strong markup--p-strong">KONG </strong></a>service. In this tutorial, we discussed about applying <a href="https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/"><strong class="markup--strong markup--p-strong">KONG</strong></a> plugins like <strong class="markup--strong markup--p-strong">Key Authentication</strong> and <strong class="markup--strong markup--p-strong">Rate Limiting </strong>on the registered API.</p>
<ol class="postList">
<li id="7835" class="graf graf--li graf-after--p"><strong class="markup--strong markup--li-strong">Key-Authentication</strong></li>
<li id="ae67" class="graf graf--li graf-after--li"><strong class="markup--strong markup--li-strong">Rate-limiting</strong></li>
</ol>
<h3 id="d225" class="graf graf--h3 graf-after--li"><strong>Key-Authentication Plugin</strong></h3>
<figure id="65f4" class="graf graf--figure graf-after--h3">
<div class="aspectRatioPlaceholder is-locked">
<figure style="width: 418px" class="wp-caption aligncenter"><img data-recalc-dims="1" decoding="async" class="graf-image" src="https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2AJgvruHRHOFFP6Dpp4G3RdQ.png?resize=418%2C87&#038;ssl=1" alt="Access control of consumer over the API" width="418" height="87" /><figcaption class="wp-caption-text">Access control of consumer over the API</figcaption></figure>
</div>
</figure>
<p id="5792" class="graf graf--p graf-after--figure">This Key Authentication plugin can be added to a <strong>service</strong> or a <strong>route</strong>. Consumers can add their Apikey either in a querystring parameter or a header to authenticate their requests. Plugins registered can be viewed at <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/plugins" target="_blank" rel="nofollow noopener">http://localhost:8001/plugins</a>.</p>
<h4 id="0c07" class="graf graf--p graf-after--p"><strong>Adding key-auth plugin to the service</strong></h4>
<p id="d109" class="graf graf--p graf-after--p">You should provide service_id(<code class="markup--code markup--p-code"><a href="https://turbolab.in/registering-the-api-as-service-in-kong/">d4079539–45d0–4798–96a8–6ac39d86b6cb)</a></code> or service_name <code class="markup--code markup--p-code">(<a href="https://turbolab.in/registering-the-api-as-service-in-kong/">testApi</a>)</code> of that specific service to register the key-auth plugin. Get the service details at <code class="markup--code markup--p-code"><a class="markup--anchor markup--p-anchor" href="http://localhost:8001/services." target="_blank" rel="noopener">http://localhost:8001/services.</a></code> Register the <code class="markup--code markup--p-code">key-auth</code> plugin to the service with the following cQuery.</p>
<p id="f588" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">curl -X POST <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/services/testApi/plugins" target="_blank" rel="nofollow noopener">http://localhost:8001/services/testApi/plugins</a> \<br />
--data "name=key-auth"<br />
</code><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:<br />
</em></strong><code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">{“created_at”:1536501460000,”config”:{“key_in_body”:false,”run_on_preflight”:true,”anonymous”:””,”hide_credentials”:false,”key_names”:[“apikey”]},”id”:”0fe22dc7–1bae-4a94–9841-d66469a1faaf”,”enabled”:true,”service_id”:”d4079539–45d0–4798–96a8–6ac39d86b6cb”,”name”:”key-auth”}</strong></code></p>
<p id="756e" class="graf graf--p graf-after--p">The above response clearly tells us to pass <code class="markup--code markup--p-code">“apikey”</code> has to pass as header or querystring parameter.</p>
<p class="graf graf--p graf-after--p">Now see what happens, if we access our API</p>
<p id="dbf5" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">curl -i -X GET --url <a class="markup--anchor markup--p-anchor" href="http://localhost:8000/api/v1/test2" target="_blank" rel="nofollow noopener">http://localhost:8000/api/v1/test2</a> --header 'Host: localhost'<br />
</code><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:</em></strong><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0"><br />
<strong class="markup--strong markup--p-strong">HTTP/1.1 401 Unauthorized</strong><br />
<strong>{"message":"No API key found in request"}</strong></code></p>
<p id="47a7" class="graf graf--p graf-after--p">Our consumers needs<code class="markup--code markup--p-code">“apikey”</code> to access the service. Lets set <code class="markup--code markup--p-code">apikey</code> to each consumer we registered with the following query.</p>
<p id="dbe6" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">curl -X POST <a class="markup--anchor markup--p-anchor" href="http://172.16.237.232:8001/consumers/consumer1/key-auth" target="_blank" rel="nofollow noopener noopener nofollow noopener">http://localhost:8001/consumers/consumer1/key-auth</a> --data ""</code><br />
<strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:<br />
</em></strong><strong><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">{"id":"508bee01-613b-4f21-8ced-b098395e0a47","created_at":1536498848000,<em class="markup--em markup--p-em">"key":"M1PyCiEee7QbI44FWC24G4WK7Bb4vZgm"</em>,"consumer_id":"abd67a95-a247-4141-b329-d74fe6d3fb06"}</code></strong></p>
<p id="608e" class="graf graf--p graf-after--p">Pass the <code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">“key”</strong></code> as header or querystring parameter to access the service</p>
<p id="a7b0" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">curl -i -X GET --url <a class="markup--anchor markup--p-anchor" href="http://localhost:8000/api/v1/test2" target="_blank" rel="nofollow noopener">http://localhost:8000/api/v1/test2</a> --header 'Host: localhost' --header 'apikey: M1PyCiEee7QbI44FWC24G4WK7Bb4vZgm'</code><br />
<code class="markup--code markup--p-code">HTTP/1.1 200 OK<br />
</code><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:<br />
</em></strong><strong><code class="markup--code markup--p-code">{“message”:”second end point \”test2\” is called”,”status_code”:200}</code></strong></p>
<p id="a69f" class="graf graf--p graf-after--p">Consumer keys can be accessed at <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/consumers/consumer1/key-auth" target="_blank" rel="noopener"><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">http://localhost:8001/consumers/consumer1/key-auth</em></strong></a></p>
<h4 id="81c6" class="graf graf--p graf-after--p"><strong>Adding key-auth plugin to route</strong></h4>
<p id="4edc" class="graf graf--p graf-after--p">delete the key-auth plugin of the service and lets add on the route to test.</p>
<p id="6997" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">curl -i -X DELETE <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/plugins/0fe22dc7-1bae-4a94-9841-d66469a1faaf" target="_blank" rel="nofollow noopener">http://localhost:8001/plugins/0fe22dc7-1bae-4a94-9841-d66469a1faaf</a></code></p>
<p id="e379" class="graf graf--p graf-after--p">set key-auth plugin to the route <code class="markup--code markup--p-code">/api/v1/test1 with the following query.</code></p>
<p id="4900" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">curl -X POST <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/routes/668ac4ab-4226-45f7-9067-e30c032a840f/plugins" target="_blank" rel="nofollow noopener">http://localhost:8001/routes/668ac4ab-4226-45f7-9067-e30c032a840f/plugins</a> --data "name=key-auth"<br />
</code><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:</em></strong><code class="markup--code markup--p-code"><br />
<strong>{"created_at":1536508484000,"config":{"key_in_body":false,"run_on_preflight":true,"anonymous":"","hide_credentials":false,"key_names":["apikey"]},"id":"048d6fcc-f1f0-4f04-b3a4-584754871dd8","enabled":true,"route_id":"668ac4ab-4226-45f7-9067-e30c032a840f","name":"key-auth"}</strong></code></p>
<figure id="d45d" class="graf graf--figure graf-after--p">
<div class="aspectRatioPlaceholder is-locked">
<div class="aspectRatioPlaceholder-fill"></div>
<div class="progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded">
<figure style="width: 507px" class="wp-caption aligncenter"><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="progressiveMedia-image js-progressiveMedia-image" src="https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2AkGBbX0qhQFW_K5AolDI9DQ.png?resize=507%2C454&#038;ssl=1" alt="Key-Auth on route id" width="507" height="454" /><figcaption class="wp-caption-text">Key-Auth on route id</figcaption></figure>
</div>
</div><figcaption class="imageCaption"></figcaption></figure>
<p id="0d7d" class="graf graf--p graf-after--figure">Now you can access route <code class="markup--code markup--p-code">/api/v1/test2</code> without authentication and route <code class="markup--code markup--p-code">/api/v1/test1</code> with authentication, since we just set the authentication on this route. Lets test this</p>
<p id="5b7f" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">$ curl -i -X GET --url <a class="markup--anchor markup--p-anchor" href="http://localhost:8000/api/v1/test1" target="_blank" rel="nofollow noopener">http://localhost:8000/api/v1/test1</a> --header 'Host: localhost'<br />
<strong class="markup--strong markup--p-strong">HTTP/1.1 401 Unauthorized</strong><br />
<strong>{"message":"No API key found in request"}</strong></code></p>
<p id="c457" class="graf graf--p graf-after--p">The above query passed without <code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">apikey</strong></code> and response is <code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">401 Unauthorized</strong></code></p>
<p id="dafb" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">$ curl -i -X GET --url <a class="markup--anchor markup--p-anchor" href="http://localhost:8000/api/v1/test2" target="_blank" rel="nofollow noopener">http://localhost:8000/api/v1/test2</a> --header 'Host: localhost'<br />
<strong class="markup--strong markup--p-strong">HTTP/1.1 200 OK</strong><br />
<strong>{"message":"second end point \"test2\" is called","status_code":200}</strong></code></p>
<p id="4408" class="graf graf--p graf-after--p">The above query passed without <code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">apikey</strong></code> and the response is <code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">200 OK.</strong></code>Because we added <code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">key-auth </strong></code>plugin only on<code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong"> /api/v1/test1</strong></code> route.</p>
<p id="6065" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">$ curl -i -X GET --url <a class="markup--anchor markup--p-anchor" href="http://localhost:8000/api/v1/test1" target="_blank" rel="nofollow noopener">http://localhost:8000/api/v1/test1</a> --header 'Host: localhost' --header 'apikey: M1PyCiEee7QbI44FWC24G4WK7Bb4vZgm'<br />
<strong class="markup--strong markup--p-strong">HTTP/1.1 200 OK</strong><br />
<strong>{"message":"first end point \"test1\" is called","status_code":200}</strong></code></p>
<p id="be7b" class="graf graf--p graf-after--p">Here we conclude that we can provide a specific route of the API to specific consumer with <code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">key-auth</strong></code> plugin.</p>
<h2 id="debe" class="graf graf--h3 graf-after--p"><strong>Rate Limiting Plugin</strong></h2>
<p id="1d8a" class="graf graf--p graf-after--h3">This plugin helps us to restrict consumer making requests to our API/Service in a given period of time(seconds, minute, hour, month, year).</p>
<p id="a78e" class="graf graf--p graf-after--p">This plugin can be enable on a <strong>service or route or consumer with consumer_id</strong>.</p>
<p id="647a" class="graf graf--p graf-after--p"><strong>Enabling on Service </strong> &#8211;  restricts every consumer making requests to the service.</p>
<p id="3fb9" class="graf graf--p graf-after--p"><strong class="markup--strong markup--p-strong">Enabling on route</strong>  &#8211; restricts every consumer making requests to the specific route of the service.</p>
<p id="8075" class="graf graf--p graf-after--p"><strong class="markup--strong markup--p-strong">Enabling on consumer</strong>  &#8211;  restricts only that specified consumer making requests to any routes of the service.</p>
<h3 id="ed26" class="graf graf--p graf-after--p"><strong class="markup--strong markup--p-strong">Adding rate-limiting to the service:</strong></h3>
<p id="2ffc" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">$ curl -X POST <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/services/testApi/plugins" target="_blank" rel="nofollow noopener">http://localhost:8001/services/testApi/plugins</a> \<br />
--data "name=rate-limiting" \<br />
--data "config.minute=2" \<br />
--data "config.hour=100"</code></p>
<p id="04f0" class="graf graf--p graf-after--p"><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:</em></strong><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">{“created_at”:1536558895000,”config”:{“minute”:2,”policy”:”cluster”,”redis_timeout”:2000,”hide_client_headers”:false,”hour”:100,<strong class="markup--strong markup--p-strong">”limit_by”:”consumer”</strong>,”redis_port”:6379,”redis_database”:0,”fault_tolerant”:true},”id”:”38586082–7619–4bf7-b418-afcc65d37f28",”enabled”:true,”service_id”:”d4079539–45d0–4798–96a8–6ac39d86b6cb”,”name”:”rate-limiting”}</code></p>
<p id="e00f" class="graf graf--p graf-after--p">This plugin is <strong>by-default limit by consumer</strong>. From the query above, we can send only <strong>2 requests per minute</strong> and <strong>100 per hour.</strong><br />
Response from Kong after exceeding limit is <code class="markup--code markup--p-code">{“message”:”API rate limit exceeded”}</code>.</p>
<p class="graf graf--p graf-after--p"><strong>Lets test this by simple python script.</strong></p>
<p id="dace" class="graf graf--p graf-after--p" style="text-align: left"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">import requests<br />
from time import sleep<br />
for i in range(1,10):<br />
response = requests.get(“<a class="markup--anchor markup--p-anchor" href="http://localhost:8000/api/v1/test1?apikey=M1PyCiEee7QbI44FWC24G4WK7Bb4vZgm" target="_blank" rel="nofollow noopener">http://localhost:8000/api/v1/test1?apikey=M1PyCiEee7QbI44FWC24G4WK7Bb4vZgm</a>")<br />
print(response.ok, response.text)<br />
sleep(1)</code></p>
<figure id="e713" class="graf graf--figure graf-after--p">
<div class="aspectRatioPlaceholder is-locked">
<div class="aspectRatioPlaceholder-fill"></div>
<div class="progressiveMedia js-progressiveMedia graf-image is-canvasLoaded is-imageLoaded">
<figure style="width: 800px" class="wp-caption aligncenter"><img data-recalc-dims="1" decoding="async" class="progressiveMedia-image js-progressiveMedia-image" src="https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2Aoqe0I9f-o5de_kCBM9A7jQ.png?resize=800%2C440&#038;ssl=1" alt="Response of rate-limiting plugin" width="800" height="440" /><figcaption class="wp-caption-text">Response of rate-limiting plugin</figcaption></figure>
</div>
</div><figcaption class="imageCaption"></figcaption></figure>
<p id="e5db" class="graf graf--p graf-after--figure">Similarly you can play around with this rate-limiting plugin on consumer or route of the service too. Specify the consumer_id in the following query to add rate-limiting plugin to the consumer.</p>
<p id="0192" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">$ curl -X POST <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/plugins" target="_blank" rel="nofollow noopener">http://localhost:8001/plugins</a> \<br />
--data "name=rate-limiting" \<br />
--data "consumer_id={consumer_id}" \<br />
--data "config.second=5" \<br />
--data "config.hour=10000"</code></p>
<p id="4190" class="graf graf--p graf-after--p">To add rate-limiting plugin on the route of the service, you need to add the route_id to the following query.</p>
<p id="ff95" class="graf graf--p graf-after--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">$ curl -X POST <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/routes/%7Broute_id%7D/plugins" target="_blank" rel="nofollow noopener">http://localhost:8001/routes/{route_id}/plugins</a> \<br />
--data "name=rate-limiting" \<br />
--data "config.minute=2" \<br />
--data "config.hour=100"</code></p>
<p>The post <a href="https://turbolab.in/key-authentication-and-rate-limiting-plugins-of-kong-on-flask-api/">Key Authentication and Rate Limiting plugins of Kong on Flask API</a> appeared first on <a href="https://turbolab.in">Turbolab Technologies</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://turbolab.in/key-authentication-and-rate-limiting-plugins-of-kong-on-flask-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">405</post-id>	</item>
		<item>
		<title>Registering the API as service in KONG</title>
		<link>https://turbolab.in/registering-the-api-as-service-in-kong/</link>
					<comments>https://turbolab.in/registering-the-api-as-service-in-kong/#respond</comments>
		
		<dc:creator><![CDATA[Vasista Reddy]]></dc:creator>
		<pubDate>Fri, 28 Sep 2018 11:19:54 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[apigateway]]></category>
		<category><![CDATA[flask]]></category>
		<category><![CDATA[kong]]></category>
		<guid isPermaLink="false">https://turbolab.in/?p=402</guid>

					<description><![CDATA[<p>In the previous post, we have discussed about the API Gateway uses and detailed Kong API Gateway Installation process. We will proceed to register our API to KONG service and apply Kong plugins like Key Authentication and Rate-limiting on that API. Lets break down the tutorial into two parts: Part 1 Set up the Flask API. [&#8230;]</p>
<p>The post <a href="https://turbolab.in/registering-the-api-as-service-in-kong/">Registering the API as service in KONG</a> appeared first on <a href="https://turbolab.in">Turbolab Technologies</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="graf graf--p">In the previous <a class="markup--anchor markup--p-anchor" href="https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/" target="_blank" rel="noopener">post</a>, we have discussed about the API Gateway uses and detailed <a href="https://konghq.com/">Kong API</a> Gateway Installation process. We will proceed to register our API to KONG service and apply Kong plugins like <strong>Key Authentication</strong> and <strong>Rate-limiting</strong> on that API.</p>
<p class="graf graf--p">Lets break down the tutorial into two parts:</p>
<p class="graf graf--p"><strong class="markup--strong markup--p-strong">Part 1</strong></p>
<ol class="postList">
<li class="graf graf--li">Set up the Flask API. <a class="markup--anchor markup--li-anchor" href="https://github.com/Vasistareddy/flaskapi_test_docker" target="_blank" rel="noopener">Follow this repo</a>.</li>
<li class="graf graf--li">Register our Flask API as <strong class="markup--strong markup--li-strong">service </strong>in Kong.</li>
<li class="graf graf--li">Register our endpoints of Flask API as <strong class="markup--strong markup--li-strong">routes</strong> in Kong.</li>
<li class="graf graf--li">Create Consumers for our <a href="https://konghq.com/">Kong</a> service.</li>
</ol>
<p class="graf graf--p"><strong class="markup--strong markup--p-strong">Part 2</strong></p>
<ol class="postList">
<li class="graf graf--li">Apply <a href="https://konghq.com/">Kong</a> plugins on the services/routes/consumers.<br />
Detailed work on plugins are discussed in next <a class="markup--anchor markup--li-anchor" href="https://medium.com/@vasista/part-2-key-authentication-and-rate-limiting-plugins-of-kong-on-flask-api-9b14f50e5b88" target="_blank" rel="noopener">part</a>.</li>
</ol>
<h3 class="graf graf--h3"><strong class="markup--strong markup--h3-strong">Set up the Flask API</strong></h3>
<p class="graf graf--p">We need an API to proceed further into the discussion. So, lets setup Flask API from this <a class="markup--anchor markup--p-anchor" href="https://github.com/Vasistareddy/flaskapi_test_docker.git" target="_blank" rel="noopener"><strong class="markup--strong markup--p-strong">link</strong></a>. Steps needed to install are clearly mentioned in that git repo.</p>
<p class="graf graf--p">Else, you can proceed if you have an API without setting up the Flask API mentioned above.</p>
<p class="graf graf--p"><code class="markup--code markup--p-code">http://localhost:5055</code> is the domain and port(service) and <code class="markup--code markup--p-code">/api/v1/test1, /api/v1/test2</code> are the endpoints(routes) which are used to communicate with the Flask API.</p>
<figure class="graf graf--figure">
<p><figure style="width: 800px" class="wp-caption aligncenter"><img data-recalc-dims="1" loading="lazy" decoding="async" class="graf-image" src="https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2A5pPbycxr1r0q1mfBTLSL5A.png?resize=800%2C131&#038;ssl=1" alt="Flask API with endpoints" width="800" height="131" /><figcaption class="wp-caption-text">Flask API with endpoints</figcaption></figure><figcaption class="imageCaption"></figcaption></figure>
<h3 class="graf graf--h3"><strong class="markup--strong markup--h3-strong">Register our Flask API as service in Kong:</strong></h3>
<p class="graf graf--p">Kong restful framework makes our job easy for Administration purposes. One can check the registered services at <code class="markup--code markup--p-code">http://localhost:8001/services</code></p>
<p class="graf graf--p">You can register our Flask API as service in Kong with the below query</p>
<p class="graf graf--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">curl -i -X POST \<br />
--url <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/services/" target="_blank" rel="nofollow noopener">http://localhost:8001/services/</a> \<br />
--data 'name=testApi' \<br />
--data 'url=<a class="markup--anchor markup--p-anchor" href="http://localhost:5055%27" target="_blank" rel="nofollow noopener noopener noopener">http://localhost:5055'</a><br />
</code><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:</em></strong> <code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">{“host”:”localhost”,”created_at”:1536467002,”connect_timeout”:60000,”id”:”d4079539–45d0–4798–96a8–6ac39d86b6cb”,”protocol”:”http”,”name”:”testApi”,”read_timeout”:60000,”port”:5055,”path”:null,”updated_at”:1536467002,”retries”:5,”write_timeout”:60000}</strong></code></p>
<figure class="graf graf--figure">
<p><figure style="width: 478px" class="wp-caption aligncenter"><img data-recalc-dims="1" loading="lazy" decoding="async" class="graf-image" src="https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2ArB9lCsosXizvqbZzdVZVjQ.png?resize=478%2C422&#038;ssl=1" alt="Service Registered" width="478" height="422" /><figcaption class="wp-caption-text">Service Registered</figcaption></figure><figcaption class="imageCaption">                                                                                                                                             </figcaption></figure>
<h3 class="graf graf--h3">Register end points of Flask API as routes in KONG</h3>
<p class="graf graf--p">We registered our Flask APIs domain and port as a service. The end points of Flask API are the key to communicate. So, lets register them as routes in Kong. One can check registered routes of the service at <code class="markup--code markup--p-code">http://localhost:8001/routes</code></p>
<p class="graf graf--p">Register the route <code class="markup--code markup--p-code">/api/v1/test1</code> to the service with the following query<br />
<code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">curl -i -X POST \<br />
--url <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/services/testApi/routes" target="_blank" rel="nofollow noopener">http://localhost:8001/services/testApi/routes</a> \<br />
--data 'hosts[]=localhost' \<br />
--data 'paths[]=/api/v1/test1' \<br />
--data 'strip_path=false' \<br />
--data 'methods[]=GET'</code></p>
<figure class="graf graf--figure graf--layoutOutsetCenter">
<p><figure style="width: 1000px" class="wp-caption aligncenter"><img data-recalc-dims="1" loading="lazy" decoding="async" class="graf-image" src="https://i0.wp.com/cdn-images-1.medium.com/max/1000/1%2AsvDd1RqK_PGUASXd8buVNA.png?resize=800%2C105&#038;ssl=1" alt="Response generated from the above query" width="800" height="105" /><figcaption class="wp-caption-text">Response generated from the above query</figcaption></figure><figcaption class="imageCaption"></figcaption></figure>
<figure class="graf graf--figure">
<p><figure style="width: 499px" class="wp-caption aligncenter"><img data-recalc-dims="1" loading="lazy" decoding="async" class="graf-image" src="https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2Aon_X_mCi_76ahmCuEH7Akg.png?resize=499%2C595&#038;ssl=1" alt="endpoint registered to the above service" width="499" height="595" /><figcaption class="wp-caption-text">endpoint registered to the above service</figcaption></figure><figcaption class="imageCaption"></figcaption></figure>
<p class="graf graf--p">Same way, register the other endpoint too. Confirm the two endpoints <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/routes" target="_blank" rel="noopener">here</a>. Make sure that <code class="markup--code markup--p-code">service id</code> matches to their respective<code class="markup--code markup--p-code">/routes.</code></p>
<p class="graf graf--p">Now our requests to API forwards through Kong Gateway at port <code class="markup--code markup--p-code">8000</code>. since, Kong handles proxy requests on port <code class="markup--code markup--p-code">:8000</code></p>
<p class="graf graf--p">Check our API response at <code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">8000<br />
curl -i -X GET \<br />
--url <a class="markup--anchor markup--p-anchor" href="http://localhost:8000/api/v1/test1" target="_blank" rel="nofollow noopener">http://localhost:8000/api/v1/test1</a> \<br />
--header 'Host: localhost'<br />
</code><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:<br />
HTTP/1.1 200 OK</em></strong><br />
<code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">{"message":"first end point \"test1\" is called","status_code":200}</strong></code></p>
<h3 class="graf graf--h3"><strong class="markup--strong markup--h3-strong">Create consumers for our service</strong></h3>
<p class="graf graf--p">Now we just registered our API to Kong. We will have consumers sending multiple requests to our Flask API when it goes to public. How can we set Security and control over API? It can be achieved by adding Kong plugins like Authentication and rate-limiting on services or routes. To test these Kong plugins, we need some consumers. We can register the consumers with <code class="markup--code markup--p-code">username</code> and <code class="markup--code markup--p-code">id</code> with the following query.</p>
<p class="graf graf--p"><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0">$ curl -X POST <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/consumers" target="_blank" rel="nofollow noopener">http://localhost:8001/consumers</a> --data "username=consumer1" --data "custom_id=101"<br />
</code><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:</em></strong><code class="markup--code markup--p-code u-paddingRight0 u-marginRight0"><strong class="markup--strong markup--p-strong">{"custom_id":"101","created_at":1536496865,"username":"consumer1","id":"abd67a95-a247-4141-b329-d74fe6d3fb06"}</strong><br />
$ curl -X POST <a class="markup--anchor markup--p-anchor" href="http://localhost:8001/consumers" target="_blank" rel="nofollow noopener">http://localhost:8001/consumers</a> --data "username=consumer2" --data "custom_id=102"<br />
</code><strong class="markup--strong markup--p-strong"><em class="markup--em markup--p-em">Response:</em></strong><code class="markup--code markup--p-code"><strong class="markup--strong markup--p-strong">{"custom_id":"102","created_at":1536496883,"username":"consumer2","id":"57f1a4dd-c551-43ff-9e06-56501f0d39ac"}</strong></code></p>
<figure class="graf graf--figure">
<p><figure style="width: 468px" class="wp-caption aligncenter"><img data-recalc-dims="1" loading="lazy" decoding="async" class="graf-image" src="https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2A6_vxpCCHbfKsAe2vM803JQ.png?resize=468%2C378&#038;ssl=1" alt="Consumers eager to access our service." width="468" height="378" /><figcaption class="wp-caption-text">Consumers eager to access our service.</figcaption></figure><figcaption class="imageCaption"></figcaption></figure>
<p class="graf graf--p">One can check registered consumers of the service(s)/route(s) at <code class="markup--code markup--p-code"><a class="markup--anchor markup--p-anchor" href="http://localhost:8001/consumers" target="_blank" rel="noopener">http://localhost:8001/consumers</a></code></p>
<p class="graf graf--p">Flask API registered to KONG service and follow this <a class="markup--anchor markup--p-anchor" href="https://medium.com/@vasista/part-2-key-authentication-and-rate-limiting-plugins-of-kong-on-flask-api-9b14f50e5b88" target="_blank" rel="noopener"><strong class="markup--strong markup--p-strong">discussion</strong></a> about applying plugins like Key-Authentication and Rate-Limiting.</p>
<p class="graf graf--p"><a class="markup--anchor markup--p-anchor" href="https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/" target="_blank" rel="noopener">Installation of Kong has discussed in here</a>.</p>
<p class="graf graf--p"><a class="markup--anchor markup--p-anchor" href="https://medium.com/@vasista/part-2-key-authentication-and-rate-limiting-plugins-of-kong-on-flask-api-9b14f50e5b88" target="_blank" rel="noopener">Key Authentication and Rate Limiting plugins of Kong on Flask API</a></p>
<p>The post <a href="https://turbolab.in/registering-the-api-as-service-in-kong/">Registering the API as service in KONG</a> appeared first on <a href="https://turbolab.in">Turbolab Technologies</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://turbolab.in/registering-the-api-as-service-in-kong/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">402</post-id>	</item>
		<item>
		<title>Kong API Gateway Installation Guide for beginners</title>
		<link>https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/</link>
					<comments>https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/#respond</comments>
		
		<dc:creator><![CDATA[Vasista Reddy]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 06:55:22 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[apigateway]]></category>
		<category><![CDATA[installationguide]]></category>
		<category><![CDATA[kong]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://turbolab.in/?p=372</guid>

					<description><![CDATA[<p>[et_pb_section admin_label=&#8221;section&#8221;] [et_pb_row admin_label=&#8221;row&#8221;] [et_pb_column type=&#8221;4_4&#8243;] [et_pb_text admin_label=&#8221;Text&#8221;] Kong API Gateway Installation Guide for beginners In this post, we will discuss about the uses of API Gateways and the installation of open source KONG API Gateway. API Gateways provides security and control over the access by sitting in-front of any number of API services. KONG, [&#8230;]</p>
<p>The post <a href="https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/">Kong API Gateway Installation Guide for beginners</a> appeared first on <a href="https://turbolab.in">Turbolab Technologies</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>[et_pb_section admin_label=&#8221;section&#8221;]<br />
		[et_pb_row admin_label=&#8221;row&#8221;]<br />
			[et_pb_column type=&#8221;4_4&#8243;]<br />
				[et_pb_text admin_label=&#8221;Text&#8221;]</p>
<section>
<div>
<div>
<h3>Kong API Gateway Installation Guide for beginners</h3>
<p>In this post, we will discuss about the uses of API Gateways and the installation of open source KONG API Gateway.</p>
<p>API Gateways provides security and control over the access by sitting in-front of any number of API services. <a href="https://konghq.com/">KONG</a>, <a href="https://tyk.io/">Tyk</a>, <a href="https://apiumbrella.io/">API Umbrella</a>, <a href="https://www.getambassador.io/">Ambassador</a>, <a href="https://gravitee.io/">Gravitee.io</a> etc., are some of the API Gateways currently available in the market. These Gateways provides services like Authentication, rate-limiting, analysis, logging etc., to your API endpoints.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="376" data-permalink="https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/api_gateway1/" data-orig-file="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/api_gateway1.jpg?fit=800%2C600&amp;ssl=1" data-orig-size="800,600" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="api_gateway1" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/api_gateway1.jpg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/api_gateway1.jpg?fit=800%2C600&amp;ssl=1" class="size-full wp-image-376 aligncenter" src="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/api_gateway1.jpg?resize=800%2C600&#038;ssl=1" alt="" width="800" height="600" srcset="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/api_gateway1.jpg?w=800&amp;ssl=1 800w, https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/api_gateway1.jpg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/api_gateway1.jpg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/api_gateway1.jpg?resize=510%2C382&amp;ssl=1 510w" sizes="(max-width: 800px) 100vw, 800px" /></p>
<p class="graf graf--p" style="text-align: center">  Flowchart diagram to illustrate the API Gateway usage</p>
<blockquote><p>Why choosing <strong>KONG</strong> over other gateways? Because, it is most straightforward of the choices above and the community is very much alive.</p></blockquote>
<p>The latest version of the Kong 0.14.x comes with the support of various platforms. <strong>click here to </strong><a href="https://konghq.com/install/"><strong>choose</strong></a><strong>. </strong>We proceed further with Installing Kong on Ubuntu platform.</p>
<h3><strong>Installing kong on Ubuntu</strong></h3>
<p><strong><em>Installation of deb file</em></strong></p>
<ol>
<li>download the debian file <a href="https://bintray.com/kong/kong-community-edition-deb/download_file?file_path=dists/kong-community-edition-0.14.1.zesty.all.deb" target="_blank" rel="noopener"><strong>here</strong></a>.</li>
<li>After downloading at the file location, do the following.</li>
</ol>
<p><code>$ sudo apt-get update<br />
$ sudo apt-get install openssl libpcre3 procps perl<br />
$ sudo dpkg -i kong-community-edition-0.14.1.zesty.all.deb</code></p>
<p><strong><em>Database setup</em></strong></p>
<p>Now, we have to setup database. Kong supports <strong>PostgreSQL</strong> and <strong>cassandra</strong></p>
<p>Lets setup <a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04"><strong>PostgreSQL </strong></a>for KONG with user, database name and its password.</p>
<p><code>$ sudo apt-get install postgresql postgresql-contrib</code></p>
<p>Switch over to the <code>postgres</code> account on your server which created at the time of installation procedure by typing:</p>
<p><code>$ sudo -i -u postgres</code></p>
<p>Type <code>psql</code> to access a Postgres prompt and <code>\q</code> to exit the prompt.</p>
<p><strong><em>Setup USER, DATABASE with password</em></strong></p>
<p><code>postgres=# CREATE USER kong; CREATE DATABASE kong OWNER kong;</code></p>
<p><code>postgres=# ALTER USER kong WITH PASSWORD '<strong>password you set</strong>';</code></p>
<p><strong><em>Update Kong configuration and run migrations</em></strong></p>
<p>Generally the Kong configuration path will be at <code>/etc/kong/kong.conf.default</code></p>
<p><code>$ sudo cp /etc/kong/kong.conf.default /etc/kong/kong.conf</code></p>
<p>run the migrations job before the start</p>
<p><code>$ sudo kong migrations up -c /etc/kong/kong.conf<br />
Error: missing password, required for connect<br />
Run with — v (verbose) or — vv (debug) for more details</code></p>
<p>The above error might encounter if you don&#8217;t update the Kong configuration file. For this, you have to do the following steps.</p>
<p><code>$ sudo nano /etc/kong/kong.conf<br />
</code>and paste the below lines<code><br />
pg_user = kong<br />
pg_password = <strong>password you set</strong><br />
pg_database = kong</code></p>
<p><strong><em>Running Kong migrations</em></strong></p>
<p><code>$ sudo kong migrations up -c /etc/kong/kong.conf</code></p>
<p>If this throws an error <code>Error: [postgres error] could not retrieve current migrations: [postgres error] ERROR: function to_regclass(unknown) does not exist (8)</code> , check the <strong>PostgreSQL</strong> version here.</p>
<p><code>$ sudo service postgresql status</code></p>
<p>Kong requires <strong>PostgreSQL 9.5</strong> or later. <a href="https://medium.com/@tk512/upgrading-postgresql-from-9-4-to-9-5-on-ubuntu-14-04-lts-dfd93773d4a5" target="_blank" rel="noopener">Upgrade the older version here</a>.</p>
<p>If you upgrade to PostgreSQL 9.5 or later, then you don&#8217;t have to setup the database, user and password. If you install, you should setup again.</p>
<p><strong><em>Start Kong</em></strong></p>
<p><code>$ sudo kong start -c /etc/kong/kong.conf</code></p>
<p><strong><em>Stop Kong</em></strong></p>
<p><code>$ sudo kong stop</code> <strong>#to stop the Kong</strong></p>
<p><strong><em>Final step to make sure the installation and setup process succeeded is:</em></strong></p>
<p><code>$ curl -i <a href="https://medium.com/r/?url=http%3A%2F%2F127.0.0.1%3A8001%2F" target="_blank" rel="nofollow noopener">http://localhost:8001/</a> </code>or<code> <a href="https://medium.com/r/?url=http%3A%2F%2F127.0.0.1%3A8001%2F" target="_blank" rel="nofollow noopener">http://localhost:8001/</a> </code>in the browser</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="374" data-permalink="https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/1vsfualchf9hrjv88k0surw/" data-orig-file="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/1VSfuAlCHF9HRjV88k0SuRw.png?fit=418%2C755&amp;ssl=1" data-orig-size="418,755" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="1*VSfuAlCHF9HRjV88k0SuRw" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/1VSfuAlCHF9HRjV88k0SuRw.png?fit=166%2C300&amp;ssl=1" data-large-file="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/1VSfuAlCHF9HRjV88k0SuRw.png?fit=418%2C755&amp;ssl=1" class="wp-image-374 size-full aligncenter" src="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/1VSfuAlCHF9HRjV88k0SuRw.png?resize=418%2C755&#038;ssl=1" alt="" width="418" height="755" srcset="https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/1VSfuAlCHF9HRjV88k0SuRw.png?w=418&amp;ssl=1 418w, https://i0.wp.com/turbolab.in/wp-content/uploads/2018/09/1VSfuAlCHF9HRjV88k0SuRw.png?resize=166%2C300&amp;ssl=1 166w" sizes="(max-width: 418px) 100vw, 418px" /></p>
<p style="text-align: center">   Welcome to Kong</p>
<p>That’s the end of Kong setup.</p>
</div>
</div>
</section>
<p>				[/et_pb_text]<br />
			[/et_pb_column]<br />
		[/et_pb_row]<br />
	[/et_pb_section]</p>
<p>The post <a href="https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/">Kong API Gateway Installation Guide for beginners</a> appeared first on <a href="https://turbolab.in">Turbolab Technologies</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://turbolab.in/kong-api-gateway-installation-guide-for-beginners/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">372</post-id>	</item>
	</channel>
</rss>
