<?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 - ServerStadium</title>
	<atom:link href="https://serverstadium.com/knowledge-base/category/api/feed/" rel="self" type="application/rss+xml" />
	<link>https://serverstadium.com/knowledge-base/category/api/</link>
	<description>Public Cloud Solution by ServerStadium</description>
	<lastBuildDate>Thu, 20 Apr 2023 00:10:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://serverstadium.com/wp-content/uploads/2023/04/cropped-favicon-1-32x32.png</url>
	<title>API Archives - ServerStadium</title>
	<link>https://serverstadium.com/knowledge-base/category/api/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Generating an API Token</title>
		<link>https://serverstadium.com/knowledge-base/generate-an-api-token/</link>
		
		<dc:creator><![CDATA[Brian K]]></dc:creator>
		<pubDate>Tue, 25 Aug 2020 13:48:47 +0000</pubDate>
				<guid isPermaLink="false">https://cloudraya.com/knowledge-base/?p=153</guid>

					<description><![CDATA[<p>API token is useful to enable access to ServerStadium API located in the API documentation. You can generate such token once you have generated an API key via this guidelines Generate API Key. Please follow the steps below. In our API Documentation, you need to send an authentication to the API gateway. This is to&#8230;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/generate-an-api-token/">Generating an API Token</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">API token is useful to enable access to ServerStadium API located in the API documentation. You can generate such token once you have generated an API key via this guidelines <a href="https://serverstadium.com/knowledge-base/generating-api-key/" target="_blank" rel="noreferrer noopener">Generate API Key</a>.</p>



<p class="wp-block-paragraph">Please follow the steps below.</p>



<figure class="wp-block-image"><img decoding="async" src="https://serverstadium.com/wp-content/uploads/2020/09/serverstadium-api-token-generate.png" alt="" class="wp-image-367"/></figure>



<p class="wp-block-paragraph">In our <a href="https://cp.serverstadium.com/apidoc" target="_blank" rel="noreferrer noopener">API Documentation</a>, you need to send an authentication to the API gateway. This is to get your API token, in this case a &#8220;Bearer&#8221; Token.</p>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Step 1</strong>: <strong>Sending a http post</strong></h2>



<p class="wp-block-paragraph">Send a http POST to the URL<code><span class="has-inline-color has-vivid-cyan-blue-color"> https://api.serverstadium.com/v1/api/gateway/user/auth</span></code>  with a raw JSON Body that contains the <span class="has-inline-color has-vivid-cyan-blue-color">app_key</span> and <span class="has-inline-color has-vivid-cyan-blue-color">secret_key</span> found in API Gateway Management Page in the ServerStadium Control Panel. The example raw JSON body is as follow.</p>



<pre class="wp-block-code"><code>{
    "app_key": "9a0bb2f3-4e2e-4e57-b340-ee36f3076515",
    "secret_key": "QLap0OqzMpRccfeDzAnSD8wqj4FPMlda"
}</code></pre>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Step 2</strong>: <strong>Obtaining a bearer token</strong></h2>



<p class="wp-block-paragraph">The API Gateway will return a &#8220;<span class="has-inline-color has-vivid-cyan-blue-color">bearer_token</span>&#8221; that you can use to communicate with the API gateway. The figure below illustrates the response that you will get regarding the bearer token.</p>



<pre class="wp-block-code"><code>{
    "code": 200,
    "data": {
        "bearer_token": "eyJpdiI6IkhldHRZY0FoZjVaSXdYTEdp.....",
        "username": "the_username",
        "expired_at": "2020-08-20 14:43:27",
        "timezone": "UTC",
        "refresh_token": "eyJpdiI6InhFVVY4QmR2YlFF......."
    },
    "message": "success"
}</code></pre>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Step 3</strong>: <strong>Using the bearer token</strong></h2>



<p class="wp-block-paragraph">You may use the &#8220;<span class="has-inline-color has-vivid-cyan-blue-color">bearer_token</span>&#8221; in your header as an &#8220;<span class="has-inline-color has-vivid-cyan-blue-color">Authorization</span>&#8221; with value &#8220;<span class="has-inline-color has-vivid-cyan-blue-color">Bearer &lt;token&gt;</span>&#8221; without the &#8220;&lt;&#8221; or &#8220;&gt;&#8221;</p>



<p class="wp-block-paragraph"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-luminous-vivid-orange-color">Remember</mark>, the token can expire. However, you can use the refresh token to get a new token. That way, you do not need to send another authentication to obtain a new token.</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/generate-an-api-token/">Generating an API Token</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Generating an API key</title>
		<link>https://serverstadium.com/knowledge-base/generating-an-api-key/</link>
		
		<dc:creator><![CDATA[Brian K]]></dc:creator>
		<pubDate>Tue, 25 Aug 2020 13:32:37 +0000</pubDate>
				<guid isPermaLink="false">https://cloudraya.com/knowledge-base/?p=141</guid>

					<description><![CDATA[<p>One of the most powerful features in ServerStadium Cloud is API which can automate your deployment in the cloud. However, before using the API, you need to enable and generate an API key for your application or platform. Please follow the steps below: Once you log into the control panel https://cp.serverstadium.com, on the left of&#8230;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/generating-an-api-key/">Generating an API key</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">One of the most powerful features in ServerStadium Cloud is API which can automate your deployment in the cloud. However, before using the API, you need to enable and generate an API key for your application or platform. Please follow the steps below:</p>



<p class="wp-block-paragraph">Once you log into the control panel <a href="https://cp.serverstadium.com" target="_blank" rel="noreferrer noopener">https://cp.serverstadium.com</a>, on the left of the dashboard there is a menu, you can click on &#8220;Settings&#8221; and it will redirect you to the Settings Page.</p>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading">Step 1</h2>



<p class="wp-block-paragraph">Please click on the blue button &#8220;Add API Gateway&#8221;</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="829" height="478" class="wp-image-142" src="https://serverstadium.com/wp-content/uploads/2020/08/image-7.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2020/08/image-7.png 829w, https://serverstadium.com/wp-content/uploads/2020/08/image-7-300x173.png 300w, https://serverstadium.com/wp-content/uploads/2020/08/image-7-768x443.png 768w" sizes="(max-width: 829px) 100vw, 829px" /></figure>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading">Step 2</h2>



<p class="wp-block-paragraph">You can give it a name for the API, (alphanumeric and dash only)</p>



<figure class="wp-block-image size-large"><img decoding="async" width="511" height="371" class="wp-image-143" src="https://serverstadium.com/wp-content/uploads/2020/08/image-8.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2020/08/image-8.png 511w, https://serverstadium.com/wp-content/uploads/2020/08/image-8-300x218.png 300w" sizes="(max-width: 511px) 100vw, 511px" /></figure>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading">Step 3</h2>



<p class="wp-block-paragraph">You may whitelist the API to allow only certain IP addresses. Then please go ahead and click the blue button &#8220;Add API Gateway&#8221;</p>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading">Step 4</h2>



<p class="wp-block-paragraph">You will be redirected back to the Settings Page, and this time, the API Gateway Management will list the new API key that you just added. Click on the <img decoding="async" width="33" height="32" class="wp-image-146" style="width: 33px;" src="https://serverstadium.com/wp-content/uploads/2020/08/plus-sign.png" alt="" /> to view the &#8220;Secret Key&#8221; and additional detailed information.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="816" height="290" class="wp-image-144" src="https://serverstadium.com/wp-content/uploads/2020/08/image-9.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2020/08/image-9.png 816w, https://serverstadium.com/wp-content/uploads/2020/08/image-9-300x107.png 300w, https://serverstadium.com/wp-content/uploads/2020/08/image-9-768x273.png 768w" sizes="(max-width: 816px) 100vw, 816px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="543" height="261" class="wp-image-147" src="https://serverstadium.com/wp-content/uploads/2020/08/image-11.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2020/08/image-11.png 543w, https://serverstadium.com/wp-content/uploads/2020/08/image-11-300x144.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></figure>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading">Step 5</h2>



<p class="wp-block-paragraph">Now you have all the necessary information to start using the API on ServerStadium Cloud.</p>



<p class="wp-block-paragraph">You may continue on this <a href="https://serverstadium.com/knowledge-base/generate-an-api-token/" target="_blank" rel="noreferrer noopener">Generate a Token</a> guideline on how to generate tokens and access the API in ServerStadium Cloud.</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/generating-an-api-key/">Generating an API key</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
