1"use strict";(globalThis.webpackChunkskillhub_docs=globalThis.webpackChunkskillhub_docs||[]).push([[5609],{9970(e,n,s){s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>c,default:()=>o,frontMatter:()=>t,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"developer/api/authenticated","title":"\u8ba4\u8bc1 API","description":"\u9700\u8981\u8ba4\u8bc1\u7684 API","source":"@site/i18n/zh-CN/docusaurus-plugin-content-docs/current/04-developer/api/authenticated.md","sourceDirName":"04-developer/api","slug":"/developer/api/authenticated","permalink":"/zh-CN/docs/developer/api/authenticated","draft":false,"unlisted":false,"editUrl":"https://github.com/iflytek/skillhub/edit/main/document/docs/04-developer/api/authenticated.md","tags":[],"version":"current","sidebarPosition":3,"frontMatter":{"title":"\u8ba4\u8bc1 API","sidebar_position":3,"description":"\u9700\u8981\u8ba4\u8bc1\u7684 API"},"sidebar":"docsSidebar","previous":{"title":"\u516c\u5f00 API","permalink":"/zh-CN/docs/developer/api/public"},"next":{"title":"CLI \u517c\u5bb9\u5c42","permalink":"/zh-CN/docs/developer/api/cli-compat"}}');var l=s(4848),i=s(8453);const t={title:"\u8ba4\u8bc1 API",sidebar_position:3,description:"\u9700\u8981\u8ba4\u8bc1\u7684 API"},c="\u8ba4\u8bc1 API",r={},d=[{value:"\u8ba4\u8bc1\u76f8\u5173",id:"\u8ba4\u8bc1\u76f8\u5173",level:2},{value:"\u83b7\u53d6\u5f53\u524d\u7528\u6237",id:"\u83b7\u53d6\u5f53\u524d\u7528\u6237",level:3},{value:"\u767b\u51fa",id:"\u767b\u51fa",level:3},{value:"\u6280\u80fd\u53d1\u5e03",id:"\u6280\u80fd\u53d1\u5e03",level:2},{value:"\u6536\u85cf",id:"\u6536\u85cf",level:2},{value:"\u8bc4\u5206",id:"\u8bc4\u5206",level:2},{value:"\u6807\u7b7e\u7ba1\u7406",id:"\u6807\u7b7e\u7ba1\u7406",level:2},{value:"\u6211\u7684\u8d44\u6e90",id:"\u6211\u7684\u8d44\u6e90",level:2},{value:"\u547d\u540d\u7a7a\u95f4\u7ba1\u7406",id:"\u547d\u540d\u7a7a\u95f4\u7ba1\u7406",level:2},{value:"\u5ba1\u6838",id:"\u5ba1\u6838",level:2},{value:"\u63d0\u5347\u7533\u8bf7",id:"\u63d0\u5347\u7533\u8bf7",level:2},{value:"API Token",id:"api-token",level:2},{value:"\u4e0b\u4e00\u6b65",id:"\u4e0b\u4e00\u6b65",level:2}];function p(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"\u8ba4\u8bc1-api",children:"\u8ba4\u8bc1 API"})}),"\n",(0,l.jsx)(n.h2,{id:"\u8ba4\u8bc1\u76f8\u5173",children:"\u8ba4\u8bc1\u76f8\u5173"}),"\n",(0,l.jsx)(n.h3,{id:"\u83b7\u53d6\u5f53\u524d\u7528\u6237",children:"\u83b7\u53d6\u5f53\u524d\u7528\u6237"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"GET /api/v1/auth/me\n"})}),"\n",(0,l.jsx)(n.h3,{id:"\u767b\u51fa",children:"\u767b\u51fa"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"POST /api/v1/auth/logout\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u6280\u80fd\u53d1\u5e03",children:"\u6280\u80fd\u53d1\u5e03"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"POST /api/v1/publish\nContent-Type: multipart/form-data\n\nfile: <zip-file>\nnamespace: <namespace-slug>\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u6536\u85cf",children:"\u6536\u85cf"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"POST /api/v1/skills/{namespace}/{slug}/star\nDELETE /api/v1/skills/{namespace}/{slug}/star\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u8bc4\u5206",children:"\u8bc4\u5206"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:'POST /api/v1/skills/{namespace}/{slug}/rating\nContent-Type: application/json\n\n{\n "score": 5\n}\n'})}),"\n",(0,l.jsx)(n.h2,{id:"\u6807\u7b7e\u7ba1\u7406",children:"\u6807\u7b7e\u7ba1\u7406"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"GET /api/v1/skills/{namespace}/{slug}/tags\nPUT /api/v1/skills/{namespace}/{slug}/tags/{tagName}\nDELETE /api/v1/skills/{namespace}/{slug}/tags/{tagName}\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u6211\u7684\u8d44\u6e90",children:"\u6211\u7684\u8d44\u6e90"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"GET /api/v1/me/stars\nGET /api/v1/me/skills\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u547d\u540d\u7a7a\u95f4\u7ba1\u7406",children:"\u547d\u540d\u7a7a\u95f4\u7ba1\u7406"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"POST /api/v1/namespaces\nPUT /api/v1/namespaces/{slug}\nGET /api/v1/namespaces/{slug}/members\nPOST /api/v1/namespaces/{slug}/members\nPUT /api/v1/namespaces/{slug}/members/{userId}/role\nDELETE /api/v1/namespaces/{slug}/members/{userId}\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u5ba1\u6838",children:"\u5ba1\u6838"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"GET /api/v1/namespaces/{slug}/reviews\nPOST /api/v1/namespaces/{slug}/reviews/{id}/approve\nPOST /api/v1/namespaces/{slug}/reviews/{id}/reject\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u63d0\u5347\u7533\u8bf7",children:"\u63d0\u5347\u7533\u8bf7"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"POST /api/v1/namespaces/{slug}/skills/{skillId}/promote\n"})}),"\n",(0,l.jsx)(n.h2,{id:"api-token",children:"API Token"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-http",children:"POST /api/v1/tokens\nGET /api/v1/tokens\nDELETE /api/v1/tokens/{id}\n"})}),"\n",(0,l.jsx)(n.h2,{id:"\u4e0b\u4e00\u6b65",children:"\u4e0b\u4e00\u6b65"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.a,{href:"./cli-compat",children:"CLI \u517c\u5bb9\u5c42"})," - ClawHub \u517c\u5bb9\u63a5\u53e3"]}),"\n"]})]})}function o(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(p,{...e})}):p(e)}},8453(e,n,s){s.d(n,{R:()=>t,x:()=>c});var a=s(6540);const l={},i=a.createContext(l);function t(e){const n=a.useContext(i);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.