PageSourceSearch

https://www.pysio.online/assets/api.html-DNGaY2qJ.js

js pysio.online collected 2026-09-28 06:50:49 UTC 47,876 bytes, 155 lines download raw bytes

1import{a,c as n,f as e,o as t}from"./app-fWPFO-Ym.js";const o={};function p(l,s){return t(),n("div",null,[...s[0]||(s[0]=[e(`<h2 id="general-information" tabindex="-1"><a class="header-anchor" href="#general-information"><span>General Information</span></a></h2><div class="hint-container note"><p class="hint-container-title">Note</p><p>All APIs have been deployed to production environment, please use the following base URL for access.</p></div><h3 id="base-url" tabindex="-1"><a class="header-anchor" href="#base-url"><span>Base URL</span></a></h3><div class="language-text" data-highlighter="prismjs" data-ext="text"><pre><code class="language-text"><span class="line">https://blogapi.pysio.online</span>
2<span class="line"></span></code></pre></div><h3 id="api-collection" tabindex="-1"><a class="header-anchor" href="#api-collection"><span>API Collection</span></a></h3><p>You can also download the JSON file directly: <a href="https://www.pysio.online/json/blog-api-collection.json" target="_blank" rel="noopener noreferrer">Download API Collection</a> and import it into Postman for use</p><div class="hint-container important"><p class="hint-container-title">Important</p><p>When making API calls, please note the following:</p><ul><li>All requests must use HTTPS protocol</li><li>APIs may have rate limiting</li><li>Please keep your authentication tokens secure</li><li>Image storage uses Minio object storage with CDN acceleration</li></ul></div><h3 id="common-response-format" tabindex="-1"><a class="header-anchor" href="#common-response-format"><span>Common Response Format</span></a></h3><p>All JSON responses follow this format:</p><div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
3<span class="line">  <span class="token property">&quot;status&quot;</span><span class="token operator">:</span> <span class="token string">&quot;success/error&quot;</span><span class="token punctuation">,</span></span>
4<span class="line">  <span class="token property">&quot;data/error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;response data/error message&quot;</span></span>
5<span class="line"><span class="token punctuation">}</span></span>
6<span class="line"></span></code></pre></div><div class="hint-container tip"><p class="hint-container-title">Tips</p><p>For API debugging, we recommend using the following tools:</p><ul><li><a href="https://www.postman.com/" target="_blank" rel="noopener noreferrer">Postman</a></li><li><a href="https://insomnia.rest/" target="_blank" rel="noopener noreferrer">Insomnia</a></li><li><a href="https://curl.se/" target="_blank" rel="noopener noreferrer">curl</a></li></ul></div><h3 id="authentication-header-format" tabindex="-1"><a class="header-anchor" href="#authentication-header-format"><span>Authentication Header Format</span></a></h3><div class="language-text" data-highlighter="prismjs" data-ext="text"><pre><code class="language-text"><span class="line">Authorization: Bearer {TOKEN}</span>
7<span class="line"></span></code></pre></div><div class="hint-container warning"><p class="hint-container-title">Warning</p><p>Do not store admin tokens directly in client-side code. Ensure secure token storage methods in production environments.</p></div><h2 id="system-status-endpoints" tabindex="-1"><a class="header-anchor" href="#system-status-endpoints"><span>System Status Endpoints</span></a></h2><div class="hint-container note"><p class="hint-container-title">Note</p><p>System status endpoints can be used to monitor service health.</p></div><h3 id="_1-system-status-check" tabindex="-1"><a class="header-anchor" href="#_1-system-status-check"><span>1. System Status Check</span></a></h3><ul><li><strong>Request Path</strong>: <code>/</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Response Format</strong>: text/plain</li><li><strong>Response Example</strong>: <code>What are you doing here? Meow?</code></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> https://blogapi.pysio.online/</span>
8<span class="line"></span></code></pre></div></li></ul><div class="hint-container tip"><p class="hint-container-title">Tips</p><p>Recommended to use this endpoint for basic connectivity testing.</p></div><h3 id="_2-fastfetch-system-information" tabindex="-1"><a class="header-anchor" href="#_2-fastfetch-system-information"><span>2. FastFetch System Information</span></a></h3><ul><li><strong>Request Path</strong>: <code>/fastfetch</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
9<span class="line">  <span class="token property">&quot;status&quot;</span><span class="token operator">:</span> <span class="token string">&quot;success&quot;</span><span class="token punctuation">,</span></span>
10<span class="line">  <span class="token property">&quot;output&quot;</span><span class="token operator">:</span> <span class="token string">&quot;System information in HTML format&quot;</span></span>
11<span class="line"><span class="token punctuation">}</span></span>
12<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> https://blogapi.pysio.online/fastfetch</span>
13<span class="line"></span></code></pre></div></li></ul><h3 id="_3-heartbeat-detection" tabindex="-1"><a class="header-anchor" href="#_3-heartbeat-detection"><span>3. Heartbeat Detection</span></a></h3><ul><li><strong>Request Path</strong>: <code>/heartbeat</code></li><li><strong>Request Method</strong>: POST</li><li><strong>Request Headers</strong>:<div class="language-text" data-highlighter="prismjs" data-ext="text"><pre><code class="language-text"><span class="line">Authorization: Bearer {TOKEN}</span>
14<span class="line"></span></code></pre></div></li><li><strong>Request Parameters</strong>: <ul><li><code>application</code>: Application name</li><li><code>introduce</code>: Application description</li><li><code>rgba</code>: Color value</li><li><code>applicationOnline</code>: Application status</li></ul></li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
15<span class="line">  <span class="token property">&quot;message&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Heartbeat received&quot;</span><span class="token punctuation">,</span></span>
16<span class="line">  <span class="token property">&quot;application&quot;</span><span class="token operator">:</span> <span class="token string">&quot;MyApp&quot;</span><span class="token punctuation">,</span></span>
17<span class="line">  <span class="token property">&quot;introduce&quot;</span><span class="token operator">:</span> <span class="token string">&quot;My Application Description&quot;</span><span class="token punctuation">,</span></span>
18<span class="line">  <span class="token property">&quot;rgba&quot;</span><span class="token operator">:</span> <span class="token string">&quot;233,30,99,0.17&quot;</span><span class="token punctuation">,</span></span>
19<span class="line">  <span class="token property">&quot;applicationOnline&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span></span>
20<span class="line"><span class="token punctuation">}</span></span>
21<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> <span class="token parameter variable">-X</span> POST <span class="token parameter variable">-H</span> <span class="token string">&quot;Authorization: Bearer your_token&quot;</span> https://blogapi.pysio.online/heartbeat</span>
22<span class="line"></span></code></pre></div></li></ul><h3 id="_4-status-check" tabindex="-1"><a class="header-anchor" href="#_4-status-check"><span>4. Status Check</span></a></h3><ul><li><strong>Request Path</strong>: <code>/check</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
23<span class="line">  <span class="token property">&quot;alive&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span></span>
24<span class="line">  <span class="token property">&quot;last_heartbeat&quot;</span><span class="token operator">:</span> <span class="token number">1234567890</span><span class="token punctuation">,</span></span>
25<span class="line">  <span class="token property">&quot;application&quot;</span><span class="token operator">:</span> <span class="token string">&quot;MyApp&quot;</span><span class="token punctuation">,</span></span>
26<span class="line">  <span class="token property">&quot;introduce&quot;</span><span class="token operator">:</span> <span class="token string">&quot;My Application Description&quot;</span><span class="token punctuation">,</span></span>
27<span class="line">  <span class="token property">&quot;rgba&quot;</span><span class="token operator">:</span> <span class="token string">&quot;233,30,99,0.17&quot;</span><span class="token punctuation">,</span></span>
28<span class="line">  <span class="token property">&quot;applicationOnline&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span></span>
29<span class="line"><span class="token punctuation">}</span></span>
30<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> https://blogapi.pysio.online/check</span>
31<span class="line"></span></code></pre></div></li></ul><h2 id="image-management-endpoints" tabindex="-1"><a class="header-anchor" href="#image-management-endpoints"><span>Image Management Endpoints</span></a></h2><div class="hint-container important"><p class="hint-container-title">Important</p><p>All images are stored in Minio object storage with CDN acceleration. Uploaded images are automatically converted to WebP format for optimized storage and transmission.</p></div><h3 id="_1-get-random-image" tabindex="-1"><a class="header-anchor" href="#_1-get-random-image"><span>1. Get Random Image</span></a></h3><ul><li><strong>Request Path</strong>: <code>/random_image</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Response</strong>: 302 redirect to Minio stored image</li><li><strong>Redirect Format</strong>: <code>https://minioapi.pysio.online/randomimg/{hash}.webp</code></li><li><strong>Error Response</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
32<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;No images available&quot;</span></span>
33<span class="line"><span class="token punctuation">}</span></span>
34<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token comment"># Use -L parameter to follow redirects</span></span>
35<span class="line"><span class="token function">curl</span> <span class="token parameter variable">-L</span>
35 https://blogapi.pysio.online/random_image <span class="token parameter variable">-o</span> random.webp</span>
36<span class="line"></span></code></pre></div></li></ul><h3 id="_2-get-specific-image" tabindex="-1"><a class="header-anchor" href="#_2-get-specific-image"><span>2. Get Specific Image</span></a></h3><ul><li><strong>Request Path</strong>: <code>/images/:hash</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Parameters</strong>: <ul><li><code>hash</code>: Image hash value</li></ul></li><li><strong>Response</strong>: 302 redirect to Minio stored image</li><li><strong>Redirect Format</strong>: <code>https://minioapi.pysio.online/randomimg/{hash}.webp</code></li><li><strong>Error Response</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
37<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Image not found&quot;</span></span>
38<span class="line"><span class="token punctuation">}</span></span>
39<span class="line"></span></code></pre></div></li></ul><h3 id="_3-get-image-optimized" tabindex="-1"><a class="header-anchor" href="#_3-get-image-optimized"><span>3. Get Image (Optimized)</span></a></h3><ul><li><strong>Request Path</strong>: <code>/i/:hash</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Parameters</strong>: <ul><li><code>hash</code>: Image hash value</li></ul></li><li><strong>Response</strong>: 302 redirect to Minio stored image</li><li><strong>Redirect Format</strong>: <code>https://minioapi.pysio.online/randomimg/{hash}.webp</code></li><li><strong>Error Response</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
40<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Image not found&quot;</span></span>
41<span class="line"><span class="token punctuation">}</span></span>
42<span class="line"></span></code></pre></div></li></ul><h3 id="_4-upload-image" tabindex="-1"><a class="header-anchor" href="#_4-upload-image"><span>4. Upload Image</span></a></h3><ul><li><strong>Request Path</strong>: <code>/images/add</code></li><li><strong>Request Method</strong>: POST</li><li><strong>Request Headers</strong>:<div class="language-text" data-highlighter="prismjs" data-ext="text"><pre><code class="language-text"><span class="line">Authorization: Bearer {ADMIN_TOKEN}</span>
43<span class="line">Content-Type: multipart/form-data</span>
44<span class="line"></span></code></pre></div></li><li><strong>Request Parameters</strong>: <ul><li><code>image</code>: Image file (form-data)</li></ul></li><li><strong>Response Format</strong>: application/json</li><li><strong>Success Response</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
45<span class="line">  <span class="token property">&quot;hash&quot;</span><span class="token operator">:</span> <span class="token string">&quot;image hash value&quot;</span><span class="token punctuation">,</span></span>
46<span class="line">  <span class="token property">&quot;size&quot;</span><span class="token operator">:</span> image_size_in_bytes</span>
47<span class="line"><span class="token punctuation">}</span></span>
48<span class="line"></span></code></pre></div></li><li><strong>Error Response</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
49<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Image file is required&quot;</span></span>
50<span class="line"><span class="token punctuation">}</span></span>
51<span class="line"></span></code></pre></div>or<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
52<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Image already exists&quot;</span><span class="token punctuation">,</span></span>
53<span class="line">  <span class="token property">&quot;hash&quot;</span><span class="token operator">:</span> <span class="token string">&quot;existing image hash&quot;</span></span>
54<span class="line"><span class="token punctuation">}</span></span>
55<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> <span class="token parameter variable">-X</span> POST <span class="token punctuation">\\</span></span>
56<span class="line">  <span class="token parameter variable">-H</span> <span class="token string">&quot;Authorization: Bearer your_admin_token&quot;</span> <span class="token punctuation">\\</span></span>
57<span class="line">  <span class="token parameter variable">-F</span> <span class="token string">&quot;image=@/path/to/your/image.jpg&quot;</span> <span class="token punctuation">\\</span></span>
58<span class="line">  https://blogapi.pysio.online/images/add</span>
59<span class="line"></span></code></pre></div></li></ul><h3 id="_5-get-image-list" tabindex="-1"><a class="header-anchor" href="#_5-get-image-list"><span>5. Get Image List</span></a></h3><ul><li><strong>Request Path</strong>: <code>/images/list</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Query Parameters</strong>: <ul><li><code>page</code>: Page number (default: 1)</li><li><code>limit</code>: Items per page (default: 10)</li></ul></li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
60<span class="line">  <span class="token property">&quot;images&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span></span>
61<span class="line">    <span class="token punctuation">{</span></span>
62<span class="line">
62      <span class="token property">&quot;hash&quot;</span><span class="token operator">:</span> <span class="token string">&quot;image hash&quot;</span><span class="token punctuation">,</span></span>
63<span class="line">      <span class="token property">&quot;contentType&quot;</span><span class="token operator">:</span> <span class="token string">&quot;image/webp&quot;</span><span class="token punctuation">,</span></span>
64<span class="line">      <span class="token property">&quot;createdAt&quot;</span><span class="token operator">:</span> <span class="token string">&quot;creation time&quot;</span></span>
65<span class="line">    <span class="token punctuation">}</span></span>
66<span class="line">  <span class="token punctuation">]</span><span class="token punctuation">,</span></span>
67<span class="line">  <span class="token property">&quot;pagination&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span></span>
68<span class="line">    <span class="token property">&quot;current&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span></span>
69<span class="line">    <span class="token property">&quot;size&quot;</span><span class="token operator">:</span> <span class="token number">10</span><span class="token punctuation">,</span></span>
70<span class="line">    <span class="token property">&quot;total&quot;</span><span class="token operator">:</span> <span class="token number">100</span></span>
71<span class="line">  <span class="token punctuation">}</span></span>
72<span class="line"><span class="token punctuation">}</span></span>
73<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> <span class="token string">&quot;https://blogapi.pysio.online/images/list?page=1&amp;limit=10&quot;</span></span>
74<span class="line"></span></code></pre></div></li></ul><h3 id="_6-get-image-count" tabindex="-1"><a class="header-anchor" href="#_6-get-image-count"><span>6. Get Image Count</span></a></h3><ul><li><strong>Request Path</strong>: <code>/images/count</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
75<span class="line">  <span class="token property">&quot;count&quot;</span><span class="token operator">:</span> <span class="token number">100</span></span>
76<span class="line"><span class="token punctuation">}</span></span>
77<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> https://blogapi.pysio.online/images/count</span>
78<span class="line"></span></code></pre></div></li></ul><h3 id="_7-delete-image" tabindex="-1"><a class="header-anchor" href="#_7-delete-image"><span>7. Delete Image</span></a></h3><ul><li><strong>Request Path</strong>: <code>/images/:hash</code></li><li><strong>Request Method</strong>: DELETE</li><li><strong>Request Headers</strong>:<div class="language-text" data-highlighter="prismjs" data-ext="text"><pre><code class="language-text"><span class="line">Authorization: Bearer {ADMIN_TOKEN}</span>
79<span class="line"></span></code></pre></div></li><li><strong>Parameters</strong>: <ul><li><code>hash</code>: Hash of image to delete</li></ul></li><li><strong>Response Format</strong>: application/json</li><li><strong>Success Response</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
80<span class="line">  <span class="token property">&quot;message&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Image deleted successfully&quot;</span></span>
81<span class="line"><span class="token punctuation">}</span></span>
82<span class="line"></span></code></pre></div></li><li><strong>Error Response</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
83<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Image not found&quot;</span></span>
84<span class="line"><span class="token punctuation">}</span></span>
85<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> <span class="token parameter variable">-X</span> DELETE <span class="token punctuation">\\</span></span>
86<span class="line">  <span class="token parameter variable">-H</span> <span class="token string">&quot;Authorization: Bearer your_admin_token&quot;</span> <span class="token punctuation">\\</span></span>
87<span class="line">  https://blogapi.pysio.online/images/your_image_hash</span>
88<span class="line"></span></code></pre></div></li></ul><h3 id="_8-batch-upload-tools" tabindex="-1"><a class="header-anchor" href="#_8-batch-upload-tools"><span>8. Batch Upload Tools</span></a></h3><p>Two batch upload tools are provided:</p><ol><li>Go command line tool:</li></ol><div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token comment"># Compile tool</span></span>
89<span class="line">go build <span class="token parameter variable">-o</span> uploader cmd/upload/main.go</span>
90<span class="line"></span>
91<span class="line"><span class="token comment"># Use tool</span></span>
92<span class="line">./uploader <span class="token parameter variable">-folder</span> /path/to/images <span class="token punctuation">\\</span></span>
93<span class="line">  <span class="token parameter variable">-api</span> https://blogapi.pysio.online <span class="token punctuation">\\</span></span>
94<span class="line">  <span class="token parameter variable">-token</span> your_admin_token <span class="token punctuation">\\</span></span>
95<span class="line">  <span class="token parameter variable">-concurrent</span> <span class="token number">5</span></span>
96<span class="line"></span></code></pre></div><ol start="2"><li>PowerShell script:</li></ol><div class="language-powershell" data-highlighter="prismjs" data-ext="powershell"><pre><code class="language-powershell"><span class="line"><span class="token comment"># Run script</span></span>
97<span class="line"><span class="token punctuation">.</span>\\upload<span class="token punctuation">.</span>ps1 <span class="token operator">-</span>folder <span class="token string">&quot;C:\\Images&quot;</span> \`</span>
98<span class="line">  <span class="token operator">-</span>token <span class="token string">&quot;your_token&quot;</span> \`</span>
99<span class="line">  <span class="token operator">-</span>retries 5 \`</span>
100<span class="line">  <span class="token operator">-</span>timeout 60 \`</span>
101<span class="line">  <span class="token operator">-</span>api <span class="token string">&quot;https://blogapi.pysio.online&quot;</span></span>
102<span class="line"></span></code></pre></div><h2 id="steam-status-endpoints" tabindex="-1"><a class="header-anchor" href="#steam-status-endpoints"><span>Steam Status Endpoints</span></a></h2><h3 id="_1-steam-game-status" tabindex="-1"><a class="header-anchor" href="#_1-steam-game-status"><span>1. Steam Game Status</span></a></h3><ul><li><strong>Request Path</strong>: <code>/steam_status</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example (In Game)</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
103<span class="line">  <span class="token property">&quot;status&quot;</span><span class="token operator">:</span> <span class="token string">&quot;In Game&quot;</span><span class="token punctuation">,</span></span>
104<span class="line">  <span class="token property">&quot;game&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Game Name&quot;</span><span class="token punctuation">,</span></span>
105<span class="line">  <span class="token property">&quot;game_id&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Game ID&quot;</span><span class="token punctuation">,</span></span>
106<span class="line">  <span class="token property">&quot;description&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Game Description&quot;</span><span class="token punctuation">,</span></span>
107<span class="line">  <span class="token property">&quot;price&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Game Price&quot;</span><span class="token punctuation">,</span></span>
108<span class="line">  <span class="token property">&quot;playtime&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Playtime&quot;</span><span class="token punctuation">,</span></span>
109<span class="line">  <span class="token property">&quot;achievement_percentage&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Achievement Completion&quot;</span></span>
110<span class="line"><span class="token punctuation">}</span></span>
111<span class="line"></span></code></pre></div></li><li><strong>Response Example (Not In Game)</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
112<span class="line">  <span class="token property">&quot;status&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Online&quot;</span></span>
113<span class="line"><span class="token punctuation">}</span></span>
114<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> https://blogapi.pysio.online/steam_status</span>
115<span class="line"></span></code></pre></div></li></ul><h2 id="ip-query-endpoints" tabindex="-1"><a class="header-anchor" href="#ip-query-endpoints"><span>IP Query Endpoints</span></a></h2><h3 id="_1-ip-information-query" tabindex="-1"><a class="header-anchor" href="#_1-ip-information-query"><span>1. IP Information Query</span></a></h3><ul><li><strong>Request Path</strong>: <code>/ipcheck</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Query Parameters</strong>: <ul><li><code>ip</code>: IP address</li></ul></li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
116<span class="line">  <span class="token property">&quot;ip&quot;</span><span class="token operator">:</span> <span class="token string">&quot;IP Address&quot;</span><span class="token punctuation">,</span></span>
117<span class="line">  <span class="token property">&quot;hostname&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Hostname&quot;</span><span class="token punctuation">,</span></span>
118<span class="line">  <span class="token property">&quot;city&quot;</span><span class="token operator">:</span> <span class="token string">&quot;City&quot;</span><span class="token punctuation">,</span></span>
119<span class="line">  <span class="token property">&quot;region&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Region&quot;</span><span class="token punctuation">,</span></span>
120<span class="line">  <span class="token property">&quot;country&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Country&quot;</span><span class="token punctuation">,</span></span>
121<span class="line">  <span class="token property">&quot;loc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Location Coordinates&quot;</span><span class="token punctuation">,</span></span>
122<span class="line">  <span class="token property">&quot;org&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Organization&quot;</span><span class="token punctuation">,</span></span>
123<span class="line">  <span class="token property">&quot;postal&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Postal Code&quot;</span><span class="token punctuation">,</span></span>
124<span class="line">  <span class="token property">&quot;timezone&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Timezone&quot;</span></span>
125<span class="line"><span class="token punctuation">}</span></span>
126<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> <span class="token string">&quot;https://blogapi.pysio.online/ipcheck?ip=8.8.8.8&quot;</span></span>
127<span class="line"></span></code></pre></div></li></ul><h2 id="api-statistics-endpoints" tabindex="-1"><a class="header-anchor" href="#api-statistics-endpoints"><span>API Statistics Endpoints</span></a></h2><h3 id="_1-get-all-api-call-statistics" tabindex="-1"><a class="header-anchor" href="#_1-get-all-api-call-statistics"><span>1. Get All API Call Statistics</span></a></h3><ul><li><strong>Request Path</strong>: <code>/api_stats</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">[</span></span>
128<span class="line">  <span class="token punctuation">{</span></span>
129<span class="line">    <span class="token property">&quot;key&quot;</span><span class="token operator">:</span> <span class="token string">&quot;API Path&quot;</span><span class="token punctuation">,</span></span>
130<span class="line">    <span class="token property">&quot;count&quot;</span><span class="token operator">:</span> call_count<span class="token punctuation">,</span></span>
131<span class="line">    <span class="token property">&quot;lastUpdated&quot;</span><span class="token operator">:</span> <span class="token string">&quot;last call time&quot;</span></span>
132<span class="line">  <span class="token punctuation">}</span></span>
133<span class="line"><span class="token punctuation">]</span></span>
134<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> https://blogapi.pysio.online/api_stats</span>
135<span class="line"></span></code></pre></div></li></ul><h3 id="_2-get-specific-api-call-statistics" tabindex="-1"><a class="header-anchor" href="#_2-get-specific-api-call-statistics"><span>2. Get Specific API Call Statistics</span></a></h3><ul><li><strong>Request Path</strong>: <code>/api_stats/:key</code></li><li><strong>Request Method</strong>: GET</li><li><strong>Parameters</strong>: <ul><li><code>key</code>: API path</li></ul></li><li><strong>Response Format</strong>: application/json</li><li><strong>Response Example</strong>:<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
136<span class="line">  <span class="token pr
136operty">&quot;key&quot;</span><span class="token operator">:</span> <span class="token string">&quot;API Path&quot;</span><span class="token punctuation">,</span></span>
137<span class="line">  <span class="token property">&quot;count&quot;</span><span class="token operator">:</span> call_count<span class="token punctuation">,</span></span>
138<span class="line">  <span class="token property">&quot;lastUpdated&quot;</span><span class="token operator">:</span> <span class="token string">&quot;last call time&quot;</span></span>
139<span class="line"><span class="token punctuation">}</span></span>
140<span class="line"></span></code></pre></div>or<div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
141<span class="line">  <span class="token property">&quot;key&quot;</span><span class="token operator">:</span> <span class="token string">&quot;API Path&quot;</span><span class="token punctuation">,</span></span>
142<span class="line">  <span class="token property">&quot;count&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span></span>
143<span class="line">  <span class="token property">&quot;lastUpdated&quot;</span><span class="token operator">:</span> <span class="token null keyword">null</span></span>
144<span class="line"><span class="token punctuation">}</span></span>
145<span class="line"></span></code></pre></div></li><li><strong>Debug Example</strong>:<div class="language-bash" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">curl</span> https://blogapi.pysio.online/api_stats/random_image</span>
146<span class="line"></span></code></pre></div></li></ul><h2 id="error-handling" tabindex="-1"><a class="header-anchor" href="#error-handling"><span>Error Handling</span></a></h2><div class="hint-container warning"><p class="hint-container-title">Warning</p><p>Please ensure your application properly handles the following error responses:</p></div><h3 id="common-error-codes" tabindex="-1"><a class="header-anchor" href="#common-error-codes"><span>Common Error Codes</span></a></h3><table><thead><tr><th>Error Code</th><th>Description</th><th>Handling Suggestion</th></tr></thead><tbody><tr><td>401</td><td>Unauthorized</td><td>Check authentication token</td></tr><tr><td>403</td><td>Forbidden</td><td>Confirm permission level</td></tr><tr><td>404</td><td>Not Found</td><td>Verify request path</td></tr><tr><td>429</td><td>Too Many Requests</td><td>Implement rate limiting handling</td></tr><tr><td>500</td><td>Server Error</td><td>Contact administrator</td></tr></tbody></table><h3 id="_401-unauthorized" tabindex="-1"><a class="header-anchor" href="#_401-unauthorized"><span>401 Unauthorized</span></a></h3><div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
147<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Unauthorized&quot;</span></span>
148<span class="line"><span class="token punctuation">}</span></span>
149<span class="line"></span></code></pre></div><h3 id="_404-not-found" tabindex="-1"><a class="header-anchor" href="#_404-not-found"><span>404 Not Found</span></a></h3><div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
150<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Resource not found&quot;</span></span>
151<span class="line"><span class="token punctuation">}</span></span>
152<span class="line"></span></code></pre></div><h3 id="_500-server-error" tabindex="-1"><a class="header-anchor" href="#_500-server-error"><span>500 Server Error</span></a></h3><div class="language-json" data-highlighter="prismjs" data-ext="json"><pre><code class="language-json"><span class="line"><span class="token punctuation">{</span></span>
153<span class="line">  <span class="token property">&quot;error&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Internal server error&quot;</span></span>
154<span class="line"><span class="token punctuation">}</span></span>
155<span class="line"></span></code></pre></div><h2 id="best-practices" tabindex="-1"><a class="header-anchor" href="#best-practices"><span>Best Practices</span></a></h2><div class="hint-container tip"><p class="hint-container-title">Tips</p><ol><li>Implement request retry mechanisms</li><li>Use appropriate caching strategies</li><li>Monitor API call frequency</li><li>Implement error handling</li><li>Regularly check for API updates</li><li>Use batch upload tools for large image uploads</li><li>Follow redirect mechanisms for image access</li></ol></div><h2 id="performance-optimization" tabindex="-1"><a class="header-anchor" href="#performance-optimization"><span>Performance Optimization</span></a></h2><div class="hint-container note"><p class="hint-container-title">Note</p><ul><li>Images are served through Minio object storage with CDN acceleration</li><li>All images are automatically converted to WebP format</li><li>Supports concurrent uploads and resumable transfers</li><li>Image access uses redirect mechanism to reduce server load</li><li>Supports global accelerated access</li></ul></div><h2 id="issue-feedback" tabindex="-1"><a class="header-anchor" href="#issue-feedback"><span>Issue Feedback</span></a></h2><div class="hint-container tip"><p class="hint-container-title">Tips</p><p>If you encounter API-related issues, please provide feedback through:</p><ol><li>Submit GitHub Issues</li><li>Send email to administrator</li><li>Leave comments in blog comment section</li></ol></div>`,74)])])}const r=a(o,[["render",p]]),c=JSON.parse(`{"path":"/en/posts/develop/api.html","title":"Complete Blog API Documentation","lang":"en-US","frontmatter":{"title":"Complete Blog API Documentation","date":"2025-01-01T00:00:00.000Z","icon":"fa-solid fa-webhook","category":"develop","tag":["Services","API"],"description":"General Information Note All APIs have been deployed to production environment, please use the following base URL for access. Base URL API Collection You can also download the J...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Complete Blog API Documentation\\",\\"image\\":[\\"\\"],\\"datePublished\\":\\"2025-01-01T00:00:00.000Z\\",\\"dateModified\\":\\"2025-06-01T00:04:33.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"Pysio\\",\\"url\\":\\"https://github.com/pysio2007/\\"}]}"],["meta",{"property":"og:url","content":"https://www.pysio.online/en/posts/develop/api.html"}],["meta",{"property":"og:site_name","content":"Pysio's Home"}],["meta",{"property":"og:title","content":"Complete Blog API Documentation"}],["meta",{"property":"og:description","content":"General Information Note All APIs have been deployed to production environment, please use the following base URL for access. Base URL API Collection You can also download the J..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}
155],["meta",{"property":"og:updated_time","content":"2025-06-01T00:04:33.000Z"}],["meta",{"property":"article:tag","content":"API"}],["meta",{"property":"article:tag","content":"Services"}],["meta",{"property":"article:published_time","content":"2025-01-01T00:00:00.000Z"}],["meta",{"property":"article:modified_time","content":"2025-06-01T00:04:33.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://www.pysio.online/posts/develop/api.html"}],["meta",{"property":"article:published_time","content":"2025-01-01T00:00:00.000Z"}],["meta",{"name":"article:published_time","content":"2025-01-01T00:00:00.000Z"}],["meta",{"property":"article:tag","content":"Services"}],["meta",{"property":"article:tag","content":"API"}],["meta",{"property":"article:section","content":"develop"}],["meta",{"property":"og:title","content":"Complete Blog API Documentation"}],["meta",{"property":"og:url","content":"https://www.pysio.online/en/posts/develop/api.html"}],["meta",{"property":"og:description","content":"General Information Note All APIs have been deployed to production environment, please use the following base URL for access. Base URL API Collection You can also download the J..."}],["meta",{"name":"description","content":"General Information Note All APIs have been deployed to production environment, please use the following base URL for access. Base URL API Collection You can also download the J..."}],["meta",{"name":"twitter:title","content":"Complete Blog API Documentation"}],["meta",{"name":"twitter:description","content":"General Information Note All APIs have been deployed to production environment, please use the following base URL for access. Base URL API Collection You can also download the J..."}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"BlogPosting\\",\\"headline\\":\\"Complete Blog API Documentation\\",\\"author\\":{\\"@type\\":\\"Person\\",\\"name\\":\\"Pysio\\",\\"url\\":\\"https://github.com/pysio2007\\"},\\"publisher\\":{\\"@type\\":\\"Organization\\",\\"name\\":\\"Pysio's Home\\",\\"url\\":\\"https://www.pysio.online\\"},\\"url\\":\\"https://www.pysio.online/en/posts/develop/api.html\\",\\"datePublished\\":\\"2025-01-01T00:00:00.000Z\\",\\"dateModified\\":\\"2025-01-01T00:00:00.000Z\\",\\"description\\":\\"General Information Note All APIs have been deployed to production environment, please use the following base URL for access. Base URL API Collection You can also download the J...\\",\\"mainEntityOfPage\\":{\\"@type\\":\\"WebPage\\",\\"@id\\":\\"https://www.pysio.online/en/posts/develop/api.html\\"}}"],["link",{"rel":"canonical","href":"https://www.pysio.online/en/posts/develop/api.html"}],["link",{"rel":"alternate","type":"application/rss+xml","title":"Pysio's Home RSS Feed","href":"https://www.pysio.online/rss.xml"}],["meta",{"property":"og:title","content":"Complete Blog API Documentation"}],["meta",{"property":"og:description","content":"General Information Note All APIs have been deployed to production environment, please use the following base URL for access. Base URL API Collection You can also download the J..."}],["meta",{"property":"og:image","content":"https://www.pysio.online/og-images/completeblogapidocumentation.png"}],["meta",{"property":"og:url","content":"https://www.pysio.online/en/posts/develop/api.html"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:site_name","content":"Pysio's Home"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:title","content":"Complete Blog API Documentation"}],["meta",{"name":"twitter:description","content":"General Information Note All APIs have been deployed to production environment, please use the following base URL for access. Base URL API Collection You can also download the J..."}],["meta",{"name":"twitter:image","content":"https://www.pysio.online/og-images/completeblogapidocumentation.png"}],["link",{"rel":"alternate","type":"application/rss+xml","href":"https://www.pysio.online/en/rss.xml","title":"Pysio's Home RSS Feed"}]]}
155,"git":{"createdTime":1748736273000,"updatedTime":1748736273000,"contributors":[{"name":"pysio2007","username":"pysio2007","email":"[email protected]","commits":1,"url":"https://github.com/pysio2007"}]},"readingTime":{"minutes":3.72,"words":1117},"filePathRelative":"en/posts/develop/api.md","excerpt":"<h2>General Information</h2>\\n<div class=\\"hint-container note\\">\\n<p class=\\"hint-container-title\\">Note</p>\\n<p>All APIs have been deployed to production environment, please use the following base URL for access.</p>\\n</div>\\n<h3>Base URL</h3>\\n<div class=\\"language-text\\" data-highlighter=\\"prismjs\\" data-ext=\\"text\\"><pre><code class=\\"language-text\\"><span class=\\"line\\">https://blogapi.pysio.online</span>\\n<span class=\\"line\\"></span></code></pre>\\n</div>","autoDesc":true}`);export{r as comp,c as data};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.