Skill Files

Get skill file

Retrieves a single skill file by path. Documents include their text content, other files include a download URL.

get/skills/{skill_id}/files/content

Request

  • Base URL
    https://api.metorial.com
  • Auth
    HTTP bearer

Path parameters

skill_idstring required

Unique identifier of the skill.

Query parameters

pathstring required
Example:/SKILL.md

Path of the file inside the skill. A leading "/" is optional. Paths may contain letters, numbers, spaces and the characters . _ - ( ) $.

Headers

Metorial-Versionstring
Example:2025-01-01

Pin the dated API version for this request, e.g. 2025-01-01. Defaults to the version configured for the environment.

Response

Successful response

object'skill.file_content' required

String representing the object's type

pathstring required

Path of the file inside the skill, always starting with "/".

kind'document' | 'file' required

Markdown written with content is stored as a collaboratively editable document; everything else, including attached files, is stored as a file.

sizenumber required

Size of the file content in bytes.

etagstring required

Opaque version identifier of the file content. Pass it as if_match when writing to avoid overwriting changes made by others. The check is best-effort: a live collaborative edit landing between the check and the write is not detected. Listings do not flush pending live edits, so a listed etag can lag behind the one returned when fetching the file.

skill_idstring required

The ID of the skill the file belongs to.

store_item_idstring required

The ID of the store item backing this file.

document_idstring nullable required

The ID of the backing document, for files of kind document.

file_idstring nullable required

The ID of the backing file, for files of kind file.

updated_atstring date-time required

When the file was last changed.

contentstring nullable required

The text content of the file, for files of kind document.

download_urlstring nullable required

A short-lived URL to download the file content, for files of kind file.

Example response

{
  "path": "/SKILL.md"
}

Changes

No recorded changes to this operation across all 1 revision of this API.