Create a Brain ingestion pipeline
curl --request POST \
--url https://app.hookie.ai/admin/api/data-workspace/pipelines \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"sources": [
{
"type": "project_dataset",
"project_id": "<string>",
"dataset": "<string>"
}
],
"target": {
"type": "table",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"description": "<string>",
"enabled": true,
"steps": [
{
"type": "filter",
"path": "<string>",
"value": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
sources: [{type: 'project_dataset', project_id: '<string>', dataset: '<string>'}],
target: {type: 'table', table_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
description: '<string>',
enabled: true,
steps: [{type: 'filter', path: '<string>', value: '<string>'}]
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/pipelines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/pipelines"
payload = {
"name": "<string>",
"sources": [
{
"type": "project_dataset",
"project_id": "<string>",
"dataset": "<string>"
}
],
"target": {
"type": "table",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"description": "<string>",
"enabled": True,
"steps": [
{
"type": "filter",
"path": "<string>",
"value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Data workspace
Create a Brain ingestion pipeline
Requires write access. A table pipeline reads project_dataset sources, applies optional filter steps and exactly one final map step, and writes to a workspace table. A documents pipeline reads upload and S3 sources and applies content_types and chunk steps. Definitions never carry credentials. Pipelines start disabled unless enabled is true; at most 50 per workspace.
POST
/
admin
/
api
/
data-workspace
/
pipelines
Create a Brain ingestion pipeline
curl --request POST \
--url https://app.hookie.ai/admin/api/data-workspace/pipelines \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"sources": [
{
"type": "project_dataset",
"project_id": "<string>",
"dataset": "<string>"
}
],
"target": {
"type": "table",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"description": "<string>",
"enabled": true,
"steps": [
{
"type": "filter",
"path": "<string>",
"value": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
sources: [{type: 'project_dataset', project_id: '<string>', dataset: '<string>'}],
target: {type: 'table', table_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
description: '<string>',
enabled: true,
steps: [{type: 'filter', path: '<string>', value: '<string>'}]
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/pipelines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/pipelines"
payload = {
"name": "<string>",
"sources": [
{
"type": "project_dataset",
"project_id": "<string>",
"dataset": "<string>"
}
],
"target": {
"type": "table",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"description": "<string>",
"enabled": True,
"steps": [
{
"type": "filter",
"path": "<string>",
"value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}Body
application/json
Response
Created
The response is of type object.