curl --request POST \
--url http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/regenerate \
--header 'x-api-key: <api-key>'import requests
url = "http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/regenerate"
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}/regenerate', 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}/regenerate",
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}/regenerate"
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}/regenerate")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/regenerate")
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>"
}Force a new CodeGen script
Generates a new script for kind now, from the source schema, with the current CodeGen model, and replaces the stored one. If generation fails the error is returned (502) and the current script stays in place. For a JSON or XML pipeline the script is marked pending and the next run generates it from its data. The script stays in its current store unless storage asks for another; the old copy is left in place. A repository-backed script whose file was edited in the repository since the recorded commit is not overwritten (409) unless overwrite=true. Requires pipeline:create. Audited.
curl --request POST \
--url http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/regenerate \
--header 'x-api-key: <api-key>'import requests
url = "http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/regenerate"
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}/regenerate', 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}/regenerate",
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}/regenerate"
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}/regenerate")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/pipelines/{name}/codegen-scripts/{kind}/regenerate")
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 Query Parameters
Move the script: github (the configured code repository) or builtin (the built-in object store). Default: its current store.
github, builtin Replace a repository file that was edited since the recorded commit. The edit stays in the repository history.
Response
The new script entry
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.
