Connect a read-only database
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/databases \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"connection_string": "<string>",
"schemas": [
"<string>"
],
"masked_columns": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
connection_string: '<string>',
schemas: ['<string>'],
masked_columns: ['<string>']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/databases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/databases"
payload = {
"name": "<string>",
"connection_string": "<string>",
"schemas": ["<string>"],
"masked_columns": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}{}Projects
Connect a read-only database
Connects a PostgreSQL database for the project’s agents to read. The login is checked first and refused if it holds any write privilege (superuser, CREATE, INSERT/UPDATE/DELETE/TRUNCATE on a table, pg_write_all_data, …). Team and Ultimate; a project or workspace admin, and a person: connected agents are refused.
POST
/
admin
/
api
/
projects
/
{project_id}
/
databases
Connect a read-only database
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/databases \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"connection_string": "<string>",
"schemas": [
"<string>"
],
"masked_columns": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
connection_string: '<string>',
schemas: ['<string>'],
masked_columns: ['<string>']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/databases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/databases"
payload = {
"name": "<string>",
"connection_string": "<string>",
"schemas": ["<string>"],
"masked_columns": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}{}Path Parameters
Body
application/json
Response
Successful operation
The response is of type object.