This repository contains example code and the official C# client for the b-Cert API.
Please also see the official documentation on b-Cert.
To authenticate in b-Cert, you can either use Http Basic Authentication or configure an Api Key. To use an Api Key, go to your user profile in b-Cert and create a key. Only users that have either platform access or are part of a running certification have access to the API.
GET https://www.b-cert.org/Api/TestTool/Tests
Response:
[
{
"id":"6050f5ff-390e-43cc-25dd-08d40fc21b79",
"name":"Beam-01A",
"exchangeRequirementName":"Architectural Reference Exchange",
"schemaName":"IFC4",
"modelViewDefinitions":[
{
"id":"00000110-0899-0000-0000-000000000000",
"name":"IFC4Add2RV_Beam_01A"
}
]
},
{
"id":"f0b76fe7-5b7c-43e1-25e0-08d40fc21b79",
"name":"Chimney-01A",
"exchangeRequirementName":"Architectural Reference Exchange",
"schemaName":"IFC4",
"modelViewDefinitions":[
{
"id":"00000098-0851-0000-0000-000000000000",
"name":"IFC4Add2RV_Chimney_01A"
}
]
}
]
You can send an IFC4 file to the API and have it checked. This will not include any test specific checks but only report general IFC4 schema and MVD compliance.
POST https://www.b-cert.org/Api/TestTool/Check?jsonReport=true
Form Parameter: ifcFile
Response:
{
"Json": "<Report>"
}
The report format depends on the current version of the check tool.
You can optionally include an mvdId
parameter to perform checks against a specific test. The list of available mvds can be obtained at the Tests
resource.
Test specific checks also support the output as Xml report.
POST https://www.b-cert.org/Api/TestTool/Check?jsonReport=true&xmlReport=true&mvdId=00000110-0899-0000-0000-000000000000
Form Parameter: ifcFile
Response:
{
"Json": "<Report>",
"Xml": "<Report>"
}
The report format depends on the current version of the check tool.
The cross-platform console runner is available as binary download for Windows at the b-Cert documentation.
Parameter | Alternative | Description |
---|---|---|
-k |
--apiKey |
Required. Your api key |
-t |
--tests |
Optional. Display all available tests in the console |
-i |
--input |
Optional. Path to the input IFC file |
-j |
--json |
Optional. Output path for the Json report |
-x |
--xml |
Optional. Output path for the Xml report |
-u |
--uri |
Optional. Different base Uri for b-Cert. Defaults to https://www.b-cert.org |
-m |
--mvdId |
Optional. Id of a Model View Definition to check against. If omitted, checks are run against the global MVD |
iabi.bCertApi.Console.exe -t -k <ApiKey>
Available tests:
Test: Beam-01A, Exchange Requirement: Architectural Reference Exchange
Model View Definitions:
IFC4RV_Beam_01A, Id: 00000110-0899-0000-0000-000000000000
--------------------
Test: Beam-01S, Exchange Requirement: Structural Reference Exchange
Model View Definitions:
IFC4RV_Beam_01S, Id: 00000070-0751-0000-0000-000000000000
--------------------
iabi.bCertApi.Console.exe -k <ApiKey> -i input.ifc -j result.json
Will save the received result as result.json
;
iabi.bCertApi.Console.exe -k <ApiKey> -i input.ifc -j result.json -x result.xml -m 00000110-0899-0000-0000-000000000000
Will save the received results as result.json
and result.xml
.
The package is available at NuGet as iabi.bCertApi
.