Update pipeline
Updates an existing pipeline. Only provided fields are updated.
curl --request PATCH \
--url https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/ \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": null,
"tags": []
}
},
"policySlugs": [
"<string>"
]
},
"description": "<string>",
"displayName": "<string>",
"retention": {
"auditLogs": {
"mode": "forever"
},
"redactedDocuments": {
"mode": "forever"
}
},
"status": "draft"
}
'import requests
url = "https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/"
payload = {
"definition": {
"defaultScope": {
"countries": ["<string>"],
"languages": [],
"metadata": {
"audience": [],
"purpose": None,
"tags": []
}
},
"policySlugs": ["<string>"]
},
"description": "<string>",
"displayName": "<string>",
"retention": {
"auditLogs": { "mode": "forever" },
"redactedDocuments": { "mode": "forever" }
},
"status": "draft"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
definition: {
defaultScope: {
countries: ['<string>'],
languages: [],
metadata: {audience: [], purpose: null, tags: []}
},
policySlugs: ['<string>']
},
description: '<string>',
displayName: '<string>',
retention: {auditLogs: {mode: 'forever'}, redactedDocuments: {mode: 'forever'}},
status: 'draft'
})
};
fetch('https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/', 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/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'definition' => [
'defaultScope' => [
'countries' => [
'<string>'
],
'languages' => [
],
'metadata' => [
'audience' => [
],
'purpose' => null,
'tags' => [
]
]
],
'policySlugs' => [
'<string>'
]
],
'description' => '<string>',
'displayName' => '<string>',
'retention' => [
'auditLogs' => [
'mode' => 'forever'
],
'redactedDocuments' => [
'mode' => 'forever'
]
],
'status' => 'draft'
]),
CURLOPT_HTTPHEADER => [
"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/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/"
payload := strings.NewReader("{\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": null,\n \"tags\": []\n }\n },\n \"policySlugs\": [\n \"<string>\"\n ]\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"forever\"\n },\n \"redactedDocuments\": {\n \"mode\": \"forever\"\n }\n },\n \"status\": \"draft\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/")
.header("Content-Type", "application/json")
.body("{\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": null,\n \"tags\": []\n }\n },\n \"policySlugs\": [\n \"<string>\"\n ]\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"forever\"\n },\n \"redactedDocuments\": {\n \"mode\": \"forever\"\n }\n },\n \"status\": \"draft\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": null,\n \"tags\": []\n }\n },\n \"policySlugs\": [\n \"<string>\"\n ]\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"forever\"\n },\n \"redactedDocuments\": {\n \"mode\": \"forever\"\n }\n },\n \"status\": \"draft\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"username": "<string>",
"avatarUrl": "<string>",
"displayName": "<string>"
},
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": null,
"tags": []
}
},
"policySlugs": [
"<string>"
]
},
"displayName": "<string>",
"slug": "<string>",
"status": "draft",
"updatedAt": "2023-11-07T05:31:56Z",
"workspaceSlug": "<string>",
"description": "<string>",
"retention": {
"auditLogs": {
"mode": "forever"
},
"redactedDocuments": {
"mode": "forever"
}
}
}{
"message": "<string>",
"name": "<string>",
"resource": "<string>",
"suggestion": "<string>",
"validation": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"params": {}
}
]
}{
"message": "<string>",
"name": "<string>",
"resource": "<string>",
"suggestion": "<string>",
"validation": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"params": {}
}
]
}{
"message": "<string>",
"name": "<string>",
"resource": "<string>",
"suggestion": "<string>",
"validation": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"params": {}
}
]
}{
"message": "<string>",
"name": "<string>",
"resource": "<string>",
"suggestion": "<string>",
"validation": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"params": {}
}
]
}"<string>""<string>"Path Parameters
URL-safe workspace identifier.
URL slug of the pipeline, unique within its workspace.
Body
Request payload to update an existing pipeline.
All fields are optional; only provided fields will be updated. Supplying a
definition replaces the whole detection + redaction configuration.
Request payload to update an existing pipeline.
All fields are optional; only provided fields will be updated. Supplying a
definition replaces the whole detection + redaction configuration.
New detection + redaction configuration (replaces the whole definition).
Show child attributes
Show child attributes
New description for the pipeline (max 500 characters).
500New display name for the pipeline (2-128 characters).
2 - 128Replacement per-scope data-retention override. When omitted, the pipeline's retention override is left unchanged.
Show child attributes
Show child attributes
New status for the pipeline.
"draft"Response
Pipeline response.
Pipeline response.
Timestamp when the pipeline was created.
Account that created this pipeline.
Show child attributes
Show child attributes
Detection + redaction configuration.
Show child attributes
Show child attributes
Pipeline display name.
URL slug of the pipeline, unique within its workspace.
3 - 32^[a-z0-9]+(?:-[a-z0-9]+)*$Pipeline lifecycle status.
"draft"Timestamp when the pipeline was last updated.
Handle of the workspace this pipeline belongs to.
3 - 32^[a-z0-9]+(?:-[a-z0-9]+)*$Pipeline description.
Per-scope data-retention override, when the pipeline sets one.
Show child attributes
Show child attributes
curl --request PATCH \
--url https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/ \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": null,
"tags": []
}
},
"policySlugs": [
"<string>"
]
},
"description": "<string>",
"displayName": "<string>",
"retention": {
"auditLogs": {
"mode": "forever"
},
"redactedDocuments": {
"mode": "forever"
}
},
"status": "draft"
}
'import requests
url = "https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/"
payload = {
"definition": {
"defaultScope": {
"countries": ["<string>"],
"languages": [],
"metadata": {
"audience": [],
"purpose": None,
"tags": []
}
},
"policySlugs": ["<string>"]
},
"description": "<string>",
"displayName": "<string>",
"retention": {
"auditLogs": { "mode": "forever" },
"redactedDocuments": { "mode": "forever" }
},
"status": "draft"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
definition: {
defaultScope: {
countries: ['<string>'],
languages: [],
metadata: {audience: [], purpose: null, tags: []}
},
policySlugs: ['<string>']
},
description: '<string>',
displayName: '<string>',
retention: {auditLogs: {mode: 'forever'}, redactedDocuments: {mode: 'forever'}},
status: 'draft'
})
};
fetch('https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/', 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/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'definition' => [
'defaultScope' => [
'countries' => [
'<string>'
],
'languages' => [
],
'metadata' => [
'audience' => [
],
'purpose' => null,
'tags' => [
]
]
],
'policySlugs' => [
'<string>'
]
],
'description' => '<string>',
'displayName' => '<string>',
'retention' => [
'auditLogs' => [
'mode' => 'forever'
],
'redactedDocuments' => [
'mode' => 'forever'
]
],
'status' => 'draft'
]),
CURLOPT_HTTPHEADER => [
"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/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/"
payload := strings.NewReader("{\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": null,\n \"tags\": []\n }\n },\n \"policySlugs\": [\n \"<string>\"\n ]\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"forever\"\n },\n \"redactedDocuments\": {\n \"mode\": \"forever\"\n }\n },\n \"status\": \"draft\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/")
.header("Content-Type", "application/json")
.body("{\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": null,\n \"tags\": []\n }\n },\n \"policySlugs\": [\n \"<string>\"\n ]\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"forever\"\n },\n \"redactedDocuments\": {\n \"mode\": \"forever\"\n }\n },\n \"status\": \"draft\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/workspaces/{workspaceSlug}/pipelines/{pipelineSlug}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": null,\n \"tags\": []\n }\n },\n \"policySlugs\": [\n \"<string>\"\n ]\n },\n \"description\": \"<string>\",\n \"displayName\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"forever\"\n },\n \"redactedDocuments\": {\n \"mode\": \"forever\"\n }\n },\n \"status\": \"draft\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"username": "<string>",
"avatarUrl": "<string>",
"displayName": "<string>"
},
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": null,
"tags": []
}
},
"policySlugs": [
"<string>"
]
},
"displayName": "<string>",
"slug": "<string>",
"status": "draft",
"updatedAt": "2023-11-07T05:31:56Z",
"workspaceSlug": "<string>",
"description": "<string>",
"retention": {
"auditLogs": {
"mode": "forever"
},
"redactedDocuments": {
"mode": "forever"
}
}
}{
"message": "<string>",
"name": "<string>",
"resource": "<string>",
"suggestion": "<string>",
"validation": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"params": {}
}
]
}{
"message": "<string>",
"name": "<string>",
"resource": "<string>",
"suggestion": "<string>",
"validation": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"params": {}
}
]
}{
"message": "<string>",
"name": "<string>",
"resource": "<string>",
"suggestion": "<string>",
"validation": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"params": {}
}
]
}{
"message": "<string>",
"name": "<string>",
"resource": "<string>",
"suggestion": "<string>",
"validation": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"params": {}
}
]
}"<string>""<string>"