仕様書の目次(アウトライン)取得
GET
/spec/{document_type}
const url = 'https://api.plateauview.mlit.go.jp/spec/standard?depth=2&format=json';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.plateauview.mlit.go.jp/spec/standard?depth=2&format=json'指定した文書の章・節の階層構造とパスを取得します。得られたパスは /spec/{document_type}/{path} に渡して本文取得に使用します。
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” document_type
required
string
対象文書。standard(標準製品仕様書) / procedure(標準作業手順書)
Query Parameters
Section titled “Query Parameters ” depth
integer
取得する階層の深さ。1=章のみ、2=章+節。既定: 2、最大: 4
chapter
string
特定の章のみ取得する場合に指定。例: toc4
format
string
出力形式。既定: json
Responses
Section titled “ Responses ”成功時のレスポンス。format=json は目次項目の配列、format=markdown は Markdown テキスト。
Array<object>
仕様書の目次項目(再帰的)
object
id
string
title
string
path
/spec/read で本文取得に使うパス
string
children
Array<object> recursive
Example generated
[ { "id": "example", "title": "example", "path": "example", "children": [ {} ] }]string
文書種別が不正
Media type application/json
object
error
required
エラーメッセージ
string
url
エラーが発生したURL
string
reason
エラーの原因
string
Example generated
{ "error": "example", "url": "example", "reason": "example"}目次の取得に失敗
Media type application/json
object
error
required
エラーメッセージ
string
url
エラーが発生したURL
string
reason
エラーの原因
string
Example generated
{ "error": "example", "url": "example", "reason": "example"}
© 2026
Project PLATEAU