API、CLI 与扩展

Tags

Operations about tags

Retrieve all tags

Retrieve all tags from your instance.

json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Tags","description":"Operations about tags"}],"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"}},"parameters":{"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"schemas":{"tagList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/tag"}},"nextCursor":{"type":"string","description":"Paginate through tags by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first \"page\" of the collection.","nullable":true}}},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}}},"responses":{"unauthorized":{"description":"Unauthorized"}}},"paths":{"/tags":{"get":{"operationId":"getTags","tags":["Tags"],"summary":"Retrieve all tags","description":"Retrieve all tags from your instance.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tagList"}}}},"401":{"$ref":"#/components/responses/unauthorized"}}}}}}

Create a tag

Create a tag in your instance.

json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Tags","description":"Operations about tags"}],"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"}},"schemas":{"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"conflict":{"description":"Conflict"}}},"paths":{"/tags":{"post":{"tags":["Tags"],"summary":"Create a tag","description":"Create a tag in your instance.","requestBody":{"description":"Created tag object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tag"}}},"required":true},"responses":{"201":{"description":"A tag object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tag"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"409":{"$ref":"#/components/responses/conflict"}}}}}}

Retrieves a tag

Retrieves a tag.

json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Tags","description":"Operations about tags"}],"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"}},"parameters":{"tagId":{"name":"id","in":"path","description":"The ID of the tag.","required":true,"schema":{"type":"string"}}},"schemas":{"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}}},"responses":{"unauthorized":{"description":"Unauthorized"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/tags/{id}":{"get":{"tags":["Tags"],"summary":"Retrieves a tag","description":"Retrieves a tag.","parameters":[{"$ref":"#/components/parameters/tagId"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tag"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"404":{"$ref":"#/components/responses/notFound"}}}}}}

Update a tag

Update a tag.

json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Tags","description":"Operations about tags"}],"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"}},"parameters":{"tagId":{"name":"id","in":"path","description":"The ID of the tag.","required":true,"schema":{"type":"string"}}},"schemas":{"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"}}},"paths":{"/tags/{id}":{"put":{"tags":["Tags"],"summary":"Update a tag","description":"Update a tag.","parameters":[{"$ref":"#/components/parameters/tagId"}],"requestBody":{"description":"Updated tag object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tag"}}},"required":true},"responses":{"200":{"description":"Tag object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tag"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"}}}}}}

Delete a tag

Deletes a tag.

json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Tags","description":"Operations about tags"}],"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"}},"parameters":{"tagId":{"name":"id","in":"path","description":"The ID of the tag.","required":true,"schema":{"type":"string"}}},"schemas":{"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true}}}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."}}},"paths":{"/tags/{id}":{"delete":{"tags":["Tags"],"summary":"Delete a tag","description":"Deletes a tag.","parameters":[{"$ref":"#/components/parameters/tagId"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tag"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}}}}}}

官方原文和授权

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

来源、授权与修改

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

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