Managing Connections
You can manage your connections via the API. Start by listing your connections to get their id's. After that, you can use the id to take action on each connection: disabling it, updating the metadata, etc.
List connections
See a list of all the connections you currently have.
curl https://api.ragie.ai/connections -H "Authorization: Bearer $RAGIE_API_KEY"
Enable/disable connection
Enable or disable the connection. Disabled connections stop syncing.
curl https://api.ragie.ai/connections/{connection_id}/enabled \
--request PUT \
-H "Authorization: Bearer $RAGIE_API_KEY" \
--json '{"enabled": "false"}'
Update a connection
Update a connection's partition_strategy
or metadata
. The connection's documents will be updated to reflect these changes on their next sync.
curl https://api.ragie.ai/connections/{connection_id} \
--request PUT \
-H "Authorization: Bearer $RAGIE_API_KEY" \
--json '{ "partition_strategy": "hi_res", "metadata": {"source": "google_drive"}}'
Get connection statistics
See the total number of documents you have for a connection.
curl https://api.ragie.ai/connections/{connection_id}/stats -H "Authorization: Bearer $RAGIE_API_KEY"
Delete connection
Completely delete a connection. You can keep the files associated with the connection if you pass in keep_files
true in the JSON. This will leave all documents but they will no longer be associated to any connection.
If you choose to not keep the files, the system will queue deleting all documents. It may take some time before all the documents are deleted, so you may still see them in the API and Web interface.
curl https://api.ragie.ai/connections/{connection_id} \
--request POST \
-H "Authorization: Bearer $RAGIE_API_KEY" \
--json '{ "keep_files": true }'
Updated about 1 month ago