获取一个 API 版本
API 版本 2026-10-affable-towhee
get https://api.getlingara.com/v1/versions/{id}
返回一个 API 版本,包括其完整的 history、summary(英文)和 spec。只有在请求时将 Lingara-Version 标头设为其 id,spec.url 处的文档才是该版本的文档。spec.sha256 是其冻结文档的哈希值,版本仍在开发中时为 null。未知的 id 返回 404。无需令牌。响应可缓存一小时。
权限范围 无需身份验证
参数
Lingara-Versionheaderstring可选- 回应此请求所用的 API 版本。不提供时,访问令牌使用其客户端绑定的版本,不带令牌的请求使用当前版本。仍在开发中的版本只能通过在此指定来访问。未知版本会以
400回应,代码为api_version_unknown。GET /v1/versions会列出所有版本。 idpathstring必填
响应
200 API 版本
idstring必填stateVersionState必填ltsboolean必填minted_atstring必填sunset_atstring | null必填summarystring | null必填historyarray of VersionHistoryEntry必填stateVersionState必填atstring必填
specVersionSpec必填urlstring必填sha256string | null必填
asyncapiVersionSpec必填urlstring必填sha256string | null必填
错误
410application/json- 回应此请求所用的 API 版本已停用。请在
Lingara-Version中发送一个受支持的版本,或将客户端绑定到其他版本。 4XXapplication/json- 请求被拒绝。
code说明原因,error用文字描述原因。 503application/json · text/plain- 服务暂时不可用;请在
Retry-After所示的秒数之后重试。维护期间,响应体为纯文本,而不是错误信封。 5XXapplication/json- 请求被拒绝。
code说明原因,error用文字描述原因。
codestring必填请求被拒绝的原因,以稳定的代码表示,可据此进行分支处理:例如
insufficient_scope(403)、rate_limited(429),以及按用量计费的客户端的spend_cap_reached(402)和metered_billing_inactive(402)。errorstring必填
示例
如译文与英文参考文档不一致,以英文参考文档为准。