Proxy

URLフォワーディング機能に関するAPIです。proxy設定の登録後は以下のようにデバイスからプロキシ先のWebにアクセスすることができます。

  • to index.html: {API server domain}/proxy/{device_id}/{proxy_id}
  • to other/path: {API server domain}/proxy/{device_id}/{proxy_id}/other/path
  • with query: {API server domain}/proxy/{device_id}/{proxy_id}/other/path?query=text

関連機能: URLフォワーディング

GET Get All Proxy Configs

全てのURLフォワーディング設定を取得します。
GET https://api.legs.iij.jp/api/proxy?token=api-token

Parameters

type parameter require example description
query token yes api-token API Token

Response Body 200

show example

POST Create Proxy Configs

URLフォワーディング設定を作成します。
POST https://api.legs.iij.jp/api/proxy?token=api-token

Parameters

type parameter require example description
query token yes api-token API Token
    show example
	
	</span>
</div>
<div class="expand-content" style="display: none;">
    <div class="highlight"><pre style="color:#272822;background-color:#fafafa;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-javascript" data-lang="javascript"><span style="color:#111">{</span>

"url": "http://localhost:3000" }

Response Body 201

show example

PUT Create Proxy Configs

IDで指定したURLフォワーディング設定を更新します。
PUT https://api.legs.iij.jp/api/proxy/{proxy_id}?token=api-token

Parameters

type parameter require example description
path proxy_id yes xbxVxw8TH2Qcd475TbqSh3DqHEFy6RAZ configuration ID
query token yes api-token API Token
    show example
	
	</span>
</div>
<div class="expand-content" style="display: none;">
    <div class="highlight"><pre style="color:#272822;background-color:#fafafa;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-javascript" data-lang="javascript"><span style="color:#111">{</span>

"url": "http://localhost:5000" }

Response Body 200

show example

DELETE Create Proxy Configs

IDで指定したURLフォワーディング設定を削除します。
DELETE https://api.legs.iij.jp/api/proxy/{proxy_id}?token=api-token

Parameters

type parameter require example description
path proxy_id yes xbxVxw8TH2Qcd475TbqSh3DqHEFy6RAZ configuration ID
query token yes api-token API Token