Before you begin
Before you start, make sure you have:- Ontology extension: An administrator has installed the Ontology extension in your account. Until then, these routes and MCP tools are not available.
- Credentials:
ATLAN_GATEWAY_URLandATLAN_TOKENin your environment, from an approved secret store. See Send bearer token. - Workspace: A disposable workspace you can write to while you evaluate the contract.
jq: The examples use it to keep artifact IDs, exact version ordinals, and content hashes from each response. Those three values identify the precise draft version that publication consumes.
1
Create ontology
An ontology is the governance root for its logical resources. Create it in Ontology Studio, the client for the Ontology extension. In the Atlan app, Ontology’s list and creating open in Brain under Ontologies. To open the studio in a browser instead, go to The icon and colour are presentation only: they are not part of a release snapshot, and you can change them in the ontology’s Settings before or after publishing.The home page’s All ontologies list can be searched by name, API name, or description, filtered by release status (All, Published, Not published), and sorted by name, latest release, or last edit. Its last-edited time counts edits to the ontology’s definitions, not only the ontology itself.Studio can also author resources in Form and JSON views, show the catalog as a graph (see Manage ontology in Studio), and build derived properties and links in its Builder and Explain views. Its Import view accepts native JSON, RDF/RDFS, OWL, and SKOS documents and saves at most 100 resources as drafts in one transaction. After you review the preview, select I approve creating these definitions as drafts in the selected ontology. Nothing will be published., then choose Save approved drafts. If Studio reports Save outcome unknown, check the ontology’s definitions before you import again: a failed response does not prove the save failed, and the same preview cannot be submitted twice. The rest of this recipe uses the API.
https://api.atlan.com/ontology/v1/ui/, complete the Gateway sign-in, and choose a workspace. Then:- Choose New ontology, then Start blank. With no ontology yet, the page shows the same three options instead: Start blank, Import a file, and Draft with an agent. Choose Start blank.
- Select the Workspace, enter a Name, and set the API name to
example_ontology. - Optionally open More options and choose an Icon and colour. They show wherever the ontology is listed; leave either on Default to use the standard tile.
- Under More options, keep Backward compatible as the Versioning policy, then choose Create ontology. Under this policy a breaking change needs a new major version.
#/o/<ontology_id>. Copy that ID into your shell:2
Import logical resources
Describe a The link type is a logical definition, not only a Registry relationship. It has its own stable identity, endpoint types, two-sided cardinality, inverse name, version history, and optional properties.Preview the document. A preview validates the proposal and never changes the ontology:When Apply recomputes the preview, refuses a request whose document or options changed since the preview, and creates every proposed resource in one Registry transaction, or none of them. It creates drafts; it does not publish a release. A document above 100 resources, or one resource that needs too many reference rewrites, stays previewable but cannot be applied in one request. A document can be at most 8 MiB, and an RDF, OWL, or SKOS import also needs
Customer object, a SupportCase object, and a typed link between them as a native JSON document. Property value schemas stay inside their owning object because they share its lifecycle. Each artifact_id is a placeholder: on apply, the link’s source and target references are rewritten to the drafts created in the same transaction.is_valid and apply_supported are both true, apply the unchanged request with the returned preview_id:profile and base_iri; see Import preview returns 422. If the preview is not valid, see Import preview has is_valid: false.3
Validate and publish release
Pin the exact drafts to publish. The apply response’s Keep this manifest with the change under review. Validate the complete graph before assigning a release number:Publish only when Publication appends the canonical graph to the stable
artifacts are the created drafts, each with its ID, version ordinal, and content hash. Publication never resolves latest separately for each resource, so if a pinned draft changes before you publish, the request fails instead of publishing a different model.is_valid is true. If publication rejects a draft that validated, see Publish rejects pinned draft.ontology artifact, then releases that exact version through Core Registry. The release ID has the rel_... form, and reading it later does not depend on draft heads.4
Retrieve bounded agent context
An agent usually needs a relevant subgraph, not the whole release. Query one exact release with explicit resource, traversal-depth, and token bounds:Each returned resource includes For the full input contract and limits, see Get bounded ontology context.To ask a structural question instead, compile a bounded, read-only SPARQL The planner resolves ontology identifiers and returns logical operations. A bounded basic-graph-pattern subset can also return bindings from ontology metadata. Queries over business records stay planning-only and set
selected_because and depth. Check truncated and refinement_hints before treating the response as enough for the task. The service filters search candidates to the selected release and expands typed dependencies without mixing in newer drafts.An MCP client reaches the same operation as extension__ontology__get_context:SELECT query against the same release:requires_bindings: true: this operation does not read instances, resolve physical bindings, or emit SQL. An MCP client runs it with extension__ontology__get_query_plan.To look up governed records such as policies and controls in Studio, open the Agent context page, choose the Ask tab, choose Knowledge records, and pick a release. Enter keywords in Record search terms, or leave it empty to list the applicable records. Set Valid as of to the business time you care about, then choose Ask. Studio returns records as evidence, not a generated answer: only records pinned to the selected release, at their current versions rather than a frozen record-set snapshot, 20 at a time. Each record card lists its governed fields, typed relationships, and supporting documents.Studio reads Knowledge records through MCP and has no REST fallback. If the MCP surface is not enabled on your deployment, or the Ontology tools are not installed, Studio shows an error instead of records.5
Verify release
Read the published schema back by its release ID:Before handing the release to an agent or another service, confirm that:Core Registry holds the generic lifecycle and channel pointers:Superseded releases stay readable by exact ID. A withdrawn release stays in history but is no longer a selectable distribution target.
- The validation response had
is_valid: trueand no error diagnostics. - The published
manifest_digestmatches schema reads and context responses. - Context retrieval names the intended
release_idand stays within its bounds. truncatedisfalse, or the caller follows the returned refinement hints.
6
Export release (optional)
To hand the model to an RDF or OWL tool, list the available adapter versions, then export the release through the documented OWL subset:The This example previews the export of drafts you already imported. Apply derives each draft’s Registry name from its
document field contains Turtle. The report states every approximation, omission, or unsupported construct, so confirm the consumer accepts that profile and loss report. OWL and RDF are interchange formats over the native model; they do not change Registry storage or validation.Importing an OWL or RDF document works like the native import: preview it, then apply the unchanged request with its preview_id. A preview never changes the ontology, and adapters never fetch remote imports.api_name and ontology, so applying it to the same ontology fails with a uniqueness conflict. To copy the model instead, set ontology_id to a different ontology, in this workspace or another one you can write to; the document needs no edits. Apply creates new drafts with fresh IDs, rewrites the references between them, and keeps each resource’s canonical IRI, name, and description. For RDF and OWL, use the same adapter options as the export. Bindings, record sets, and releases are not copied. An MCP client can run Export ontology release and Preview ontology import.Manage ontology in Studio
Ontology Studio also manages ontologies after you publish:- Ontology list: Search All ontologies by name, API name, or description, filter by release status (All, Published, Not published), and sort by name, latest release, or last edit. The last-edited time counts edits to the ontology’s definitions, not only the ontology itself.
- Graph: The Graph page draws object types as cards and links as lines, each labelled with its verb, with line ends that show cardinality. A large model opens on Domains: groups of closely linked types, found from the links and named after their two best-connected types. Open a domain to see its types, or choose All domains to go back. Types shows the type cards, and Focus shows one type with its sources on the left and its targets on the right. When an ontology has both model definitions and terminology, choose Model, Terminology, or Model + terms to set what the graph shows; it opens on Model. To focus a resource, search Find a type, link or property and pick a result.
- Release page: Each published release has its own page. Ask this release and Query this release open the context and query views for that exact release, the Export tab exports it, and Built on this release shows the binding families pinned to it and the record set it governs.
- Settings: Rename the ontology or change its description at any time. Its namespace and versioning policy are fixed once a release exists, so every release reads under the same rules. Archive ontology hides the ontology from lists for everyone in the workspace and keeps its definitions and release history. Archiving takes admin permission on the workspace: if your role lets you create and edit the ontology but not archive it, the Archive button is unavailable and Studio explains who can archive it for you. Studio asks you to type the ontology’s API name to confirm.
- Unsaved changes: While you edit a resource, a bar stays in view and shows how many changes are unsaved. If the draft cannot save yet, the bar names what to fix: a field with an error, or JSON edits to apply or discard first. Choose Save draft, press ⌘S or Ctrl+S, or choose Discard.
- Diagnostics: A validation diagnostic that names a property links to it in the resource it belongs to.
Troubleshooting
If an import or validation is not valid, apply is refused or conflicts, publication rejects a pinned draft, or context comes back truncated, see Ontology errors.Next steps
- Publish bindings through the API: Bind this release to tables, columns, and governed joins.
See also
- Public API: Released request, response, and problem contracts.
- MCP reference: Connect an agent host and inspect the Ontology tools.