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/{workspaceSlug}/pipelines/ \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"slug": "<string>",
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": null,
"tags": []
}
},
"policySlugs": [
"<string>"
]
},
"description": "<string>",
"retention": {
"auditLogs": {
"mode": "forever"
},
"redactedDocuments": {
"mode": "forever"
}
},
"status": "draft"
}
'import requests
url = "https://api.example.com/workspaces/{workspaceSlug}/pipelines/"
payload = {
"displayName": "<string>",
"slug": "<string>",
"definition": {
"defaultScope": {
"countries": ["<string>"],
"languages": [],
"metadata": {
"audience": [],
"purpose": None,
"tags": []
}
},
"policySlugs": ["<string>"]
},
"description": "<string>",
"retention": {
"auditLogs": { "mode": "forever" },
"redactedDocuments": { "mode": "forever" }
},
"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>',
slug: '<string>',
definition: {
defaultScope: {
countries: ['<string>'],
languages: [],
metadata: {audience: [], purpose: null, tags: []}
},
policySlugs: ['<string>']
},
description: '<string>',
retention: {auditLogs: {mode: 'forever'}, redactedDocuments: {mode: 'forever'}},
status: 'draft'
})
};
fetch('https://api.example.com/workspaces/{workspaceSlug}/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/{workspaceSlug}/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>',
'slug' => '<string>',
'definition' => [
'defaultScope' => [
'countries' => [
'<string>'
],
'languages' => [
],
'metadata' => [
'audience' => [
],
'purpose' => null,
'tags' => [
]
]
],
'policySlugs' => [
'<string>'
]
],
'description' => '<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/"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"slug\": \"<string>\",\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 \"retention\": {\n \"auditLogs\": {\n \"mode\": \"forever\"\n },\n \"redactedDocuments\": {\n \"mode\": \"forever\"\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/{workspaceSlug}/pipelines/")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"slug\": \"<string>\",\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 \"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/")
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 \"slug\": \"<string>\",\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 \"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": {}
}
]
}"<string>""<string>"Path Parameters
URL-safe 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 - 128URL slug, unique within the workspace and immutable after creation.
3 - 32^[a-z0-9]+(?:-[a-z0-9]+)*$Optional 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
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 POST \
--url https://api.example.com/workspaces/{workspaceSlug}/pipelines/ \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"slug": "<string>",
"definition": {
"defaultScope": {
"countries": [
"<string>"
],
"languages": [],
"metadata": {
"audience": [],
"purpose": null,
"tags": []
}
},
"policySlugs": [
"<string>"
]
},
"description": "<string>",
"retention": {
"auditLogs": {
"mode": "forever"
},
"redactedDocuments": {
"mode": "forever"
}
},
"status": "draft"
}
'import requests
url = "https://api.example.com/workspaces/{workspaceSlug}/pipelines/"
payload = {
"displayName": "<string>",
"slug": "<string>",
"definition": {
"defaultScope": {
"countries": ["<string>"],
"languages": [],
"metadata": {
"audience": [],
"purpose": None,
"tags": []
}
},
"policySlugs": ["<string>"]
},
"description": "<string>",
"retention": {
"auditLogs": { "mode": "forever" },
"redactedDocuments": { "mode": "forever" }
},
"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>',
slug: '<string>',
definition: {
defaultScope: {
countries: ['<string>'],
languages: [],
metadata: {audience: [], purpose: null, tags: []}
},
policySlugs: ['<string>']
},
description: '<string>',
retention: {auditLogs: {mode: 'forever'}, redactedDocuments: {mode: 'forever'}},
status: 'draft'
})
};
fetch('https://api.example.com/workspaces/{workspaceSlug}/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/{workspaceSlug}/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>',
'slug' => '<string>',
'definition' => [
'defaultScope' => [
'countries' => [
'<string>'
],
'languages' => [
],
'metadata' => [
'audience' => [
],
'purpose' => null,
'tags' => [
]
]
],
'policySlugs' => [
'<string>'
]
],
'description' => '<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/"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"slug\": \"<string>\",\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 \"retention\": {\n \"auditLogs\": {\n \"mode\": \"forever\"\n },\n \"redactedDocuments\": {\n \"mode\": \"forever\"\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/{workspaceSlug}/pipelines/")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"slug\": \"<string>\",\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 \"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/")
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 \"slug\": \"<string>\",\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 \"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": {}
}
]
}"<string>""<string>"