Publish to the catalog
curl --request POST \
--url https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accept_drift": false
}
'import requests
url = "https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish"
payload = { "accept_drift": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accept_drift: false})
};
fetch('https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accept_drift' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish"
payload := strings.NewReader("{\n \"accept_drift\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accept_drift\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accept_drift\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"catalog": "<string>",
"status": "published",
"published_by": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"counts": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}Ontologies
Publish to the catalog
Write an approved Global version into the data catalog, adding and updating, never rebuilding. Registry admins only. Catalog edits made outside the registry refuse it (409) unless accept_drift is set.
POST
/
api
/
registry
/
ontologies
/
{artifact_id}
/
versions
/
{version_id}
/
publish
Publish to the catalog
curl --request POST \
--url https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accept_drift": false
}
'import requests
url = "https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish"
payload = { "accept_drift": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accept_drift: false})
};
fetch('https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accept_drift' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish"
payload := strings.NewReader("{\n \"accept_drift\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accept_drift\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/registry/ontologies/{artifact_id}/versions/{version_id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accept_drift\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"catalog": "<string>",
"status": "published",
"published_by": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"counts": {},
"errors": [
"<string>"
]
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}Authorizations
OAuth2AuthorizationCodeBearerAPIKeyHeader
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The ontology's artifact ID.
The version's ID.
Body
application/json
Publish an approved Global version to the catalog.
Overwrite catalog edits made since the last publish. Without it, drift refuses the publish (409).
Response
Successful Response
One publish of a version to the catalog.
Available options:
published, partial, failed Show child attributes
Show child attributes
Was this page helpful?

