Ontology¶
cloudg builds an RDF/OWL ontology from a dataset (cloudg.graph.ontology.CloudOntology): one individual per asset (cmr:<asset id>), per finding (cmr:finding_<finding id>) and per tag (cmr:tag_<key>_<value>), typed with classes such as cm:RelationalDatabase, and connected by 64 relation types in seven groups (NETWORK, CONTAINMENT, IAM, DATA_FLOW, SECURITY, COMPUTE, GOVERNANCE). Data properties are cmp:hasName, hasARN, hasRegion, hasProvider, hasAccountId, hasCIDR, hasPort, hasProtocol, hasSeverity, hasRiskScore and isInternetExposed. The ontology is built on first use and cached; on a large map the first call can take a while and reports progress.
Prefixes predefined for SPARQL:
| Prefix | Namespace | Holds |
|---|---|---|
cm: |
https://cloudg.io/ontology# |
Classes. |
cmp: |
https://cloudg.io/property/ |
Relations and data properties. |
cmr: |
https://cloudg.io/resource/ |
Individuals. |
rdf:, rdfs:, owl:, xsd: |
The W3C namespaces |
How the relations are read. cmp:FINDING_AFFECTS points at the asset a finding affects, resolved like an asset reference (id, ARN, unique name, unique ARN tail); only a finding whose resource matches nothing points at cmr: plus its raw resource_id. A CONTAINS edge gets a specific relation only when both endpoint types fit it (VPC_CONTAINS_SUBNET, SUBNET_CONTAINS_INSTANCE, CLUSTER_CONTAINS_SERVICE, ORG_CONTAINS_ACCOUNT), otherwise the generic CONTAINS. A security group or NACL rule yields INGRESS_ALLOWED or EGRESS_ALLOWED, INTERNET_REACHABLE for an internet source, and port relations read from the parsed port ranges (ALL_TRAFFIC, ONLY_SSH, ONLY_HTTP, ONLY_HTTPS, ONLY_RDP, PORT_RESTRICTED); PROTECTED_BY_SG and PROTECTED_BY_NACL come from ATTACHED_TO edges into a group (web-alb PROTECTED_BY_SG sg-web). ENCRYPTED_BY_KMS links an encrypted asset to its key.
ontology_stats¶
Category ontology · sensitivity internal · capabilities read_state · readOnly true, destructive false, idempotent true, openWorld false · outputSchema no · timeout: layer default (300 s)
Size and shape of the ontology: total_triples, classes_used, individuals, relation_type_counts (data properties included) and relation_group_counts, plus built_now, true when this call built it. Links cloudg://ontology/turtle.
| Argument | Type | Default | Constraints | Description |
|---|---|---|---|---|
dataset |
string | "" |
Dataset name (see list_datasets). Empty = the active dataset. |
Called with the arguments below, ontology_stats returned this structuredContent.
{
"dataset": "sample",
"built_now": true,
"total_triples": 1184,
"classes_used": 30,
"individuals": 78,
"relation_type_counts": {
"hasRiskScore": 12,
"hasName": 57,
"hasAccountId": 44,
"isInternetExposed": 44,
"INTERNET_REACHABLE": 7,
"...": "36 more"
},
"relation_group_counts": {
"NETWORK": 16,
"CONTAINMENT": 15,
"SECURITY": 38,
"IAM": 12,
"GOVERNANCE": 25,
"COMPUTE": 11,
"DATA_FLOW": 2
}
}
The result also carried these resource links in content:
[
{
"type": "resource_link",
"uri": "cloudg://ontology/turtle",
"name": "ontology (turtle)",
"mimeType": "text/turtle"
}
]
A second call reads the cache and reports "built_now": false.
sparql_query¶
Category ontology · sensitivity restricted · capabilities read_state · readOnly true, destructive false, idempotent true, openWorld false · outputSchema yes · timeout 120 s
Runs one read-only SPARQL query against the dataset's ontology. Before parsing, string literals and comments are blanked and the query is rejected if it starts (after PREFIX / BASE declarations) with INSERT, DELETE, LOAD, CLEAR, DROP, CREATE, ADD, MOVE, COPY or WITH; both steps are linear scans, so a hostile query string cannot stall them. After parsing, FROM / FROM NAMED and any SERVICE clause are rejected, so a query can neither change the graph nor load remote data.
The tool is restricted. Its rows are keyed by the query's own variable names, so the privacy transforms cannot tell an identifier column from any other, and strict and the soc-analyst analyst do not see the tool.
| Argument | Type | Default | Constraints | Description |
|---|---|---|---|---|
query |
string | required | min length 1; max length 20000 | Read-only SPARQL (SELECT / ASK / CONSTRUCT / DESCRIBE). Predefined prefixes: cm: (classes, e.g. cm:RelationalDatabase), cmp: (relations / properties, e.g. cmp:INTERNET_REACHABLE, cmp:hasName), cmr: (individuals, cmr: |
limit |
integer | 100 |
1..1000 | Row cap applied after the query runs. |
compact_uris |
boolean | true |
Shorten URIs to prefix:name. | |
dataset |
string | "" |
Dataset name (see list_datasets). Empty = the active dataset. |
Result by query type (query_type is rdflib's algebra name):
query_type |
Result |
|---|---|
SelectQuery |
rows: one object per solution, keyed by variable name. Values are strings (numbers too: "12"), URIs are compacted to prefix:name unless compact_uris is false, unbound variables are null. |
AskQuery |
answer (boolean), empty rows. |
ConstructQuery, DescribeQuery |
rows of {subject, predicate, object}. |
limit is applied while reading the results, so a query whose patterns multiply out stops after limit rows instead of enumerating every combination; when more rows exist, truncated is true and a hint suggests LIMIT / OFFSET. Reading also stops after 60 seconds, with a hint to narrow the query. Clauses that need the whole solution set first (ORDER BY, aggregates, DISTINCT over a large set) and CONSTRUCT / DESCRIBE are bounded only by the tool's 120-second timeout. A SELECT result carries variable_kinds, which says whether each column holds URIs, literals or both (term).
The internet-reachable relation (the example in the tool's own description narrows it to relational databases, which returns no rows on the sample estate because nothing reaches the database directly):
Called with the arguments below, sparql_query returned this structuredContent.
{
"query": "SELECT ?r ?name WHERE { ?s cmp:INTERNET_REACHABLE ?r . ?r cmp:hasName ?name } ORDER BY ?name",
"limit": 20
}
{
"dataset": "sample",
"query_type": "SelectQuery",
"rows": [
{
"r": "cmr:az-nsg",
"name": "jump-nsg"
},
{
"r": "cmr:logs-bucket",
"name": "prod-logs"
},
{
"r": "cmr:api-gw",
"name": "public-api"
},
"... 4 more"
],
"returned": 7,
"truncated": false,
"variable_kinds": {
"r": "uri",
"name": "literal"
}
}
Called with the arguments below, sparql_query returned this structuredContent.
{
"dataset": "sample",
"query_type": "AskQuery",
"answer": true,
"rows": [],
"returned": 0,
"truncated": false
}
Called with the arguments below, sparql_query returned this structuredContent.
{
"dataset": "sample",
"query_type": "ConstructQuery",
"rows": [
{
"subject": "cmr:org",
"predicate": "cmp:hasName",
"object": "sample-org"
},
{
"subject": "cmr:ou-workloads",
"predicate": "cmp:hasName",
"object": "Workloads"
}
],
"returned": 2,
"truncated": false,
"variable_kinds": {
"subject": "uri",
"predicate": "uri",
"object": "term"
}
}
Called with the arguments below, sparql_query returned this structuredContent.
{
"dataset": "sample",
"query_type": "DescribeQuery",
"rows": [
{
"subject": "cmr:orders-db",
"predicate": "rdf:type",
"object": "cm:RelationalDatabase"
},
{
"subject": "cmr:orders-db",
"predicate": "cmp:hasProvider",
"object": "AWS"
},
{
"subject": "cmr:orders-db",
"predicate": "cmp:hasARN",
"object": "arn:aws:rds:us-east-1:111111111111:db:orders-db"
},
"... 8 more"
],
"returned": 11,
"truncated": false,
"variable_kinds": {
"subject": "uri",
"predicate": "uri",
"object": "term"
}
}
Called with the arguments below, sparql_query returned this structuredContent.
{
"dataset": "sample",
"query_type": "SelectQuery",
"rows": [
{
"s": "cmp:MONITORED_BY"
},
{
"s": "cmr:tag_owner_api-team"
}
],
"returned": 2,
"truncated": true,
"variable_kinds": {
"s": "uri"
},
"hint": "More rows exist: add LIMIT / OFFSET to the query or raise limit."
}
Called with the arguments below, sparql_query returned this structuredContent.
{
"dataset": "sample",
"query_type": "SelectQuery",
"rows": [
{
"r": "https://cloudg.io/resource/web-1"
}
],
"returned": 1,
"truncated": false,
"variable_kinds": {
"r": "uri"
}
}
Rejections:
{
"tool": "sparql_query",
"arguments": {
"query": "INSERT DATA { cmr:x cmp:hasName 'x' }"
},
"isError": true,
"text": "Only read-only queries are allowed (SELECT, ASK, CONSTRUCT, DESCRIBE); SPARQL UPDATE is rejected.",
"_meta": {
"cloudg/error_code": -32602
}
}
{
"tool": "sparql_query",
"arguments": {
"query": "SELECT ?s FROM <http://evil.example/data.ttl> WHERE { ?s ?p ?o }"
},
"isError": true,
"text": "FROM / FROM NAMED clauses are not allowed (they would load external data). Query the dataset's graph directly.",
"_meta": {
"cloudg/error_code": -32602
}
}
{
"tool": "sparql_query",
"arguments": {
"query": "SELECT ?s WHERE { SERVICE <http://evil.example/sparql> { ?s ?p ?o } }"
},
"isError": true,
"text": "SERVICE (federated queries to remote endpoints) is not allowed.",
"_meta": {
"cloudg/error_code": -32602
}
}
{
"tool": "sparql_query",
"arguments": {
"query": "SELEKT nonsense"
},
"isError": true,
"text": "SPARQL parse error: Expected {SelectQuery | ConstructQuery | DescribeQuery | AskQuery}, found 'SELEKT' (at char 0), (line:1, col:1). Only SELECT / ASK / CONSTRUCT / DESCRIBE are allowed; prefixes cm:, cmr:, cmp:, rdf:, rdfs:, owl:, xsd: are predefined.",
"_meta": {
"cloudg/error_code": -32602
}
}
More queries that work on this ontology are in SPARQL cookbook.
ontology_neighbourhood¶
Category ontology · sensitivity confidential · capabilities read_state · readOnly true, destructive false, idempotent true, openWorld false · outputSchema no · timeout: layer default (300 s)
The semantic relations around one asset, walked breadth-first in both directions over cmp: object properties (data properties and literals are skipped) up to hops. Each triple has subject and object (the hasName value, else the compact URI), predicate, depth, subject_id and object_id. predicates counts the predicates among the returned triples. Links the asset.
| Argument | Type | Default | Constraints | Description |
|---|---|---|---|---|
ref |
string | required | min length 1 | Asset reference: internal id, ARN / cloud resource id, unique name, or unique ARN tail (e.g. 'function:api' or 'i-0abc'). |
hops |
integer | 1 |
1..3 | How far to walk from the asset. |
limit |
integer | 100 |
1..500 | Triple cap. |
dataset |
string | "" |
Dataset name (see list_datasets). Empty = the active dataset. |
Called with the arguments below, ontology_neighbourhood returned this structuredContent.
{
"dataset": "sample",
"asset": {
"id": "orders-db",
"name": "orders-db",
"type": "RDS_INSTANCE"
},
"predicates": {
"TAGGED_WITH": 2,
"PROTECTED_BY_SG": 1,
"ENCRYPTED_BY_KMS": 1,
"SUBNET_CONTAINS_INSTANCE": 1,
"POLICY_ALLOWS_ACTION": 1
},
"triples": [
{
"subject": "orders-db",
"predicate": "TAGGED_WITH",
"object": "cmr:tag_env_prod",
"depth": 1,
"subject_id": "cmr:orders-db",
"object_id": "cmr:tag_env_prod"
},
{
"subject": "orders-db",
"predicate": "TAGGED_WITH",
"object": "cmr:tag_data_pii",
"depth": 1,
"subject_id": "cmr:orders-db",
"object_id": "cmr:tag_data_pii"
},
"... 4 more"
],
"returned": 6,
"truncated": true
}
The result also carried these resource links in content:
[
{
"type": "resource_link",
"uri": "cloudg://assets/orders-db",
"name": "orders-db",
"mimeType": "application/json"
}
]
With limit: 6 the walk stopped early (truncated). Without a limit the same call also returns FINDING_AFFECTS from the RDS backup finding, which names the database by ARN and is resolved to the asset, and the two COMPLIANCE_GOVERNS triples.
relation_groups¶
Category ontology · sensitivity confidential · capabilities read_state · readOnly true, destructive false, idempotent true, openWorld false · outputSchema no · timeout: layer default (300 s)
Without group: every relation group with its total and the non-zero relation types. With group (case-insensitive): relation_types (every type in the group, present or not) and a page of triples with src, tgt (compact URIs), srcName and tgtName.
| Argument | Type | Default | Constraints | Description |
|---|---|---|---|---|
group |
string | "" |
NETWORK, CONTAINMENT, IAM, DATA_FLOW, SECURITY, COMPUTE or GOVERNANCE; empty = overview. | |
limit |
integer | 100 |
1..500 | Page size when group is set. |
cursor |
string | "" |
Opaque cursor from a previous call's next_cursor; empty = first page. | |
dataset |
string | "" |
Dataset name (see list_datasets). Empty = the active dataset. |
Called with the arguments below, relation_groups returned this structuredContent.
{
"dataset": "sample",
"groups": {
"NETWORK": {
"total": 16,
"types": {
"INGRESS_ALLOWED": 4,
"ONLY_HTTP": 1,
"ONLY_HTTPS": 1,
"ONLY_SSH": 1,
"ONLY_RDP": 1,
"PORT_RESTRICTED": 1,
"INTERNET_REACHABLE": 7
}
},
"CONTAINMENT": {
"total": 15,
"types": {
"CONTAINS": 3,
"VPC_CONTAINS_SUBNET": 2,
"SUBNET_CONTAINS_INSTANCE": 5,
"ORG_CONTAINS_ACCOUNT": 2,
"LB_TARGETS_INSTANCE": 3
}
},
"IAM": {
"total": 12,
"types": {
"ROLE_ASSUMES_ROLE": 2,
"POLICY_ALLOWS_ACTION": 8,
"CROSS_ACCOUNT_TRUST": 2
}
},
"DATA_FLOW": {
"total": 2,
"types": {
"READS_FROM": 1,
"LOGS_TO": 1
}
},
"SECURITY": {
"total": 38,
"types": {
"PROTECTED_BY_SG": 6,
"PROTECTED_BY_WAF": 1,
"ENCRYPTED_BY_KMS": 4,
"FINDING_AFFECTS": 12,
"COMPLIANCE_GOVERNS": 15
}
},
"COMPUTE": {
"total": 11,
"types": {
"RUNS_ON": 5,
"TRIGGERED_BY": 1,
"INVOKES": 1,
"LOAD_BALANCED_BY": 3,
"DEPENDS_ON": 1
}
},
"GOVERNANCE": {
"total": 25,
"types": {
"TAGGED_WITH": 17,
"OWNED_BY": 7,
"MONITORED_BY": 1
}
}
}
}
Called with the arguments below, relation_groups returned this structuredContent.
{
"dataset": "sample",
"group": "IAM",
"relation_types": [
"ROLE_ASSUMES_ROLE",
"USER_HAS_POLICY",
"ROLE_HAS_POLICY",
"... 7 more"
],
"total": 12,
"offset": 0,
"returned": 3,
"next_cursor": "c3.548cbba67c13",
"truncated": true,
"items": [
{
"src": "cmr:app-role",
"tgt": "cmr:deploy-role",
"srcName": "app-role",
"tgtName": "deploy-role"
},
{
"src": "cmr:acct-vendor",
"tgt": "cmr:deploy-role",
"srcName": "vendor-co",
"tgtName": "deploy-role"
},
{
"src": "cmr:app-role",
"tgt": "cmr:orders-db",
"srcName": "app-role",
"tgtName": "orders-db"
}
]
}
{
"tool": "relation_groups",
"arguments": {
"group": "FINANCE"
},
"isError": true,
"text": "Unknown relation group. Did you mean GOVERNANCE? Valid values: NETWORK, CONTAINMENT, IAM, DATA_FLOW, SECURITY, COMPUTE, GOVERNANCE",
"_meta": {
"cloudg/error_code": -32602,
"cloudg/error_data": {
"value": "FINANCE",
"valid": [
"NETWORK",
"CONTAINMENT",
"IAM",
"... 4 more"
],
"close_matches": [
"GOVERNANCE"
]
}
}
}
rag_chunks¶
Category ontology · sensitivity confidential · capabilities read_state · readOnly true, destructive false, idempotent true, openWorld false · outputSchema no · timeout: layer default (300 s)
Retrieval-ready text chunks from cloudg.graph.rag_export.RAGExporter, useful as context for summarising an area. entity chunks describe one asset with its relations and findings (chunk_id is entity::<asset id>); community chunks describe Louvain clusters of tightly connected resources with a risk score; relation_group chunks list the triples of one semantic group. Each item has chunk_id, chunk_type, content and metadata.
| Argument | Type | Default | Constraints | Description |
|---|---|---|---|---|
chunk_type |
string | "entity" |
one of entity, community, relation_group |
Which chunk family to return. |
ref |
string | "" |
Entity chunks: only this asset's chunk. | |
query |
string | "" |
Substring of chunk content. | |
min_severity |
string | "" |
Entity chunks: severity_max at or above. | |
limit |
integer | 10 |
1..100 | Page size. |
cursor |
string | "" |
Opaque cursor from a previous call's next_cursor; empty = first page. | |
dataset |
string | "" |
Dataset name (see list_datasets). Empty = the active dataset. |
ref keeps only that asset's entity chunk. query is a case-insensitive substring of content. min_severity compares against metadata.severity_max, which entity and community chunks carry; it is checked against the five severity names in upper case and fails with Unknown severity. otherwise. Entity chunks match findings to assets like the ontology does, so orders-db below counts its backup finding, which names the database by ARN.
Called with the arguments below, rag_chunks returned this structuredContent.
{
"dataset": "sample",
"chunk_type": "entity",
"total": 1,
"offset": 0,
"returned": 1,
"next_cursor": null,
"truncated": false,
"items": [
{
"chunk_id": "entity::orders-db",
"chunk_type": "entity",
"content": "Resource: orders-db\nType: RDS_INSTANCE\nProvider: AWS\nRegion: us-east-1\nARN: arn:aws:rds:us-east-1:111111111111:db:orders-db\nAccount: 111111111111\nTags: {\"env\": \"prod\", \"data\": \"pii\"}\n\nRelations (4):\n → PROTECTED_BY_SG: sg-db\n → ENCRYPTED_...",
"metadata": {
"asset_type": "RDS_INSTANCE",
"provider": "AWS",
"region": "us-east-1",
"account_id": "111111111111",
"is_internet_exposed": false,
"relation_types": [
"ENCRYPTED_BY_KMS",
"POLICY_ALLOWS_ACTION",
"PROTECTED_BY_SG",
"... 1 more"
],
"severity_max": "MEDIUM",
"compliance_frameworks": [
"CIS-AWS",
"NIST-800-53"
],
"neighbour_count": 4,
"finding_count": 1,
"arn": "arn:aws:rds:us-east-1:111111111111:db:orders-db"
}
}
]
}
Called with the arguments below, rag_chunks returned this structuredContent.
{
"dataset": "sample",
"chunk_type": "community",
"total": 5,
"offset": 0,
"returned": 1,
"next_cursor": "c1.485ea695a67d",
"truncated": true,
"items": [
{
"chunk_id": "community::1",
"chunk_type": "community",
"content": "Community 1 (10 resources):\n • sample-org (ORGANIZATION)\n • Workloads (ORG_UNIT)\n • prod (CLOUD_ACCOUNT)\n • shared-services (CLOUD_ACCOUNT)\n • deny-unapproved-regions (ORG_POLICY)\n • prod-vpc (VPC)\n • prod-public-a (SUBNET)\n • sg-admin (SECURITY_GROUP)\n • bastion (EC2)\n • bastion-admin (IA...",
"metadata": {
"community_id": 1,
"member_count": 10,
"asset_types": {
"ORGANIZATION": 1,
"ORG_UNIT": 1,
"CLOUD_ACCOUNT": 2,
"ORG_POLICY": 1,
"VPC": 1,
"...": "4 more"
},
"internal_edges": 9,
"external_edges": 4,
"internet_exposed_count": 1,
"finding_count": 3,
"severity_max": "CRITICAL",
"compliance_frameworks": [
"CIS-AWS",
"PCI-DSS"
],
"risk_score": 6.5
}
}
]
}
Called with the arguments below, rag_chunks returned this structuredContent.
{
"dataset": "sample",
"chunk_type": "relation_group",
"total": 7,
"offset": 0,
"returned": 1,
"next_cursor": "c1.2e7539349d13",
"truncated": true,
"items": [
{
"chunk_id": "relation_group::CONTAINMENT",
"chunk_type": "relation_group",
"content": "Relation Group: CONTAINMENT\nTotal relations: 15\n\nRelation type distribution:\n SUBNET_CONTAINS_INSTANCE: 5\n CONTAINS: 3\n LB_TARGETS_INSTANCE: 3\n ORG_CONTAINS_ACCOUNT: 2\n VPC_CONTAINS_SUBNET: 2\n\nTriples:\n sample-org → CONTAINS → Workloads\n Workloads → ORG_CONTAINS_ACCOUNT → prod\n Workloads → O...",
"metadata": {
"relation_group": "CONTAINMENT",
"total_relations": 15,
"relation_type_counts": {
"CONTAINS": 3,
"ORG_CONTAINS_ACCOUNT": 2,
"VPC_CONTAINS_SUBNET": 2,
"SUBNET_CONTAINS_INSTANCE": 5,
"LB_TARGETS_INSTANCE": 3
},
"unique_subjects": 9,
"unique_objects": 13
}
}
]
}
Called with the arguments below, rag_chunks returned this structuredContent.
{
"dataset": "sample",
"chunk_type": "entity",
"total": 2,
"offset": 0,
"returned": 2,
"next_cursor": null,
"truncated": false,
"items": [
{
"chunk_id": "entity::sg-admin",
"chunk_type": "entity",
"content": "Resource: sg-admin\nType: SECURITY_GROUP\nProvider: AWS\nRegion: us-east-1\nARN: arn:aws:ec2:us-east-1:111111111111:security-group/sg-0admin\nAccount: 111111111111\n\nRelations (4):\n ← INGRESS_ALLOWED: 0.0....",
"metadata": {
"asset_type": "SECURITY_GROUP",
"provider": "AWS",
"region": "us-east-1",
"account_id": "111111111111",
"is_internet_exposed": false,
"relation_types": [
"INGRESS_ALLOWED",
"INTERNET_REACHABLE",
"... 2 more"
],
"severity_max": "CRITICAL",
"compliance_frameworks": [
"CIS-AWS",
"PCI-DSS"
],
"neighbour_count": 4,
"finding_count": 1,
"arn": "arn:aws:ec2:us-east-1:111111111111:security-group/sg-0admin"
}
},
{
"chunk_id": "entity::az-nsg",
"chunk_type": "entity",
"content": "Resource: jump-nsg\nType: NSG\nProvider: AZURE\nRegion: westeurope\nARN: /subscriptions/00000000-aaaa-bbbb-cccc-000000000001/resourceGroups/rg-hub/providers/Microsoft.Network/networkSecurityGroups/jump-ns...",
"metadata": {
"asset_type": "NSG",
"provider": "AZURE",
"region": "westeurope",
"account_id": "00000000-aaaa-bbbb-cccc-000000000001",
"is_internet_exposed": false,
"relation_types": [
"INGRESS_ALLOWED",
"INTERNET_REACHABLE",
"... 2 more"
],
"severity_max": "CRITICAL",
"compliance_frameworks": [
"CIS-Azure"
],
"neighbour_count": 4,
"finding_count": 1,
"arn": "/subscriptions/00000000-aaaa-bbbb-cccc-000000000001/resourceGroups/rg-hub/providers/Microsoft.Network/networkSecurityGroups/jump-nsg"
}
}
]
}
export_ontology¶
Category ontology · sensitivity confidential · capabilities read_state, write_fs · readOnly false, destructive false, idempotent true, openWorld false · outputSchema no · timeout: layer default (300 s)
Writes the ontology to <output_dir>/<filename>.<ext> as Turtle (ttl), JSON-LD (jsonld), RDF/XML (rdf) or N-Triples (nt); the extension is added when missing, and an existing file is overwritten. Returns path, format, triples and bytes, and links cloudg://ontology/{format}, which returns the same content without writing a file.
| Argument | Type | Default | Constraints | Description |
|---|---|---|---|---|
format |
string | "turtle" |
one of turtle, json-ld, xml, nt |
RDF serialisation. |
filename |
string | "ontology" |
pattern ^[A-Za-z0-9_.\-]{1,100}$ |
File name (no directories); extension added if missing. |
dataset |
string | "" |
Dataset name (see list_datasets). Empty = the active dataset. |
Called with the arguments below, export_ontology returned this structuredContent.
{
"dataset": "sample",
"path": "<estate>/out/estate.ttl",
"format": "turtle",
"triples": 1184,
"bytes": 43748
}
The result also carried these resource links in content:
[
{
"type": "resource_link",
"uri": "cloudg://ontology/turtle",
"name": "ontology (turtle)",
"mimeType": "text/turtle"
}
]
{
"tool": "export_ontology",
"arguments": {
"filename": "../escape"
},
"isError": true,
"text": "Invalid arguments: filename: String should match pattern '^[A-Za-z0-9_.\\-]{1,100}$'",
"_meta": {
"cloudg/error_code": -32602,
"cloudg/error_data": [
{
"loc": "filename",
"msg": "String should match pattern '^[A-Za-z0-9_.\\-]{1,100}$'",
"type": "string_pattern_mismatch"
}
]
}
}