Skip to main content
POST
/
v1
/
beta
/
file_connector
cURL
curl --request POST \
  --url https://trytako.com/api/v1/beta/file_connector \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "file_id": "<string>",
  "file_url": "<string>",
  "source": "<string>",
  "file_context": "<string>",
  "prepend_schema_context": true,
  "segment_id": "<string>",
  "connected_private_index_id": "<string>",
  "generate_ontology": true,
  "link_world_ontology": true
}'
{
  "message": "<string>",
  "id": "<string>",
  "metadata": {
    "id": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "source": "<string>",
    "schema_id": "<string>",
    "file_context": "<string>",
    "prepend_schema_context": true,
    "segment_id": "<string>",
    "ontology_state": "<string>"
  }
}

Notes

  • To authenticate, you’ll need a Tako API key. It’s best practice to store it as an environment variable to avoid hardcoding sensitive credentials in your code.
  • Supported file formats: .csv, .xls, .xlsx, .parquet
  • File size is limited to 5MB currently
  • When you connect a file, Tako will download and store a copy of the file on its platform for analysis and visualization.
If the original file is updated, call the file_connector endpoint again with the same file_id and updated file_url to propagate changes to Tako.

Authorizations

X-API-Key
string
header
required

Body

application/json
file_url
string
required

URL of the file to connect to

file_id
string | null

ID of the file to connect to. If not provided, a new file ID will be generated

source
string | null

Source of the file to connect to

file_context
string | null

Context of the file as a freeform string. This is used to help Tako understand the file.

prepend_schema_context
boolean | null
default:true

Whether to prepend the schema context to the dataset context

segment_id
string | null

ID of the segment of the source index to connect to.

connected_private_index_id
string | null

ID of the connected private index to connect to.

generate_ontology
boolean | null
default:true

Whether to generate or update the ontology for this file.

Whether to link the private index ontology with the world ontology through deduplication.

Response

200 - application/json

File connector ID

message
string
required

Message indicating the result of the file connector operation

id
string
required

ID of the file that was created or connected to

metadata
object
required

Metadata of the file that was created or connected to