← APIカタログ

MeterGate Test API

お試し

MeterGateが提供する、架空のデータを使ったお試し用のAPIです。

パス:/townsは5つの町を一覧にし、/towns/00001〜/towns/00005はそれぞれ1つの町を返します。/echoはサービスに届いた内容を示します。fault=500、fault=429、fault=abortを付けるとエラーを、delay_msを付けると遅れた応答を受け取れます。

無料

APIの継続利用契約、APIキー、呼び出しをお試しいただけます。他のAPIと同様にカードの登録が必要です。このAPIで料金が発生することはありません。

新規

呼び出し上限:30回/分

コンテンツを通報

APIの継続利用契約を開始

継続利用契約の申込みにはログインが必要です。

ログイン

技術情報

呼び出し先URL

https://metergate.dev/v1/metergate-test/

許可されたメソッド

GET, POST

入力スキーマ

{
  "type": "object",
  "properties": {
    "fault": {
      "type": "string",
      "enum": [
        "500",
        "429",
        "abort"
      ],
      "description": "Ask for an error."
    },
    "delay_ms": {
      "type": "integer",
      "minimum": 0,
      "maximum": 20000,
      "description": "Answer later by this many milliseconds."
    }
  }
}

出力スキーマ

{
  "type": "object",
  "properties": {
    "asked": {
      "type": "object"
    },
    "answer": {},
    "because": {
      "type": "string"
    }
  },
  "required": [
    "asked",
    "because"
  ]
}

応答例

{
  "asked": {
    "method": "GET",
    "path": "/towns/00001",
    "query": {}
  },
  "answer": {
    "code": "00001",
    "name": "Teststadt",
    "population": 12000,
    "neighbours": [
      "00002",
      "00003"
    ]
  },
  "because": "Town \"00001\" is in the fixed table. The same question always gets the same answer."
}