← 返回 Skills 市场
fisa712

Knowledge Graph - API Ingestion Connectors

作者 Muhammad Asif · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
35
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install api-ingestion-connectors
功能描述
Connect to external APIs and ingest data into graph-ready structures for ETL pipelines and knowledge graph construction.
使用说明 (SKILL.md)

API Ingestion Connectors

Ingest data from external APIs into graph-ready formats for knowledge graph construction.

This skill retrieves data from diverse API sources and prepares it for transformation into graph-ready structures such as nodes, relationships, and triples.

Quick Start

Use When

  • Ingesting data from REST APIs
  • Querying GraphQL endpoints
  • Integrating external services into data pipelines
  • Pulling data from SaaS platforms
  • Transforming API responses into graph datasets
  • Building real-time knowledge graph updates

Inputs

  • API endpoint URLs
  • Authentication credentials
  • Request parameters and headers
  • Pagination configuration
  • Response format specifications
  • Transformation mappings

Outputs

  • JSON/CSV datasets
  • Graph-ready node/edge structures
  • RDF triples
  • Connector configurations
  • ETL pipeline definitions

Example

Input API Configuration:

Endpoint: https://api.example.com/users
Method: GET
Auth: Bearer Token
Pagination: page-based, 30 items per page

Generated Output:

{
  "nodes": [
    {"id": "user_1", "type": "Person", "name": "Alice", "email": "[email protected]"},
    {"id": "org_1", "type": "Organization", "name": "Acme Corp"}
  ],
  "edges": [
    {"source": "user_1", "target": "org_1", "relation": "WORKS_AT"}
  ]
}

Supported API Types

1. REST APIs

Connect to standard HTTP REST endpoints with flexible authentication and pagination

type: rest
endpoint: https://api.example.com/resource
method: GET|POST|PUT|DELETE
response_format: json|xml|csv

2. GraphQL APIs

Query GraphQL endpoints with structured query definitions

query {
  users {
    id
    name
    email
    organization {
      name
    }
  }
}

3. OAuth-Protected APIs

Authenticate using OAuth 2.0 flows (authorization code, client credentials)

auth_type: oauth2
client_id: ${CLIENT_ID}
client_secret: ${CLIENT_SECRET}
token_endpoint: https://api.example.com/oauth/token

4. API Key Authentication

Simple API key-based authentication

auth_type: api_key
key_param: X-API-Key
key_value: ${API_KEY}

5. Bearer Token Authentication

OAuth 2.0 bearer token authentication

auth_type: bearer
token: ${ACCESS_TOKEN}

Pagination Strategies

Offset/Limit Pagination

type: offset
param_offset: offset
param_limit: limit
start_at: 0
page_size: 20

Page-Based Pagination

type: page
param_page: page
page_size: 30
start_at: 1

Cursor-Based Pagination

type: cursor
cursor_param: after
next_cursor_field: pageInfo.endCursor
has_next_field: pageInfo.hasNextPage

Execution Steps

  1. Validate Configuration – Check endpoint, auth, and parameters
  2. Authenticate – Obtain credentials and tokens
  3. Make Request – Execute HTTP/GraphQL request
  4. Handle Pagination – Fetch all pages/results
  5. Parse Response – Extract and validate response data
  6. Transform Data – Convert to graph-ready format
  7. Generate Output – Create nodes, edges, or triples
  8. Feed to Pipeline – Pass to downstream transformation skills

Output Formats

Node-Edge Structure

{
  "nodes": [{"id": "...", "type": "...", "properties": {...}}],
  "edges": [{"source": "...", "target": "...", "type": "...", "properties": {...}}]
}

Graph Triples (RDF)

:entity1 :relationType :entity2 .
:entity1 :property "value" .

CSV Export

node_id,node_type,node_name,property1,property2

Error Handling

The connector should handle:

  • Network Errors – Retry logic with exponential backoff
  • Authentication Errors – Token refresh, credential validation
  • Rate Limiting – Backoff and request throttling
  • Malformed Responses – Schema validation and error reporting
  • Timeouts – Connection and read timeout handling

Example retry strategy:

retry:
  max_attempts: 3
  backoff_factor: 2
  initial_delay: 1s
  max_delay: 60s
  retryable_status_codes: [429, 500, 502, 503, 504]

Recommended Libraries

  • HTTP Clients: requests, httpx, aiohttp
  • GraphQL: gql, graphene, strawberry
  • OAuth: authlib, oauthlib
  • Data Validation: pydantic, jsonschema
  • Data Transformation: pandas, polars

Best Practices

✓ Respect API rate limits and terms of service
✓ Implement exponential backoff for retries
✓ Validate response schemas before processing
✓ Handle and log errors appropriately
✓ Cache results when possible
✓ Normalize and deduplicate entities
✓ Secure credentials (use environment variables)
✓ Monitor API changes and versioning
✓ Implement request timeout handling
✓ Document API assumptions and requirements

Integration with Downstream Skills

The ingested data feeds into:

  • JSON → Triples Converter – Transform to RDF
  • CSV → Graph Loader – Load into graph database
  • Text → Entity/Relation Extractor – Extract structured knowledge
  • ETL Pipeline Generator – Orchestrate full workflows
  • Schema Validation – Validate against graph schema

References

See connector-patterns.md for detailed API connector patterns and example-connectors.md for complete connector examples.


Version: 1.0.0

安全使用建议
Install only if you intend to build API ingestion workflows. Use least-privilege tokens, keep secrets in environment variables or a secrets manager, avoid logging Authorization headers or request bodies, and confirm that the data you ingest is allowed to leave the source system.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is to connect to REST, GraphQL, OAuth, API-key, bearer-token, and basic-auth APIs and transform responses into graph-ready structures; the credential and external-API examples fit that purpose.
Instruction Scope
The instructions are broad because users provide arbitrary endpoints, headers, bodies, and mappings, but the scope is visible and user-directed rather than hidden or automatic.
Install Mechanism
The package is documentation plus one Python helper script; no dependency install hooks, post-install commands, or automatic execution mechanism were found.
Credentials
Using external APIs and sensitive credentials is proportionate for an ingestion connector, but users should still apply endpoint allowlists, data-minimization, and secret-handling controls.
Persistence & Privilege
No background worker, persistence setup, privilege escalation, local profile/session scraping, file deletion, or credential storage behavior was found.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install api-ingestion-connectors
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /api-ingestion-connectors 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the API Ingestion Connectors skill. - Enables ingestion of data from REST, GraphQL, and OAuth-protected APIs into graph-ready structures. - Supports multiple authentication methods including API key, bearer token, and OAuth2. - Handles diverse pagination strategies (offset/limit, page-based, cursor-based). - Transforms API responses into node-edge and RDF triple formats for ETL and knowledge graph construction. - Provides error handling with retry logic, schema validation, and rate limit compliance.
元数据
Slug api-ingestion-connectors
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Knowledge Graph - API Ingestion Connectors 是什么?

Connect to external APIs and ingest data into graph-ready structures for ETL pipelines and knowledge graph construction. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 35 次。

如何安装 Knowledge Graph - API Ingestion Connectors?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install api-ingestion-connectors」即可一键安装,无需额外配置。

Knowledge Graph - API Ingestion Connectors 是免费的吗?

是的,Knowledge Graph - API Ingestion Connectors 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Knowledge Graph - API Ingestion Connectors 支持哪些平台?

Knowledge Graph - API Ingestion Connectors 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Knowledge Graph - API Ingestion Connectors?

由 Muhammad Asif(@fisa712)开发并维护,当前版本 v1.0.0。

💬 留言讨论