본문으로 건너뛰기
Skillpedia
데이터베이스41k · #6968

setting-up-a-custom-rest-source

하는 일

이 스킬은 에이전트가 설정 파일을 작성해 웹 API의 데이터를 PostHog 데이터 웨어하우스로 가져오는 방법을 보여 줍니다. PostHog가 직접 지원하지 않는 내부 도구나 틈새 서비스의 데이터를 원하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓기본 PostHog 커넥터가 없는 API의 데이터를 가져오고 싶을 때.
  • ✓API 문서 링크가 있고, 그 데이터를 웨어하우스에 넣고 싶을 때.
  • ✓내부 서비스를 사용자 지정 소스로 PostHog에 연결하고 싶을 때.

스킬 링크

https://github.com/PostHog/posthog/blob/master/products/warehouse_sources/skills/setting-up-a-custom-rest-source/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/products/warehouse_sources/skills/setting-up-a-custom-rest-source/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내부 API의 문서 링크입니다. 그 데이터가 PostHog 웨어하우스에 나타나도록 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 먼저 기본 커넥터가 이미 있는지 확인합니다. 없으면 엔드포인트를 설명하는 짧은 설정 파일을 작성하고, 소스를 만들기 전에 실제 데이터로 테스트합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.
자주 묻는 질문

잘 알려진 앱에도 이것을 써야 하나요?

보통은 아닙니다. 에이전트는 먼저 기본 커넥터가 있는지 확인하며, 대부분의 인기 도구는 이미 기본 커넥터가 있습니다.

제한이 있나요?

네. 사용자 지정 소스는 리소스를 최대 50개까지 가질 수 있고, 프로젝트당 사용자 지정 소스는 최대 5개입니다. 이 기능은 베타입니다.

에이전트가 소스마다 코드를 써야 하나요?

아니요. 소스는 사용자 지정 코드가 아니라 JSON 설정 파일로 정의합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
41k
순위
#6968
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬