ileap
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseiLEAP Technical Specifications
iLEAP技术规范
iLEAP extends the PACT Data Exchange Protocol with logistics emissions
data types conforming to ISO 14083 and the GLEC Framework v3.1.
iLEAP扩展了PACT数据交换协议,新增了符合ISO 14083和GLEC Framework v3.1的物流排放数据类型。
Implementation Order
实现顺序
- PACT base: Authentication (OpenID discovery + OAuth2 Client
Credentials), ,
GET /2/footprints,GET /2/footprints/{id}. SeePOST /2/events.references/pact-implementation-guide.md - iLEAP extensions: Embed ShipmentFootprint, TOC, HOC as
s in ProductFootprints.
DataModelExtension - TAD endpoint: with filtering and pagination.
GET /2/ileap/tad - Conformance: Run ACT against your server.
- PACT基础层:认证(OpenID发现 + OAuth2客户端凭证)、、
GET /2/footprints、GET /2/footprints/{id}。详见POST /2/events。references/pact-implementation-guide.md - iLEAP扩展:在ProductFootprint中嵌入ShipmentFootprint、TOC、HOC作为。
DataModelExtension - TAD端点:实现带过滤和分页功能的。
GET /2/ileap/tad - 一致性验证:使用ACT工具对服务器进行测试。
Architecture Overview
架构概述
Roles
角色
| Role | Description |
|---|---|
| Transport Service User | Purchases transport (e.g., shipper) |
| Transport Service Organizer | Provides transport, subcontracts operations (e.g., LSP) |
| Transport Operator | Carries out transport (e.g., carrier) |
| 角色 | 描述 |
|---|---|
| 运输服务用户 | 采购运输服务(如货主) |
| 运输服务组织者 | 提供运输服务,可转包运营(如物流服务提供商LSP) |
| 运输运营商 | 执行运输任务(如承运人) |
Key invariant
核心规则
All numeric values are -- JSON strings matching
. Never use JSON numbers for iLEAP numeric fields.
Decimal^-?\d+(\.\d+)?$所有数值类型均为——即匹配正则的JSON字符串。iLEAP数值字段绝不能使用JSON数字类型。
Decimal^-?\d+(\.\d+)?$Data Transactions
数据交易
| DT | Data type | Provider | Consumer | Endpoint |
|---|---|---|---|---|
| DT#1 | ShipmentFootprint (TCEs) | Operator/Organizer | Service User | |
| DT#2 | TOC or HOC | Operator/Organizer | Organizer/User | |
| DT#3 | TAD | Operator | Organizer/User | |
- DT#1: TCE-level emissions for a single shipment, wrapped in a ShipmentFootprint
- DT#2: Emission intensity data at TOC (transport) or HOC (hub) cluster level
- DT#3: Raw activity data (distance, mass, energy) for parties that cannot yet calculate emissions
| 交易编号 | 数据类型 | 提供方 | 消费方 | 端点 |
|---|---|---|---|---|
| DT#1 | ShipmentFootprint(含TCE) | 运营商/组织者 | 服务用户 | |
| DT#2 | TOC或HOC | 运营商/组织者 | 组织者/用户 | |
| DT#3 | TAD | 运营商 | 组织者/用户 | |
- DT#1:单个运输订单的TCE层级排放数据,封装在ShipmentFootprint中
- DT#2:运输集群(TOC)或枢纽集群(HOC)层级的排放强度数据
- DT#3:无法自行计算排放的主体所需的原始活动数据(距离、重量、能耗)
Data Model Quick Reference
数据模型速查
ShipmentFootprint
ShipmentFootprint
| Property | Type | Req | Description |
|---|---|---|---|
| Decimal | M | Freight mass in kg |
| Decimal | O | Freight volume in CBM |
| String | M | Shipment identifier |
| TCE[] | M | Non-empty array of TCEs |
| 属性 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Decimal | 是 | 货物重量(单位:千克) |
| Decimal | 否 | 货物体积(单位:立方米) |
| String | 是 | 运输订单标识符 |
| TCE[] | 是 | 非空TCE数组 |
TCE (Transport Chain Element)
TCE(运输链元素)
| Property | Type | Req | Description |
|---|---|---|---|
| String | M | Unique TCE id |
| String[] | O | IDs of preceding TCEs (ordering) |
| String | M* | TOC id (*one of tocId/hocId required) |
| String | M* | HOC id (*one of tocId/hocId required) |
| String | M | Shipment id |
| Decimal | M | Freight mass in kg |
| GLECDistance | M | Origin-destination distance |
| Decimal | M | Transport activity in tkm |
| Decimal | M | WTW GHG emissions in kgCO2e |
| Decimal | M | TTW GHG emissions in kgCO2e |
| 属性 | 类型 | 必填 | 描述 |
|---|---|---|---|
| String | 是 | 唯一TCE标识符 |
| String[] | 否 | 前置TCE的ID(用于排序) |
| String | 是* | TOC的ID(*tocId/hocId二选一必填) |
| String | 是* | HOC的ID(*tocId/hocId二选一必填) |
| String | 是 | 运输订单ID |
| Decimal | 是 | 货物重量(单位:千克) |
| GLECDistance | 是 | 起运地到目的地的距离 |
| Decimal | 是 | 运输活动量(单位:吨公里) |
| Decimal | 是 | 全生命周期(WTW)温室气体排放量(单位:千克CO₂当量) |
| Decimal | 是 | 油箱到车轮(TTW)温室气体排放量(单位:千克CO₂当量) |
TOC (Transport Operation Category)
TOC(运输作业类别)
| Property | Type | Req | Description |
|---|---|---|---|
| String | M | Unique TOC id |
| TransportMode | M | Transport mode |
| EnergyCarrier[] | M | Energy carriers (shares must sum to 1) |
| Decimal | M | WTW intensity per transportActivityUnit |
| Decimal | M | TTW intensity per transportActivityUnit |
| String | M | |
| 属性 | 类型 | 必填 | 描述 |
|---|---|---|---|
| String | 是 | 唯一TOC标识符 |
| TransportMode | 是 | 运输方式 |
| EnergyCarrier[] | 是 | 能源载体(占比总和必须为1) |
| Decimal | 是 | 全生命周期(WTW)排放强度(每运输活动单位) |
| Decimal | 是 | 油箱到车轮(TTW)排放强度(每运输活动单位) |
| String | 是 | |
HOC (Hub Operation Category)
HOC(枢纽作业类别)
| Property | Type | Req | Description |
|---|---|---|---|
| String | M | Unique HOC id |
| HubType | M | Hub type |
| EnergyCarrier[] | M | Energy carriers (shares must sum to 1) |
| Decimal | M | WTW intensity per hubActivityUnit |
| Decimal | M | TTW intensity per hubActivityUnit |
| String | M | |
| 属性 | 类型 | 必填 | 描述 |
|---|---|---|---|
| String | 是 | 唯一HOC标识符 |
| HubType | 是 | 枢纽类型 |
| EnergyCarrier[] | 是 | 能源载体(占比总和必须为1) |
| Decimal | 是 | 全生命周期(WTW)排放强度(每枢纽活动单位) |
| Decimal | 是 | 油箱到车轮(TTW)排放强度(每枢纽活动单位) |
| String | 是 | |
TAD (Transport Activity Data)
TAD(运输活动数据)
| Property | Type | Req | Description |
|---|---|---|---|
| String | M | Unique activity id |
| String[] | M | Consignment identifiers |
| GLECDistance | M | Origin-destination distance |
| Location | M | Origin location |
| Location | M | Destination location |
| DateTime | M | ISO 8601 UTC departure |
| DateTime | M | ISO 8601 UTC arrival |
| TransportMode | M | Transport mode |
| 属性 | 类型 | 必填 | 描述 |
|---|---|---|---|
| String | 是 | 唯一活动标识符 |
| String[] | 是 | 托运货物标识符 |
| GLECDistance | 是 | 起运地到目的地的距离 |
| Location | 是 | 起运地 |
| Location | 是 | 目的地 |
| DateTime | 是 | ISO 8601格式的UTC出发时间 |
| DateTime | 是 | ISO 8601格式的UTC到达时间 |
| TransportMode | 是 | 运输方式 |
Enum values
枚举值
- TransportMode: ,
Road,Rail,Air,SeaInlandWaterway - HubType: ,
Transshipment,StorageAndTransshipment,Warehouse,LiquidBulkTerminalMaritimeContainerTerminal - EnergyCarrierType: ,
Diesel,HVO,Petrol,CNG,LNG,LPG,HFO,MGO,Aviation fuel,Hydrogen,MethanolElectric - PackagingOrTrEqType: ,
Box,Pallet,Container-TEU,Container-FEUContainer - Feedstock: ,
Fossil,Natural gas,Grid,Renewable electricityCooking oil
- TransportMode:(公路)、
Road(铁路)、Rail(航空)、Air(海运)、Sea(内河航运)InlandWaterway - HubType:(转运枢纽)、
Transshipment(仓储转运枢纽)、StorageAndTransshipment(仓库)、Warehouse(液体散货码头)、LiquidBulkTerminal(海运集装箱码头)MaritimeContainerTerminal - EnergyCarrierType:(柴油)、
Diesel(氢化植物油)、HVO(汽油)、Petrol(压缩天然气)、CNG(液化天然气)、LNG(液化石油气)、LPG(重燃料油)、HFO(船用柴油)、MGO(航空燃油)、Aviation fuel(氢气)、Hydrogen(甲醇)、Methanol(电力)Electric - PackagingOrTrEqType:(箱)、
Box(托盘)、Pallet(20英尺标准箱)、Container-TEU(40英尺标准箱)、Container-FEU(集装箱)Container - Feedstock:(化石燃料)、
Fossil(天然气)、Natural gas(电网电力)、Grid(可再生电力)、Renewable electricity(餐厨油)Cooking oil
JSON schemas
JSON模式文件
Located at :
references/ileap-data-model/schemas/- ,
shipment-footprint.json,toc.json,hoc.jsontad.json - ,
pcf-shipment-footprint.json,pcf-toc.json,pcf-hoc.jsonpcf-tad.json
位于目录下:
references/ileap-data-model/schemas/- 、
shipment-footprint.json、toc.json、hoc.jsontad.json - 、
pcf-shipment-footprint.json、pcf-toc.json、pcf-hoc.jsonpcf-tad.json
PACT Integration Rules
PACT集成规则
These are the most error-prone mappings when embedding iLEAP data into
PACT ProductFootprints.
以下是将iLEAP数据嵌入PACT ProductFootprint时最容易出错的映射规则。
Common rules (all iLEAP types)
通用规则(所有iLEAP类型)
- : MUST always be
productCategoryCpc"83117" - : MUST be
packagingEmissionsIncludedfalse - : SHOULD be
biogenicCarbonContent"0" - : MUST be
extensions[].specVersion"2.0.0" - One iLEAP extension per ProductFootprint (cannot mix SF + TOC etc.)
- :必须始终设为
productCategoryCpc"83117" - :必须设为
packagingEmissionsIncludedfalse - :建议设为
biogenicCarbonContent"0" - :必须设为
extensions[].specVersion"2.0.0" - 每个ProductFootprint仅能包含一个iLEAP扩展(不能混合SF + TOC等类型)
Per-type mapping
按类型映射规则
| Field | ShipmentFootprint | TOC | HOC |
|---|---|---|---|
| | | |
| | | |
| | | |
| | | |
| | | |
| 字段 | ShipmentFootprint | TOC | HOC |
|---|---|---|---|
| | | |
| | | |
| | | |
| | | |
| | | |
productIds URN format
productIds的URN格式
urn:pathfinder:product:customcode:vendor-assigned:{type}:{id}
urn:pathfinder:product:customcode:buyer-assigned:{type}:{id}Where is , , or .
{type}shipmenttochocurn:pathfinder:product:customcode:vendor-assigned:{type}:{id}
urn:pathfinder:product:customcode:buyer-assigned:{type}:{id}其中为、或。
{type}shipmenttochocdataSchema URLs
dataSchema URL
| Type | URL |
|---|---|
| ShipmentFootprint | |
| TOC | |
| HOC | |
See for complete annotated
JSON examples of each type.
references/pact-integration-examples.md| 类型 | URL |
|---|---|
| ShipmentFootprint | |
| TOC | |
| HOC | |
完整的带注释JSON示例请参考。
references/pact-integration-examples.mdHTTP API
HTTP API
Authentication
认证流程
- Discover token endpoint:
GET /.well-known/openid-configuration - Obtain token: with Basic Auth +
POST /auth/tokengrant_type=client_credentials - Use token: on all API calls
Authorization: Bearer {token}
See for the full auth
contract including request/response formats.
references/pact-implementation-guide.md- 发现令牌端点:
GET /.well-known/openid-configuration - 获取令牌:使用Basic认证调用,参数
POST /auth/tokengrant_type=client_credentials - 使用令牌:在所有API请求中添加头
Authorization: Bearer {token}
完整的认证契约(含请求/响应格式)请参考。
references/pact-implementation-guide.mdPACT endpoints
PACT端点
| Method | Path | Description |
|---|---|---|
| | List ProductFootprints (with iLEAP extensions) |
| | Get single ProductFootprint |
| | Async event notifications |
Supports query parameter (OData v4 subset) and
pagination with header.
$filterlimitLink| 方法 | 路径 | 描述 |
|---|---|---|
| | 列出ProductFootprint(含iLEAP扩展) |
| | 获取单个ProductFootprint |
| | 异步事件通知 |
支持查询参数(OData v4子集)和分页,分页信息通过头返回。
$filterlimitLinkiLEAP endpoint
iLEAP端点
GET /2/ileap/tad?[filter params]&limit={n}- Filtering: query parameters as key-value pairs (e.g., )
?mode=Road - Pagination: param +
limitheaderLink: <url>; rel="next" - Response:
{ "data": [TAD, ...] }
GET /2/ileap/tad?[filter params]&limit={n}- 过滤:使用键值对形式的查询参数(如)
?mode=Road - 分页:通过参数 +
limit头实现Link: <url>; rel="next" - 响应格式:
{ "data": [TAD, ...] }
Error codes
错误码
| Code | HTTP Status | Description |
|---|---|---|
| 403 | Invalid or missing token |
| 401 | Expired access token |
| 400 | Malformed request |
| 404 | Footprint ID not found |
| 400 | Unsupported filter or feature |
See for error code gotchas (e.g.,
is HTTP 400 not 501).
references/known-issues.mdNotImplemented| 代码 | HTTP状态码 | 描述 |
|---|---|---|
| 403 | 令牌无效或缺失 |
| 401 | 访问令牌已过期 |
| 400 | 请求格式错误 |
| 404 | 未找到指定ID的Footprint |
| 400 | 不支持的过滤条件或功能 |
错误码的注意事项请参考(例如对应HTTP 400而非501)。
references/known-issues.mdNotImplementedConformance Testing & ACT
一致性测试与ACT工具
Conformance levels
一致性等级
- Emissions Data Conformance: DT#1 + DT#2 (ShipmentFootprint, TOC, HOC via )
/2/footprints - Activity Data Conformance: DT#3 (TAD via )
/2/ileap/tad
- 排放数据一致性:支持DT#1 + DT#2(通过提供ShipmentFootprint、TOC、HOC)
/2/footprints - 活动数据一致性:支持DT#3(通过提供TAD)
/2/ileap/tad
Test cases
测试用例
| TC | Description | Endpoint | Expected |
|---|---|---|---|
| TC001 | Get ProductFootprint with ShipmentFootprint | | 200 + valid SF extension |
| TC002 | Get ProductFootprint with TOC | | 200 + valid TOC extension |
| TC003 | Get ProductFootprint with HOC | | 200 + valid HOC extension |
| TC004 | Get all TransportActivityData | | 200 + valid TAD list |
| TC005 | Get filtered TAD | | 200 + filtered results |
| TC006 | Get limited TAD | | 200 + max 1 result |
| TC007 | TAD with invalid token | | 403 AccessDenied |
| TC008 | TAD with expired token | | 401 TokenExpired |
TC008 note: TC008 requires the server to issue short-lived tokens so ACT can wait for expiry. Most test servers skip this by issuing long-lived tokens — TC008 will then time out or fail.
| 测试用例编号 | 描述 | 端点 | 预期结果 |
|---|---|---|---|
| TC001 | 获取包含ShipmentFootprint的ProductFootprint | | 200响应 + 有效的SF扩展 |
| TC002 | 获取包含TOC的ProductFootprint | | 200响应 + 有效的TOC扩展 |
| TC003 | 获取包含HOC的ProductFootprint | | 200响应 + 有效的HOC扩展 |
| TC004 | 获取所有运输活动数据 | | 200响应 + 有效的TAD列表 |
| TC005 | 获取过滤后的TAD | | 200响应 + 过滤后的结果 |
| TC006 | 获取指定数量的TAD | | 200响应 + 最多1条结果 |
| TC007 | 使用无效令牌请求TAD | | 403响应,错误码 |
| TC008 | 使用过期令牌请求TAD | | 401响应,错误码 |
TC008说明:TC008要求服务器签发短生命周期令牌,以便ACT工具等待令牌过期。大多数测试服务器会签发长生命周期令牌,此时TC008会超时或失败。
ACT (Automated Conformance Testing)
ACT(自动化一致性测试工具)
- Web UI: https://act.sine.dev
- CLI: -- downloads and runs binary for current architecture (arm64/x86_64)
references/act/act.sh
sh
undefined- Web界面:https://act.sine.dev
- 命令行工具:—— 自动下载并运行对应架构(arm64/x86_64)的二进制文件
references/act/act.sh
sh
undefinedRun against demo API
针对演示API运行测试
curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |
bash -s -- test -b "https://api.ileap.sine.dev" -u "hello" -p "pathfinder"
bash -s -- test -b "https://api.ileap.sine.dev" -u "hello" -p "pathfinder"
```shcurl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |
bash -s -- test -b "https://api.ileap.sine.dev" -u "hello" -p "pathfinder"
bash -s -- test -b "https://api.ileap.sine.dev" -u "hello" -p "pathfinder"
```shRun against your own API
针对自有API运行测试
curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |
bash -s -- test -b "<your-url>" -u "<user>" -p "<password>"
bash -s -- test -b "<your-url>" -u "<user>" -p "<password>"
**GitHub Actions integration**:
```yaml
act_test:
name: ACT Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run ACT
run: |
set -o pipefail
curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |\
bash -s -- test \
-b "${{ secrets.API_URL }}" \
-u "${{ secrets.ACT_USER }}" \
-p "${{ secrets.ACT_PASSWORD }}"Important ACT constraints:
- PACT tests require a publicly reachable server — ACT delegates PACT tests to an external service that must reach the API over the internet
- No iLEAP-only flag — ACT always runs both PACT and iLEAP test suites
- PACT TC8 and TC18 are known failures even on the SINE reference API
()
api.ileap.sine.dev
See for full CLI options and coverage details.
references/act/README.mdcurl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |
bash -s -- test -b "<your-url>" -u "<user>" -p "<password>"
bash -s -- test -b "<your-url>" -u "<user>" -p "<password>"
**GitHub Actions集成**:
```yaml
act_test:
name: ACT Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run ACT
run: |
set -o pipefail
curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |\
bash -s -- test \
-b "${{ secrets.API_URL }}" \
-u "${{ secrets.ACT_USER }}" \
-p "${{ secrets.ACT_PASSWORD }}"ACT工具重要限制:
- PACT测试要求服务器可公开访问——ACT会将PACT测试委托给外部服务,该服务需要通过互联网访问API
- 无单独的iLEAP测试开关——ACT始终同时运行PACT和iLEAP测试套件
- 即使在SINE参考API()上,PACT的TC8和TC18测试用例也会失败
api.ileap.sine.dev
完整的CLI选项和测试覆盖范围请参考。
references/act/README.mdCertification
认证
SFC Certification Scheme extension for iLEAP Tool Providers
SFC认证计划针对iLEAP工具提供商的扩展规则
- Eligibility: must be SFC Certified + implemented DT#1 and DT#2
- Testing: ACT runs both PACT tests and iLEAP-specific tests
- Mandatory: DT#1 and DT#2 tests must pass
- Optional: DT#3 tests (recommended)
- Remediation: up to 3 attempts at 2-week intervals
- Validity: matches SFC Certification validity period
See for full certification process details.
references/pilot-certification.md- 资格要求:必须已获得SFC认证,且已实现DT#1和DT#2
- 测试要求:ACT工具需同时运行PACT测试和iLEAP专属测试
- 强制通过:DT#1和DT#2的测试用例必须通过
- 可选测试:DT#3的测试用例(推荐执行)
- 整改机制:最多可尝试3次,每次间隔2周
- 有效期:与SFC认证有效期一致
完整的认证流程请参考。
references/pilot-certification.mdVerification with SINE Demo API
使用SINE演示API进行验证
The SINE Foundation hosts a public iLEAP-conformant server for testing.
SINE基金会运营一个符合iLEAP规范的公开服务器,用于测试。
Base URL
基础URL
Credentials
凭证
| client_id | client_secret | Scope |
|---|---|---|
| | Global access to all data |
| | ShipmentFootprints + TAD |
| | TOCs + HOCs + TAD |
| client_id | client_secret | 权限范围 |
|---|---|---|
| | 全局访问所有数据 |
| | 访问ShipmentFootprints + TAD |
| | 访问TOCs + HOCs + TAD |
Step-by-step verification
分步验证指南
sh
undefinedsh
undefined1. Discover OpenID configuration
1. 发现OpenID配置
curl -s https://api.ileap.sine.dev/.well-known/openid-configuration | jq .
curl -s https://api.ileap.sine.dev/.well-known/openid-configuration | jq .
2. Obtain access token
2. 获取访问令牌
TOKEN=$(curl -s -X POST https://api.ileap.sine.dev/auth/token
-u "hello:pathfinder"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials" | jq -r .access_token)
-u "hello:pathfinder"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials" | jq -r .access_token)
TOKEN=$(curl -s -X POST https://api.ileap.sine.dev/auth/token
-u "hello:pathfinder"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials" | jq -r .access_token)
-u "hello:pathfinder"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials" | jq -r .access_token)
3. List all footprints
3. 列出所有Footprint
curl -s https://api.ileap.sine.dev/2/footprints
-H "Authorization: Bearer $TOKEN" | jq .
-H "Authorization: Bearer $TOKEN" | jq .
curl -s https://api.ileap.sine.dev/2/footprints
-H "Authorization: Bearer $TOKEN" | jq .
-H "Authorization: Bearer $TOKEN" | jq .
4. Get a specific footprint by ID
4. 根据ID获取指定Footprint
curl -s https://api.ileap.sine.dev/2/footprints/91715e5e-fd0b-4d1c-8fab-76290c46e6ed
-H "Authorization: Bearer $TOKEN" | jq .
-H "Authorization: Bearer $TOKEN" | jq .
curl -s https://api.ileap.sine.dev/2/footprints/91715e5e-fd0b-4d1c-8fab-76290c46e6ed
-H "Authorization: Bearer $TOKEN" | jq .
-H "Authorization: Bearer $TOKEN" | jq .
5. List transport activity data
5. 列出运输活动数据
curl -s https://api.ileap.sine.dev/2/ileap/tad
-H "Authorization: Bearer $TOKEN" | jq .
-H "Authorization: Bearer $TOKEN" | jq .
curl -s https://api.ileap.sine.dev/2/ileap/tad
-H "Authorization: Bearer $TOKEN" | jq .
-H "Authorization: Bearer $TOKEN" | jq .
6. Filter TAD by transport mode
6. 按运输方式过滤TAD
curl -s "https://api.ileap.sine.dev/2/ileap/tad?mode=Road"
-H "Authorization: Bearer $TOKEN" | jq .
-H "Authorization: Bearer $TOKEN" | jq .
undefinedcurl -s "https://api.ileap.sine.dev/2/ileap/tad?mode=Road"
-H "Authorization: Bearer $TOKEN" | jq .
-H "Authorization: Bearer $TOKEN" | jq .
undefinedNavigating the Specs
规范文档导航
iLEAP spec
iLEAP规范
The normative iLEAP spec is at
(Bikeshed format, 3291 lines).
references/ileap-extension/specs/index.bs| Section | Topic | Lines |
|---|---|---|
| Overview, PACT interop | 23-120 |
| ISO14083 and auxiliary terms | 125-237 |
| Business cases 1-3 | 239-312 |
| Data transactions DT#1-DT#3 | 315-387 |
| Data types (SF, TCE, TOC, HOC, TAD) | 624-1507 |
| GLECDistance, Location, enums | 1510-1897 |
| TAD endpoint, filtering, pagination | 1899-2050 |
| PACT integration rules | 2052-2597 |
| Conformance levels | 2600-2730 |
| Example JSON (SF, TOC, HOC) | 2807-3049 |
| Conformance test cases TC001-TC008 | 3050-3244 |
正式的iLEAP规范位于(Bikeshed格式,共3291行)。
references/ileap-extension/specs/index.bs| 章节 | 主题 | 行数范围 |
|---|---|---|
| 概述、PACT互操作性 | 23-120 |
| ISO14083及相关术语定义 | 125-237 |
| 业务场景1-3 | 239-312 |
| 数据交易DT#1-DT#3 | 315-387 |
| 数据类型(SF、TCE、TOC、HOC、TAD) | 624-1507 |
| GLECDistance、Location、枚举类型 | 1510-1897 |
| TAD端点、过滤、分页 | 1899-2050 |
| PACT集成规则 | 2052-2597 |
| 一致性等级 | 2600-2730 |
| JSON示例(SF、TOC、HOC) | 2807-3049 |
| 一致性测试用例TC001-TC008 | 3050-3244 |
PACT spec
PACT规范
The PACT v2.1.0 spec is at
(Bikeshed format, 2520 lines).
references/pact-spec-v2/index.bs| Section | Topic | Lines |
|---|---|---|
| Introduction, scope | 16-70 |
| Term definitions | 73-121 |
| Data model overview | 138-161 |
| ProductFootprint properties | 163-334 |
| CarbonFootprint properties | 337-646 |
| DataModelExtension | 827-852 |
| DeclaredUnit enum | 1089-1121 |
| Authentication flow | 1539-1564 |
| Action Authenticate | 1591-1703 |
| Action ListFootprints | 1706-1861 |
| Action GetFootprint | 1863-1922 |
| Action Events | 1925-2134 |
| Error codes table | 2135-2277 |
PACT v2.1.0规范位于(Bikeshed格式,共2520行)。
references/pact-spec-v2/index.bs| 章节 | 主题 | 行数范围 |
|---|---|---|
| 介绍、范围 | 16-70 |
| 术语定义 | 73-121 |
| 数据模型概述 | 138-161 |
| ProductFootprint属性 | 163-334 |
| CarbonFootprint属性 | 337-646 |
| DataModelExtension | 827-852 |
| DeclaredUnit枚举 | 1089-1121 |
| 认证流程 | 1539-1564 |
| 认证操作 | 1591-1703 |
| 列出Footprint操作 | 1706-1861 |
| 获取Footprint操作 | 1863-1922 |
| 事件操作 | 1925-2134 |
| 错误码表 | 2135-2277 |
Grep patterns
常用Grep命令
sh
undefinedsh
undefinediLEAP: find a data type definition
iLEAP:查找数据类型定义
grep -n '<dfn element>' references/ileap-extension/specs/index.bs
grep -n '<dfn element>' references/ileap-extension/specs/index.bs
iLEAP: find all required properties for a type
iLEAP:查找某类型的所有必填属性
grep -n -A2 '<td>M$' references/ileap-extension/specs/index.bs
grep -n -A2 '<td>M$' references/ileap-extension/specs/index.bs
iLEAP: find PACT mapping rules
iLEAP:查找PACT映射规则
grep -n 'MUST be set to|MUST equal|MUST contain' references/ileap-extension/specs/index.bs
grep -n 'MUST be set to|MUST equal|MUST contain' references/ileap-extension/specs/index.bs
PACT: find property definitions
PACT:查找属性定义
grep -n '<dfn>' references/pact-spec-v2/index.bs | head -40
grep -n '<dfn>' references/pact-spec-v2/index.bs | head -40
PACT: find all mandatory properties
PACT:查找所有必填属性
grep -n '<td>M$' references/pact-spec-v2/index.bs
grep -n '<td>M$' references/pact-spec-v2/index.bs
PACT: find error codes
PACT:查找错误码
grep -n 'dfn>.*Denied|dfn>.*Request|dfn>.*Expired' references/pact-spec-v2/index.bs
undefinedgrep -n 'dfn>.*Denied|dfn>.*Request|dfn>.*Expired' references/pact-spec-v2/index.bs
undefinedReference Files
参考文件
| File | Purpose |
|---|---|
| Normative iLEAP spec (Bikeshed source) |
| PACT v2.1.0 spec (Bikeshed source) |
| PACT implementation steps (auth, endpoints, data model) |
| Implementation gotchas and workarounds |
| iLEAP server implementation patterns |
| OpenAPI contract (non-normative) |
| JSON schemas for all iLEAP data types |
| PACT base data model schema |
| Annotated PACT integration JSON examples |
| SINE Foundation demo server source (Rust/Rocket) |
| ACT CLI usage, test coverage |
| ACT runner script (detects arch, downloads binary) |
| SFC certification process for iLEAP |
| Strategic context only (not useful for implementation) |
| 文件 | 用途 |
|---|---|
| 正式iLEAP规范(Bikeshed源文件) |
| PACT v2.1.0规范(Bikeshed源文件) |
| PACT实现指南(认证、端点、数据模型) |
| 实现注意事项与解决方案 |
| iLEAP服务器实现模式 |
| OpenAPI契约(非官方标准) |
| 所有iLEAP数据类型的JSON模式 |
| PACT基础数据模型模式 |
| 带注释的PACT集成JSON示例 |
| SINE基金会演示服务器源码(Rust/Rocket框架) |
| ACT CLI使用说明、测试覆盖范围 |
| ACT运行脚本(自动检测架构、下载二进制文件) |
| iLEAP的SFC认证流程 |
| 仅含战略背景信息(对实现无帮助) |