Get a single file from a version
curl --request GET \
--url https://api.shelv.dev/v1/shelves/{id}/versions/{version}/files/{filePath} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shelv.dev/v1/shelves/{id}/versions/{version}/files/{filePath}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shelv.dev/v1/shelves/{id}/versions/{version}/files/{filePath}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shelv.dev/v1/shelves/{id}/versions/{version}/files/{filePath}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Shelves
Get a single file from a version
Get the content of a single file from a specific version by its relative path. Content-Type is text/markdown for .md files, application/json for .json files, or text/plain otherwise.
GET
/
v1
/
shelves
/
{id}
/
versions
/
{version}
/
files
/
{filePath}
Get a single file from a version
curl --request GET \
--url https://api.shelv.dev/v1/shelves/{id}/versions/{version}/files/{filePath} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shelv.dev/v1/shelves/{id}/versions/{version}/files/{filePath}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shelv.dev/v1/shelves/{id}/versions/{version}/files/{filePath}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shelv.dev/v1/shelves/{id}/versions/{version}/files/{filePath}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pattern:
^shf_[0-9a-f]{24}$Version number
Relative file path within the shelf (may contain slashes)
Example:
"chapter-1/section-1.md"
Response
File content
The response is of type string.
