Skip to content

Retrieve snippet file content

GET
/api/v4/snippets/{id}/files/{ref}/{file_path}/raw

Retrieves the raw file content from a snippet as plain text.

ref
required
string

The name of branch, tag or commit

file_path
required
string

The URL-encoded path to the file, like lib%2Fclass%2Erb

id
required
string

The ID of a snippet

OK

Bad Request

Not found