امتثال
واجهة البرمجة

Factgraph

GET
/v1/factgraph/jobs/{job_id}/graph

Return the GraphRef (model_id, version, schema_version, created_at) for a job.

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Path Parameters

job_id*Job Id
Formatuuid

Query Parameters

version?|

Model version (default: latest).

Response Body

GraphRef for the job's building model.

response?unknownapplication/json
curl -X GET 'https://api.aisc.sa/v1/factgraph/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/graph'
null
GET
/v1/factgraph/jobs/{job_id}/graph/entities

Return a page of entities for a job's building model.

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Path Parameters

job_id*Job Id
Formatuuid

Query Parameters

element_class?|

Filter by element class (e.g. 'door').

min_confidence?Min Confidence
Range0 <= value <= 1
Default0
after_id?|

Keyset cursor (last id seen).

page_size?Page Size
Range1 <= value <= 500
Default50

Response Body

Paginated entity list.

response?unknownapplication/json
curl -X GET 'https://api.aisc.sa/v1/factgraph/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/graph/entities'
null
GET
/v1/factgraph/jobs/{job_id}/graph/facts

Return a page of resolved facts for a job's building model.

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Path Parameters

job_id*Job Id
Formatuuid

Query Parameters

entity_ids?array<string>|

Filter by entity UUIDs.

names?array<string>|

Filter by fact names (e.g. 'clear_width_mm').

after_entity_id?|

Keyset cursor (last entity_id seen).

page_size?Page Size
Range1 <= value <= 500
Default50

Response Body

Paginated fact list.

response?unknownapplication/json
curl -X GET 'https://api.aisc.sa/v1/factgraph/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/graph/facts'
null
POST
/v1/factgraph/jobs/{job_id}/graph/quantities

Compute a quantity aggregation (count/length/area/volume) over the model.

Demo: POST with body {"element_class": "door", "measure": "count", "group_by": ["floor_number"]} returns door counts per floor with contributing entity_ids (lineage-complete per RFC §5).

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Path Parameters

job_id*Job Id
Formatuuid

Request Body

application/json
  1. body

Input to quantities() — specifies the aggregation to compute.

V1 supports: count, length, area, volume. custom_expr is rejected in V1 (RFC §1).

element_class*Element Class

Entity class to aggregate (e.g. 'door').

fact_name?|

Fact name to sum/measure (required for length/area/volume). Must be a physical symbol in the vocabulary.

group_by?array<string>

Property keys to group by (e.g. ['floor_number']).

measure*Measure

Aggregation measure: 'count' | 'length' | 'area' | 'volume'. 'custom_expr' is rejected in V1.

min_confidence?Min Confidence

Minimum confidence threshold; entities below are excluded.

Range0 <= value <= 1
Default0

Response Body

QuantityProjection result.

response?unknownapplication/json
curl -X POST 'https://api.aisc.sa/v1/factgraph/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/graph/quantities' \  -H 'Content-Type: application/json' \  -d '{  "element_class": "string",  "measure": "string"}'
null
GET
/v1/factgraph/jobs/{job_id}/graph/relationships

Return a page of relationships for a job's building model.

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Path Parameters

job_id*Job Id
Formatuuid

Query Parameters

rel_type?|

Filter by relationship type (e.g. 'contains').

after_id?|

Keyset cursor (last id seen).

page_size?Page Size
Range1 <= value <= 500
Default50

Response Body

Paginated relationship list.

response?unknownapplication/json
curl -X GET 'https://api.aisc.sa/v1/factgraph/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/graph/relationships'
null
GET
/v1/factgraph/jobs/{job_id}/lineage

Return verdict lineage rows linking compliance verdicts to element citations.

Each row carries rule_id, verdict, cited_entity_ids (drawing element UUIDs), and cited_fact_names (from the deterministic executor's audit_detail).

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Path Parameters

job_id*Job Id
Formatuuid

Query Parameters

after_id?|

Keyset cursor (last verdict_id seen).

page_size?Page Size
Range1 <= value <= 500
Default50

Response Body

Paginated VerdictLineage list.

response?unknownapplication/json
curl -X GET 'https://api.aisc.sa/v1/factgraph/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/lineage'
null