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",
"version": 123,
"fingerprint": "<string>",
"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. The adopted file is a new version in the script’s history. Requires pipeline:update. 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",
"version": 123,
"fingerprint": "<string>",
"storage": "<string>",
"repoPath": "<string>",
"commitSha": "<string>",
"drift": true,
"headSha": "<string>",
"conflict": true,
"conflictReason": "<string>"
}Authorizations
Path Parameters
Response
The script entry, now pinned to the head commit
A stored CodeGen script (AI data-quality rule or AI transformation).
How the current script was recorded. repository means an edit made in the code repository was adopted with the pull endpoint; restore means it was imported from a catalog archive; restore-version means an earlier script version was restored.
save, run, regenerate, repository, restore, restore-version 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.
