How to get a project file's content with looker API

mehmety
Participant I

I would like to get a project file’s content with Looker API, but couldn’t find an API endpoint to get it. 

The following endpoint returns some information about the file, but it doesn’t return its content. Is there an endpoint to get this file’s content?

“GET/api/4.0/projects/{project_id}/files/file”

It’s response:

{
"id": "maps/regions_provinces.json",
"title": "regions_provinces",
"type": "data",
"extension": ".json",
"mime_type": "application/json",
"editable": true,
"path": "maps/regions_provinces.json",
"git_status": null,
"can": {
"show_raw": true,
"edit": false
}
}

Btw I’m using API v4.

0 1 371
1 REPLY 1

IanT
Participant V

Not an answer exactly but you could fetch from GitHub api instead, in the past I have seen questions about updating lookml via api and this was the answer/only possibility in that case.