> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Skill-Datei abrufen

> Rufe eine gespeicherte Skill-Datei anhand des Pfads ab

Ruft eine gespeicherte Skill-Datei anhand des Pfads aus deinem Workspace ab.

## Basis-URL

```
https://api.langdock.com/skills/v1/{skillId}/files
```

> [!WARNING]
>
> **Dedicated Deployments**
>
> Ersetze `api.langdock.com` durch `<your-deployment-url>/api/public` in allen Anfragen.

## Erforderliche Scopes

Dieser Endpoint erfordert den `SKILL_API` Scope.

> [!NOTE]
>
> Erfordert Viewer-Zugriff auf den Skill.

## Parameter

| Parameter | Typ | Erforderlich | Beschreibung |
| - | - | - | - |
| `skillId` | string | Ja | UUID des abzurufenden Skills. |
| `path` | string | Ja | Relativer Pfad der Datei im Skill, zum Beispiel `references/template.md`. Maximum: 255 Zeichen. Absolute Pfade, Pfade mit Laufwerksbuchstaben, Steuerzeichen und `..`-Segmente werden abgelehnt. |

Die Datei muss gültiges UTF-8 sein und darf höchstens 512 KB groß sein. Lesbare Endungen sind `.md`, `.mdx`, `.txt`, `.py`, `.sh`, `.js`, `.ts`, `.json`, `.yaml`, `.yml`, `.toml`, `.csv`, `.sql`, `.xml`, `.xsd`, `.html`, `.css` und `.svg`. Binärdateien und andere nicht unterstützte Dateien bleiben unter [Skill abrufen](https://docs.langdock.com/de/developer/skills-api/get-skill.md) gelistet. Dieser Endpoint gibt ihren Inhalt nicht zurück.

## Beispiel

```javascript theme={null}
const axios = require("axios");

async function getSkillFile(skillId, path) {
  const response = await axios.get(
    `https://api.langdock.com/skills/v1/${skillId}/files`,
    {
      params: { path },
      headers: {
        Authorization: "Bearer YOUR_API_KEY"
      }
    }
  );

  console.log("Content:", response.data.content);
}

getSkillFile(
  "550e8400-e29b-41d4-a716-446655440000",
  "references/template.md"
);
```

## Antwortformat

### Erfolgsantwort (200 OK)

```typescript theme={null}
{
  path: string;
  sizeBytes: number;
  extension: string;
  hasScript: boolean;
  sha256: string;
  content: string;
}
```

## Fehlerbehandlung

| Statuscode | Beschreibung |
| - | - |
| 400 | Ungültige Skill-ID, ungültiger Pfad, nicht unterstützter Dateityp, ungültiges UTF-8 oder Datei größer als 512 KB |
| 401 | Ungültiger oder fehlender API Key |
| 403 | Fehlender `SKILL_API` Scope oder kein Skills-Produktzugriff |
| 404 | Skill oder Datei nicht gefunden oder nicht zugänglich |
| 429 | Rate Limit überschritten |
| 500 | Interner Serverfehler |

> [!NOTE]
>
> Langdock blockiert bewusst Browser-basierte Anfragen, um deinen API-Schlüssel zu schützen und die Sicherheit deiner Anwendungen zu gewährleisten. Weitere Informationen findest du in unserem Guide zu [Best Practices für API-Schlüssel](https://docs.langdock.com/de/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.