Skip to main content
GET
/
api
/
v0
/
repositories
/
{repo_id}
/
files
/
metadata
/
{path}
Get the metadata of a single file.
curl --request GET \
  --url https://api.example.com/api/v0/repositories/{repo_id}/files/metadata/{path}
{
  "path": "<string>",
  "symbolicLink": true,
  "inScope": true,
  "mode": 123,
  "size": 123,
  "lastModified": "2023-11-07T05:31:56Z",
  "relatedFindings": 123,
  "language": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.cantina.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

repo_id
string<uuid>
required
path
string
required

Response

Metadata of file

Metadata about a file in a repository.

path
string
required

Path to the file, relative to the root of the repository, e.g. directory/README.md.

True if the file is a symbolic link.

inScope
boolean
required

True if the file is considered in scope for reporting finding.

mode
integer<int32>
required

File permissions, commonly know as "file mode".

size
integer<int32>
required

Size of the file in bytes.

lastModified
string<date-time>
required

Timestamp when the file was last modified.

Number of findings related to this file.

Note that the amount is limited to the finding the user has access to. For example for reviewers this means only the finding of their team are counted.

If this is zero highest_severity will be null.

language
string | null

Detected programming language used in the file. Null if the the language couldn't be determined.

highestSeverity
null | enum<string>

Highest severity in the findings related to this file.

Like related_findings this is based on the findings the user has access to, which means it will differ depending on what kind of access the user has.

This will be null if the file has no findings related in it.

Available options:
critical,
high,
medium,
low,
informational,
gas_optimization