API、CLI 与扩展

Discover

API capability discovery

Discover available API capabilities

Returns a filtered capability map based on the caller's API key scopes. Each resource includes the operations and endpoints accessible to the authenticated API key. Use query parameters to narrow the response.

json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Discover","description":"API capability discovery"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"unauthorized":{"description":"Unauthorized"}}},"paths":{"/discover":{"get":{"tags":["Discover"],"summary":"Discover available API capabilities","description":"Returns a filtered capability map based on the caller's API key scopes. Each resource includes the operations and endpoints accessible to the authenticated API key. Use query parameters to narrow the response.\n","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string","enum":["schemas"]},"description":"Include additional data. Use \"schemas\" to inline request body schemas per endpoint, eliminating the need to fetch the full OpenAPI spec.\n"},{"name":"resource","in":"query","required":false,"schema":{"type":"string"},"description":"Filter to a specific resource (e.g. \"workflow\", \"tags\", \"credential\").\n"},{"name":"operation","in":"query","required":false,"schema":{"type":"string"},"description":"Filter to endpoints with a specific operation (e.g. \"read\", \"create\", \"list\").\n"}],"responses":{"200":{"description":"Discovery response with available resources and endpoints.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"},"description":"The API key's active scopes"},"resources":{"type":"object","additionalProperties":{"type":"object","properties":{"operations":{"type":"array","items":{"type":"string"}},"endpoints":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"operationId":{"type":"string"},"requestSchema":{"type":"object","description":"Request body schema (only present when include=schemas and the endpoint accepts a request body).\n"}}}}}}},"filters":{"type":"object","description":"Available query parameter filters. The values arrays reflect what the caller's scopes permit.\n","additionalProperties":{"type":"object","properties":{"description":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}}}},"specUrl":{"type":"string","description":"URL to the full OpenAPI specification"}}}}}}}},"401":{"$ref":"#/components/responses/unauthorized"}}}}}}

官方原文和授权

本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。

来源、授权与修改

本站保留许可证、固定提交号、社区作者和修改说明,不代表 n8n 对本站背书。

查看许可证查看来源和修改说明