curl --request POST \
--url http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull \
--header 'x-api-key: <api-key>'import requests
url = "http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"kind": "dataQuality",
"instruction": "<string>",
"script": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"model": "<string>",
"modelIsCurrent": true,
"status": "ready",
"pendingReason": "<string>",
"origin": "save",
"storage": "<string>",
"repoPath": "<string>",
"commitSha": "<string>",
"drift": true,
"headSha": "<string>",
"conflict": true,
"conflictReason": "<string>"
}Adopt a CodeGen script edited in the code repository
For a script stored in the code repository: records the commit at the head of the configured branch (origin repository), so later runs execute the file as it is in the repository now. No commit is made. Later saves keep the adopted script while the instruction and source schema are unchanged. Requires pipeline:create. Audited.
curl --request POST \
--url http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull \
--header 'x-api-key: <api-key>'import requests
url = "http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/pull")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"kind": "dataQuality",
"instruction": "<string>",
"script": "<string>",
"generatedAt": "2023-11-07T05:31:56Z",
"model": "<string>",
"modelIsCurrent": true,
"status": "ready",
"pendingReason": "<string>",
"origin": "save",
"storage": "<string>",
"repoPath": "<string>",
"commitSha": "<string>",
"drift": true,
"headSha": "<string>",
"conflict": true,
"conflictReason": "<string>"
}Authorizations
Optional API key for authentication (enabled via application.yaml)
Path Parameters
dataQuality, transformation Response
The script entry, now pinned to the head commit
A stored CodeGen script (AI data-quality rule or AI transformation).
dataQuality, transformation The CodeGen model that wrote the script.
False when the CodeGen model setting has changed since.
ready, pending How the current script was recorded. repository means an edit made in the code repository was adopted with the pull endpoint.
save, run, regenerate, repository Script store: minio for the built-in object store, github for the configured code repository.
Code repository only. Path of the script file on the configured branch: <pathPrefix>pipelines/<pipeline>/data-quality.py or .../transformation.py.
Code repository only. The commit every run executes.
True when the file at the head of the configured branch differs from the recorded commit (it was edited in the repository). Runs keep using the recorded commit until the edit is pulled. Always false for built-in storage.
Present when drift is true. The branch-head commit the pull endpoint would record.
True while a new script was not committed because the file was edited in the code repository since the recorded commit. Runs keep executing the recorded commit, without the new instruction or schema and with no model call, until the edit is pulled or the script is regenerated with overwrite=true. Present when the script has a record.
Present when conflict is true. The warning the save or regenerate returned.
