API reference
API gateway
Routes to customer APIs and publishing them to consumers.
Generated from the public API contract (OpenAPI). Descriptions in the contract are written in Japanese.
Endpoints
Section titled “Endpoints”invokeRouteGet
Section titled “invokeRouteGet”GET/v1/gateway/invoke/{route}/{path}
Route の methods に GET があるときだけ転送する
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
route |
path | string | yes | Route の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。/ を含めてよく、%2F に符号化しても / として扱う。符号化した \ と . 、空の区切り、. ・ .. の区切りは拒否する |
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
invokeRoutePost
Section titled “invokeRoutePost”POST/v1/gateway/invoke/{route}/{path}
Route の methods に POST があるときだけ転送する
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
route |
path | string | yes | Route の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。/ を含めてよく、%2F に符号化しても / として扱う。符号化した \ と . 、空の区切り、. ・ .. の区切りは拒否する |
Request body
Section titled “Request body”*/*
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
invokeRoutePut
Section titled “invokeRoutePut”PUT/v1/gateway/invoke/{route}/{path}
Route の methods に PUT があるときだけ転送する
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
route |
path | string | yes | Route の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。/ を含めてよく、%2F に符号化しても / として扱う。符号化した \ と . 、空の区切り、. ・ .. の区切りは拒否する |
Request body
Section titled “Request body”*/*
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
invokeRoutePatch
Section titled “invokeRoutePatch”PATCH/v1/gateway/invoke/{route}/{path}
Route の methods に PATCH があるときだけ転送する
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
route |
path | string | yes | Route の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。/ を含めてよく、%2F に符号化しても / として扱う。符号化した \ と . 、空の区切り、. ・ .. の区切りは拒否する |
Request body
Section titled “Request body”*/*
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
invokeRouteDelete
Section titled “invokeRouteDelete”DELETE/v1/gateway/invoke/{route}/{path}
Route の methods に DELETE があるときだけ転送する
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
route |
path | string | yes | Route の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。/ を含めてよく、%2F に符号化しても / として扱う。符号化した \ と . 、空の区切り、. ・ .. の区切りは拒否する |
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
callPublishedApiGet
Section titled “callPublishedApiGet”GET/v1/gateway/published/{api}/{path}
Consumer の API キーで呼ぶ。Consumer に許した PublishedApi で、Route の methods に GET があるときだけ転送する。転送先には x-hane-consumer で Consumer の名前を渡す。公開していない API も、許していない API も同じ 404 を返す
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
api |
path | string | yes | PublishedApi の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。扱いは Route の呼出しと同じ |
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
callPublishedApiPost
Section titled “callPublishedApiPost”POST/v1/gateway/published/{api}/{path}
Consumer の API キーで呼ぶ。Consumer に許した PublishedApi で、Route の methods に POST があるときだけ転送する。転送先には x-hane-consumer で Consumer の名前を渡す。公開していない API も、許していない API も同じ 404 を返す
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
api |
path | string | yes | PublishedApi の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。扱いは Route の呼出しと同じ |
Request body
Section titled “Request body”*/*
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
callPublishedApiPut
Section titled “callPublishedApiPut”PUT/v1/gateway/published/{api}/{path}
Consumer の API キーで呼ぶ。Consumer に許した PublishedApi で、Route の methods に PUT があるときだけ転送する。転送先には x-hane-consumer で Consumer の名前を渡す。公開していない API も、許していない API も同じ 404 を返す
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
api |
path | string | yes | PublishedApi の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。扱いは Route の呼出しと同じ |
Request body
Section titled “Request body”*/*
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
callPublishedApiPatch
Section titled “callPublishedApiPatch”PATCH/v1/gateway/published/{api}/{path}
Consumer の API キーで呼ぶ。Consumer に許した PublishedApi で、Route の methods に PATCH があるときだけ転送する。転送先には x-hane-consumer で Consumer の名前を渡す。公開していない API も、許していない API も同じ 404 を返す
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
api |
path | string | yes | PublishedApi の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。扱いは Route の呼出しと同じ |
Request body
Section titled “Request body”*/*
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
callPublishedApiDelete
Section titled “callPublishedApiDelete”DELETE/v1/gateway/published/{api}/{path}
Consumer の API キーで呼ぶ。Consumer に許した PublishedApi で、Route の methods に DELETE があるときだけ転送する。転送先には x-hane-consumer で Consumer の名前を渡す。公開していない API も、許していない API も同じ 404 を返す
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
api |
path | string | yes | PublishedApi の名前 |
path |
path | string | yes | 転送先で Route の path の後ろに付けるパス。扱いは Route の呼出しと同じ |
Responses
Section titled “Responses”- 200 —
object: 転送先の応答(状態コードと本文はそのまま返す) - default —
Problem: RFC 9457 Problem Details
listPublishedApis
Section titled “listPublishedApis”GET/v1/gateway/apis
有効な ReleaseBundle で公開している API。gateway:read が必要
Responses
Section titled “Responses”- 200 —
object: 公開している API - default —
Problem: RFC 9457 Problem Details
listToolExposures
Section titled “listToolExposures”GET/v1/gateway/tool-exposures
有効な ReleaseBundle で Agent のツールにしている PublishedApi の操作。審査の記録は ReleaseBundle の審査に残る。gateway:read が必要
Responses
Section titled “Responses”- 200 —
object: Agent のツールにしている操作 - default —
Problem: RFC 9457 Problem Details
listConsumers
Section titled “listConsumers”GET/v1/gateway/consumers
この環境に apply してある Consumer と API キー。gateway:read が必要
Responses
Section titled “Responses”- 200 —
object: Consumer - default —
Problem: RFC 9457 Problem Details
createConsumerKey
Section titled “createConsumerKey”POST/v1/gateway/consumers/{name}/keys
Idempotency-Key は要らない。secret を保存しないので、同じキーで送っても再送せず、別の API キーを発行する
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes |
Request body
Section titled “Request body”application/json
| Name | Type | Required | Description |
|---|---|---|---|
expires_at |
string | この時刻から先は入口が拒否する。省くと期限を付けない。今より後の時刻にする |
Responses
Section titled “Responses”- 201 —
object: 発行した API キー - default —
Problem: RFC 9457 Problem Details
revokeConsumerKey
Section titled “revokeConsumerKey”DELETE/v1/gateway/consumers/{name}/keys/{keyId}
Consumer の API キーを失効する。次の要求から拒否する。gateway:consumers.manage が必要
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
name |
path | string | yes | |
keyId |
path | string | yes |
Responses
Section titled “Responses”- 200 —
ConsumerKey: 失効した API キー - default —
Problem: RFC 9457 Problem Details
listApiCalls
Section titled “listApiCalls”GET/v1/gateway/calls
転送した PublishedApi の呼出しと、Agent が ToolExposure で呼んだ操作の記録(新しい順、プロジェクトごとに直近の 1000 件)。本文は含まない。gateway:read が必要
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
consumer |
query | string | この Consumer の呼出しだけを返す。Agent は agent:<名前> | |
limit |
query | integer | 返す数。省くと 100、上限は 500 |
Responses
Section titled “Responses”- 200 —
object: 呼出しの記録 - default —
Problem: RFC 9457 Problem Details