Skip to content

Get a snippet's raw file at HEAD

GET
/snippets/{workspace}/{encoded_id}/files/{path}

Convenience resource for getting to a snippet’s raw files without the need for first having to retrieve the snippet itself and having to pull out the versioned file links.

encoded_id
required
string

The snippet id.

path
required
string

Path to the file.

workspace
required
string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

A redirect to the most recent revision of the specified file.

Location
string

The URL of the most recent file revision.

If the authenticated user does not have access to the snippet.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}

If the snippet does not exist.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}