Files
Read a text file
Changed onReturns a small text file, or a range of its lines, for agents that read and edit project files such as scripts, configs, or CSVs. Not meant for large or binary files; download those with GET /files/download.
get/files/content
Request
- Base URLhttps://api.deepnote.com/v2
- URLhttps://api.deepnote.com/v2/files/content
- AuthHTTP bearer
Query parameters
projectIdstring uuid required
Project that contains the file.
pathstring required
File path within the project.
startLineinteger
First line to read, starting at 1.
Example:1
endLineinteger
Last line to read, inclusive.
Example:40
Response
File content
Example response
{
"content": "import streamlit as st\n\nst.title(\"Sales\")\n",
"startLine": 1,
"endLine": 3
}Changes
- info
endpoint added
- info