Create pipeline
Creates a new pipeline in the workspace. The creator is set as the owner.
curl --request POST \
--url https://api.example.com/workspaces/{workspaceId}/pipelines \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": "<string>",
"tags": []
}
},
"policyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"description": "<string>",
"retention": {
"auditLogs": {
"mode": "persistent"
},
"intermediates": {
"mode": "persistent"
},
"redactedDocuments": {
"mode": "persistent"
}
},
"status": "draft"
}
'import requests
url = "https://api.example.com/workspaces/{workspaceId}/pipelines"
payload = {
"displayName": "<string>",
"definition": {
"defaultScope": {
"countries": ["<string>"],
"languages": [],
"metadata": {
"audience": [],
"purpose": "<string>",
"tags": []
}
},
"policyIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
},
"description": "<string>",
"retention": {
"auditLogs": { "mode": "persistent" },
"intermediates": { "mode": "persistent" },
"redactedDocuments": { "mode": "persistent" }
},
"status": "draft"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
displayName: '<string>',
definition: {
defaultScope: {
countries: ['<string>'],
languages: [],
metadata: {audience: [], purpose: '<string>', tags: []}
},
policyIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
},
description: '<string>',
retention: {
auditLogs: {mode: 'persistent'},
intermediates: {mode: 'persistent'},
redactedDocuments: {mode: 'persistent'}
},
status: 'draft'
})
};
fetch('https://api.example.com/workspaces/{workspaceId}/pipelines', 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/{workspaceId}/pipelines",
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([
'displayName' => '<string>',
'definition' => [
'defaultScope' => [
'countries' => [
'<string>'
],
'languages' => [
],
'metadata' => [
'audience' => [
],
'purpose' => '<string>',
'tags' => [
]
]
],
'policyIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'description' => '<string>',
'retention' => [
'auditLogs' => [
'mode' => 'persistent'
],
'intermediates' => [
'mode' => 'persistent'
],
'redactedDocuments' => [
'mode' => 'persistent'
]
],
'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/{workspaceId}/pipelines"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": \"<string>\",\n \"tags\": []\n }\n },\n \"policyIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"persistent\"\n },\n \"intermediates\": {\n \"mode\": \"persistent\"\n },\n \"redactedDocuments\": {\n \"mode\": \"persistent\"\n }\n },\n \"status\": \"draft\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/workspaces/{workspaceId}/pipelines")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": \"<string>\",\n \"tags\": []\n }\n },\n \"policyIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"persistent\"\n },\n \"intermediates\": {\n \"mode\": \"persistent\"\n },\n \"redactedDocuments\": {\n \"mode\": \"persistent\"\n }\n },\n \"status\": \"draft\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/workspaces/{workspaceId}/pipelines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\",\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": \"<string>\",\n \"tags\": []\n }\n },\n \"policyIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"persistent\"\n },\n \"intermediates\": {\n \"mode\": \"persistent\"\n },\n \"redactedDocuments\": {\n \"mode\": \"persistent\"\n }\n },\n \"status\": \"draft\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"avatarUrl": "<string>",
"displayName": "<string>"
},
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": "<string>",
"tags": []
}
},
"policyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"displayName": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"updatedAt": "2023-11-07T05:31:56Z",
"workspaceHandle": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"retention": {
"auditLogs": {
"mode": "persistent"
},
"intermediates": {
"mode": "persistent"
},
"redactedDocuments": {
"mode": "persistent"
}
}
}{
"message": "<string>",
"name": "<string>"
}{
"message": "<string>",
"name": "<string>"
}{
"message": "<string>",
"name": "<string>"
}<string><string>Path Parameters
Workspace identifier.
Body
Request payload for creating a new pipeline.
Creates a new pipeline with the specified name and optional description. The definition can be added later via update.
Request payload for creating a new pipeline.
Creates a new pipeline with the specified name and optional description. The definition can be added later via update.
Pipeline display name (2-128 characters).
2 - 128Optional detection + redaction configuration. Defaults to an empty definition that can be filled in via update.
Show child attributes
Show child attributes
Optional description of the pipeline (max 500 characters).
500Optional per-scope data-retention override for this pipeline. Each unset scope inherits the workspace retention.
Show child attributes
Show child attributes
Optional lifecycle status. Defaults to draft; pass enabled to create a
pipeline ready to run without a follow-up update.
"draft"Response
WorkspacePipeline response.
WorkspacePipeline 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
WorkspacePipeline display name.
Unique identifier of the pipeline.
WorkspacePipeline lifecycle status.
"draft"Timestamp when the pipeline was last updated.
URL-safe workspace handle. Display-only.
3 - 32^[a-z0-9]+(?:-[a-z0-9]+)*$Unique identifier of the workspace.
WorkspacePipeline description.
Per-scope data-retention override, when the pipeline sets one.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.example.com/workspaces/{workspaceId}/pipelines \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": "<string>",
"tags": []
}
},
"policyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"description": "<string>",
"retention": {
"auditLogs": {
"mode": "persistent"
},
"intermediates": {
"mode": "persistent"
},
"redactedDocuments": {
"mode": "persistent"
}
},
"status": "draft"
}
'import requests
url = "https://api.example.com/workspaces/{workspaceId}/pipelines"
payload = {
"displayName": "<string>",
"definition": {
"defaultScope": {
"countries": ["<string>"],
"languages": [],
"metadata": {
"audience": [],
"purpose": "<string>",
"tags": []
}
},
"policyIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
},
"description": "<string>",
"retention": {
"auditLogs": { "mode": "persistent" },
"intermediates": { "mode": "persistent" },
"redactedDocuments": { "mode": "persistent" }
},
"status": "draft"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
displayName: '<string>',
definition: {
defaultScope: {
countries: ['<string>'],
languages: [],
metadata: {audience: [], purpose: '<string>', tags: []}
},
policyIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
},
description: '<string>',
retention: {
auditLogs: {mode: 'persistent'},
intermediates: {mode: 'persistent'},
redactedDocuments: {mode: 'persistent'}
},
status: 'draft'
})
};
fetch('https://api.example.com/workspaces/{workspaceId}/pipelines', 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/{workspaceId}/pipelines",
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([
'displayName' => '<string>',
'definition' => [
'defaultScope' => [
'countries' => [
'<string>'
],
'languages' => [
],
'metadata' => [
'audience' => [
],
'purpose' => '<string>',
'tags' => [
]
]
],
'policyIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'description' => '<string>',
'retention' => [
'auditLogs' => [
'mode' => 'persistent'
],
'intermediates' => [
'mode' => 'persistent'
],
'redactedDocuments' => [
'mode' => 'persistent'
]
],
'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/{workspaceId}/pipelines"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": \"<string>\",\n \"tags\": []\n }\n },\n \"policyIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"persistent\"\n },\n \"intermediates\": {\n \"mode\": \"persistent\"\n },\n \"redactedDocuments\": {\n \"mode\": \"persistent\"\n }\n },\n \"status\": \"draft\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/workspaces/{workspaceId}/pipelines")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": \"<string>\",\n \"tags\": []\n }\n },\n \"policyIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"persistent\"\n },\n \"intermediates\": {\n \"mode\": \"persistent\"\n },\n \"redactedDocuments\": {\n \"mode\": \"persistent\"\n }\n },\n \"status\": \"draft\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/workspaces/{workspaceId}/pipelines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\",\n \"definition\": {\n \"defaultScope\": {\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [],\n \"metadata\": {\n \"audience\": [],\n \"purpose\": \"<string>\",\n \"tags\": []\n }\n },\n \"policyIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"<string>\",\n \"retention\": {\n \"auditLogs\": {\n \"mode\": \"persistent\"\n },\n \"intermediates\": {\n \"mode\": \"persistent\"\n },\n \"redactedDocuments\": {\n \"mode\": \"persistent\"\n }\n },\n \"status\": \"draft\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "<string>",
"avatarUrl": "<string>",
"displayName": "<string>"
},
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": "<string>",
"tags": []
}
},
"policyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"displayName": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"updatedAt": "2023-11-07T05:31:56Z",
"workspaceHandle": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"retention": {
"auditLogs": {
"mode": "persistent"
},
"intermediates": {
"mode": "persistent"
},
"redactedDocuments": {
"mode": "persistent"
}
}
}{
"message": "<string>",
"name": "<string>"
}{
"message": "<string>",
"name": "<string>"
}{
"message": "<string>",
"name": "<string>"
}<string><string>