setting-up-a-custom-rest-source
Was er macht
Dieser Skill zeigt einem Agenten, wie er Daten aus einer Web-API in das PostHog Data Warehouse importiert, indem er eine Konfigurationsdatei schreibt. Er ist für Menschen gedacht, die Daten aus einem internen Tool oder einem Nischendienst wollen, den PostHog nicht direkt unterstützt.
Wann du ihn nutzt
- ✓Wenn du Daten aus einer API importieren willst, für die es keinen eingebauten PostHog-Connector gibt.
- ✓Wenn du einen Link zur Dokumentation einer API hast und ihre Daten im Warehouse haben willst.
- ✓Wenn du einen internen Dienst als eigene Quelle an PostHog anbinden willst.
Link zum Skill
https://github.com/PostHog/posthog/blob/master/products/warehouse_sources/skills/setting-up-a-custom-rest-source/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Hier ist der Doku-Link zu unserer internen API. Kannst du sie so einrichten, dass ihre Daten im PostHog Data Warehouse erscheinen?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent prüft zuerst, ob es schon einen eingebauten Connector gibt. Falls nicht, schreibt er eine kurze Konfigurationsdatei, die die Endpunkte der API beschreibt, und testet sie dann mit echten Daten, bevor er die Quelle anlegt.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Setting up a Custom REST source
A Custom source imports any HTTP REST API into queryable warehouse tables from a JSON manifest — no
per-source Python. The manifest is a RESTAPIConfig: the same shape that powers PostHog's built-in REST connectors
(Intercom, Attio, Sentry, …), so the generic REST engine handles auth, pagination, JSONPath record extraction, and
incremental cursors for you. Your job is to author a correct manifest and prove it against live data before creating
the source.
This is a beta capability. Caps: at most 50 resources per manifest, and at most 5 Custom sources per project.
When to use this skill
- The user wants to import an API that has no built-in connector — an internal service, a niche SaaS, a public API — and can give you its docs URL or describe its endpoints.
- The user explicitly asks for a "custom REST source", "custom source manifest", or to "build a connector from docs".
A Custom source is the fallback — only correct when no native connector fits. PostHog ships hundreds of native
connectors, far more than could be listed here, so never assume an API has no built-in — most well-known SaaS apps
and databases do, and guessing wrong misroutes them into a hand-authored manifest that duplicates a battle-tested
connector. Step 0 below makes you check the registry before drafting anything; if a native connector matches, hand off
to setting-up-a-data-warehouse-source instead.
The grammar
Read references/manifest-reference.md before drafting — it is the full
RESTAPIConfig field reference (auth types, the six paginators, incremental cursors, parent/child fan-out) with worked
examples for each. Draft the manifest from that grammar; don't guess field names.
The skeleton:
{
"client": {
"base_url": "https://api.example.com/v1",
"auth": { "type": "bearer" }
},
"resources": [
{
"name": "users",
"primary_key": "id",
"endpoint": {
"path": "/users",
"data_selector": "data",
"paginator": { "type": "json_response", "next_url_path": "next" },
"incremental": { "cursor_path": "updated_at", "start_param": "since" }
}
}
]
}
Secrets never go inline in the manifest. manifest_json holds only the non-secret structure. The credential
travels in a separate payload key chosen by the manifest's client.auth.type: auth_token (bearer), auth_api_key
(api_key), auth_password (http_basic), or auth_oauth2_client_secret for oauth2 (plus
auth_oauth2_refresh_token for the refresh-token grant only). The
engine injects it at run time, and PostHog redacts it from every response. Putting a token inline is rejected at
validation.
Available tools
| Tool | Purpose |
|---|---|
external-data-sources-wizard |
List every native source type PostHog supports. Run this first (Step 0) to check whether the target API already has a built-in connector before drafting a manifest. |
external-data-sources-db-schema |
Validate the manifest + credential and list the resources (tables) it exposes, with detected primary keys and incremental cursors. This is the validate-and-list step. |
external-data-sources-preview-resource |
Read a small live sample of rows for one resource — verify data_selector / primary_key / cursor_path against real data before creating anything. |
data-warehouse-source-setup |
Create the source. Enables all manifest resources with sync defaults in one call. |
external-data-sources-create |
Advanced create — lets the user hand-pick which resources sync via a schemas array. |
external-data-schemas-list |
After creation, watch per-table sync status. |
Häufige Fragen
Sollte ich das für bekannte Apps nutzen?
Meist nicht. Der Agent sucht zuerst nach einem eingebauten Connector, weil die meisten beliebten Tools schon einen haben.
Gibt es Grenzen?
Ja. Eine eigene Quelle kann bis zu 50 Ressourcen haben, und ein Projekt kann bis zu 5 eigene Quellen haben. Die Funktion ist im Beta-Status.
Muss der Agent für jede Quelle Code schreiben?
Nein. Die Quelle wird in einer JSON-Konfigurationsdatei definiert, nicht in eigenem Code.
Details
Originalbeschreibung des Autors
Connect an arbitrary REST API to the PostHog data warehouse as a Custom source by authoring a JSON manifest, with no per-source code. Use when the user points at an API that has no built-in PostHog connector — "import data from this REST API", "sync my internal API", "connect this API from its docs", "build a custom data warehouse source" — and gives a docs URL or a natural-language description of the endpoints. Walks through drafting the RESTAPIConfig manifest (auth — bearer, API key, HTTP basic, or OAuth2 client credentials / refresh token — pagination, record path, incremental cursor, paren
repo: PostHog/posthog
Beliebtheit
- GitHub-Sterne
- 41k
- Platz im Ranking
- #6968
- Lizenz
- —
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
depot-ci
41kBringt deinem Agenten bei, Depot-CI-Workflows einzurichten, bestehende Workflows zu migrieren und Laufprotokolle auszuwerten.
depot-container-builds
41kHilft deinem Agenten, Docker-Images auf Depot-Remote-Buildern zu bauen, mit Multi-Plattform-Images, Registry-Push und Fehlerbehebung.
depot-github-runners
41kLässt deinen Agenten GitHub-Actions-Jobs auf Depot-Runnern laufen, mit passender Runner-Größe und Labels, und hilft bei Einrichtungsfehlern.
editing-agents-md
41kHilft deinem Agenten zu entscheiden, ob eine Regel in AGENTS.md oder CLAUDE.md gehört, und sie so zu formulieren, dass sie hält.
Ähnliche Skills
discrawl
394kLässt deinen Agenten ein gespeichertes lokales Archiv von Discord-Nachrichten durchsuchen und zusammenfassen, dessen Aktualität prüfen und Direktnachrichten lesen.
clickhouse-io
280kHilft deinem Agenten, Abfragen und Schemas in ClickHouse zu optimieren. Nutzt Best Practices für schnelle Analyse-Workloads. Ideal, wenn Auswertungen zu langsam laufen.
scientific-db-pubmed-database
280kHilft deinem Agenten, wissenschaftliche Artikel im biomedizinischen Bereich zu suchen. Nützlich für Recherchen mit speziellen medizinischen Informationen.