ACCORD Building Codes and Rules API (1)

Download OpenAPI specification:Download

This is the Building Codes and Rules API proposed as part of the ACCORD project version: '1.0.0'. It is important to note when reading this API that any given version of a building code is immutable and once a specific version is published it cannot be changed. To update a document a new version must be created.

Retrieves the basic metadata about the server and a list of Building Codes hosted by it

Retrieves the basic metadata about the server and a list of Building Codes hosted by it

Responses

Response samples

Content type
{
  • "name": "string",
  • "description": "string",
  • "operator": "string",
  • "documentList": [
    ]
}

Returns the latest version of a Building Code

Returns the latest version of a Building Code

path Parameters
jurisdiction
required
string

The jurisdiction of the building code

classification
required
string

The classification of the building code

query Parameters
purpose
string
Default: "combined"
Enum: "execution" "visualisation" "combined"

Defines the purpose of the returned data, so the content of the response can be tuned accordingly

ruleFormat
string
Default: "summary"
Enum: "explicit" "summary"

Defines the formating of the executable rules within the returned document.

language
string
Default: "en-gb"

Specifies the requested language specified using a standard IETF language tag.

Responses

Response samples

Content type
{
  • "@base": "string",
  • "@context": [
    ],
  • "$type": [
    ],
  • "identifier": "string",
  • "$id": "string",
  • "title": "string",
  • "hasPart": [
    ],
  • "modified": "string",
  • "issued": "string",
  • "coverage": "string",
  • "temporal": "string",
  • "subject": "string"
}

Execute a GraphQL query over a building code.

path Parameters
jurisdiction
required
string

The jurisdiction of the building code

classification
required
string

The classification of the building code

query Parameters
language
string
Default: "en-gb"

Specifies the requested language specified using a standard IETF language tag.

Request Body schema: application/json

A GraphQL Query

query
string

Responses

Request samples

Content type
application/json
{
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

Returns the IDS for a Building Code

Returns the IDS for the latest version of a Building Code

path Parameters
classification
required
string

The classification of the building code

Responses

Returns a specified version of a building code

Returns a specified version of a building code

path Parameters
jurisdiction
required
string

The jurisdiction of the building code

classification
required
string

The classification of the building code

version
required
string

The version name of the document to retrieve, or the latest version if absent

query Parameters
purpose
string
Default: "combined"
Enum: "execution" "visualisation" "combined"

Defines the purpose of the returned data, so the content of the response can be tuned accordingly

ruleFormat
string
Default: "summary"
Enum: "explicit" "summary"

Defines the formating of the executable rules within the returned document.

language
string
Default: "en-gb"

Specifies the requested language specified using a standard IETF language tag.

Responses

Response samples

Content type
{
  • "@base": "string",
  • "@context": [
    ],
  • "$type": [
    ],
  • "identifier": "string",
  • "$id": "string",
  • "title": "string",
  • "hasPart": [
    ],
  • "modified": "string",
  • "issued": "string",
  • "coverage": "string",
  • "temporal": "string",
  • "subject": "string"
}

Creates a new Building Code.

Uploads a new building code with the specified short name and version name. This is a PUT operation due to the fact that any given version of a building code is immutable and once a specific version is published it cannot be changed. To update a building code a new version must be created.

Authorizations:
auth
path Parameters
jurisdiction
required
string

The jurisdiction of the building code

classification
required
string

The classification of the building code

version
required
string

The version name of the document being created

Request Body schema:
required

A building code. YAML or JSON expected according to the content-type specified.

@base
required
string
@context
required
Array of objects
$type
required
Array of strings
Items Value: "Document"
identifier
required
string
$id
required
string
title
required
string
required
Array of objects (BuildingCodePart)
modified
string
issued
string
coverage
string
temporal
string
subject
string

Responses

Request samples

Content type
{
  • "@base": "string",
  • "@context": [
    ],
  • "$type": [
    ],
  • "identifier": "string",
  • "$id": "string",
  • "title": "string",
  • "hasPart": [
    ],
  • "modified": "string",
  • "issued": "string",
  • "coverage": "string",
  • "temporal": "string",
  • "subject": "string"
}

Response samples

Content type
{
  • "success": true
}

Execute a GraphQL query over a specific version of a building code.

path Parameters
jurisdiction
required
string

The jurisdiction of the building code

classification
required
string

The classification of the building code

version
required
string

The version name of the document to retrieve, or the latest version if absent

Request Body schema: application/json

A GraphQL Query

query
string

Responses

Request samples

Content type
application/json
{
  • "query": "string"
}

Response samples

Content type
application/json
{
  • "data": { }
}

Returns the IDS for a given version of a Building Code

Returns the IDS for the given version of a Building Code

path Parameters
jurisdiction
required
string

The jurisdiction of the building code

classification
required
string

The classification of the building code

version
required
string

The version name of the document to retrieve, or the latest version if absent

Responses

Returns a specific section/paragraph of a building code

Returns a specific section/paragraph of a building code

path Parameters
classification
required
string

The classification of the building code

jurisdiction
required
string

The jurisdiction of the building code

version
required
string

The version of the document

documentReference
required
string

The reference to the specific section/paragraph to retrieve. Should be a list of section or paragraph numbered seperated by the / character. An example for this is /1/2/a for Section 1, Paragraph 2 sub paragraph a

query Parameters
purpose
string
Default: "combined"
Enum: "execution" "visualisation" "combined"

Defines the purpose of the returned data, so the content of the response can be tuned accordingly

ruleFormat
string
Default: "summary"
Enum: "explicit" "summary"

Defines the formating of the executable rules within the returned document.

Responses

Response samples

Content type
{
  • "@base": "string",
  • "@context": [
    ],
  • "$type": [
    ],
  • "identifier": "string",
  • "$id": "string",
  • "title": "string",
  • "hasPart": [
    ],
  • "modified": "string",
  • "issued": "string",
  • "coverage": "string",
  • "temporal": "string",
  • "subject": "string"
}