<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dapr API 文档指南 on Dapr 文档库</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/</link><description>Recent content in Dapr API 文档指南 on Dapr 文档库</description><generator>Hugo</generator><language>zh-hans</language><atom:link href="https://v1-18.docs.dapr.io/zh-hans/reference/api/index.xml" rel="self" type="application/rss+xml"/><item><title>服务调用API参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/service_invocation_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/service_invocation_api/</guid><description>&lt;p>Dapr为用户提供了使用唯一命名标识符（appId）来调用其他使用Dapr的应用程序的功能，或者调用不使用Dapr的HTTP端点。
这使得应用程序可以通过命名标识符相互交互，并将服务发现的责任交给Dapr运行时。&lt;/p>
&lt;h2 id="调用远程dapr应用上的方法">调用远程Dapr应用上的方法&lt;/h2>
&lt;p>这个端点允许您在另一个启用了Dapr的应用中调用方法。&lt;/p>
&lt;h3 id="http请求">HTTP请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>PATCH/POST/GET/PUT/DELETE http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/invoke/&amp;lt;appID&amp;gt;/method/&amp;lt;method-name&amp;gt;
&lt;/code>&lt;/pre>&lt;h2 id="调用非dapr端点上的方法">调用非Dapr端点上的方法&lt;/h2>
&lt;p>这个端点允许您使用&lt;code>HTTPEndpoint&lt;/code>资源名称或完全限定域名（FQDN）URL在非Dapr端点上调用方法。&lt;/p>
&lt;h3 id="http请求-1">HTTP请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>PATCH/POST/GET/PUT/DELETE http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/invoke/&amp;lt;HTTPEndpoint name&amp;gt;/method/&amp;lt;method-name&amp;gt;

PATCH/POST/GET/PUT/DELETE http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/invoke/&amp;lt;FQDN URL&amp;gt;/method/&amp;lt;method-name&amp;gt;
&lt;/code>&lt;/pre>&lt;h3 id="http响应代码">HTTP响应代码&lt;/h3>
&lt;p>当一个服务通过Dapr调用另一个服务时，被调用服务的状态码将返回给调用者。
如果存在网络错误或其他瞬态错误，Dapr将返回一个&lt;code>500&lt;/code>错误，并附带详细的错误信息。&lt;/p>
&lt;p>如果用户通过HTTP调用Dapr与启用gRPC的服务通信，来自被调用gRPC服务的错误将返回为&lt;code>500&lt;/code>，而成功的响应将返回为&lt;code>200 OK&lt;/code>。&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>XXX&lt;/td>
 &lt;td>上游状态返回&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>400&lt;/td>
 &lt;td>未提供方法名称&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>403&lt;/td>
 &lt;td>访问控制禁止调用&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>500&lt;/td>
 &lt;td>请求失败&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="url参数">URL参数&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>daprPort&lt;/td>
 &lt;td>Dapr端口&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>appID&lt;/td>
 &lt;td>与远程应用关联的应用ID&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>HTTPEndpoint name&lt;/td>
 &lt;td>与外部端点关联的HTTPEndpoint资源&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>FQDN URL&lt;/td>
 &lt;td>在外部端点上调用的完全限定域名URL&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>method-name&lt;/td>
 &lt;td>要在远程应用上调用的方法或URL的名称&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>注意，所有URL参数区分大小写。&lt;/p>&lt;/blockquote>
&lt;h3 id="请求内容">请求内容&lt;/h3>
&lt;p>在请求中，您可以传递头信息：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;Content-Type&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/json&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>在请求体中放置您想要发送给服务的数据：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;arg1&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">10&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;arg2&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">23&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;operator&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;+&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="被调用服务接收到的请求">被调用服务接收到的请求&lt;/h3>
&lt;p>一旦您的服务代码在另一个启用了Dapr的应用或非Dapr端点中调用了方法，Dapr会在&lt;code>&amp;lt;method-name&amp;gt;&lt;/code>端点上发送请求，并附带头信息和请求体。&lt;/p>
&lt;p>被调用的Dapr应用或非Dapr端点需要监听并响应该端点上的请求。&lt;/p>
&lt;h3 id="跨命名空间调用">跨命名空间调用&lt;/h3>
&lt;p>在支持命名空间的托管平台上，Dapr应用ID符合包含目标命名空间的有效FQDN格式。
例如，以下字符串包含应用ID（&lt;code>myApp&lt;/code>）以及应用运行的命名空间（&lt;code>production&lt;/code>）。&lt;/p>
&lt;pre tabindex="0">&lt;code>myApp.production
&lt;/code>&lt;/pre>&lt;h4 id="支持命名空间的平台">支持命名空间的平台&lt;/h4>
&lt;ul>
&lt;li>Kubernetes&lt;/li>
&lt;/ul>
&lt;h3 id="示例">示例&lt;/h3>
&lt;p>您可以通过发送以下内容来调用&lt;code>mathService&lt;/code>服务上的&lt;code>add&lt;/code>方法：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl http://localhost:3500/v1.0/invoke/mathService/method/add &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;Content-Type: application/json&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -d &lt;span style="color:#4e9a06">&amp;#39;{ &amp;#34;arg1&amp;#34;: 10, &amp;#34;arg2&amp;#34;: 23}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>mathService&lt;/code>服务需要在&lt;code>/add&lt;/code>端点上监听以接收和处理请求。&lt;/p></description></item><item><title>发布/订阅 API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/pubsub_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/pubsub_api/</guid><description>&lt;h2 id="向指定主题发布消息">向指定主题发布消息&lt;/h2>
&lt;p>此端点允许您将数据发布到多个正在监听某个 &lt;code>topic&lt;/code> 的消费者。Dapr 保证此端点至少会被调用一次。&lt;/p>
&lt;h3 id="http-请求">HTTP 请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>POST http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/publish/&amp;lt;pubsubname&amp;gt;/&amp;lt;topic&amp;gt;[?&amp;lt;metadata&amp;gt;]
&lt;/code>&lt;/pre>&lt;h3 id="http-响应代码">HTTP 响应代码&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>204&lt;/td>
 &lt;td>消息已送达&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>403&lt;/td>
 &lt;td>访问控制禁止消息&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>404&lt;/td>
 &lt;td>未提供 pubsub 名称或主题&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>500&lt;/td>
 &lt;td>传递失败&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="url-参数">URL 参数&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>daprPort&lt;/code>&lt;/td>
 &lt;td>Dapr 端口&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>pubsubname&lt;/code>&lt;/td>
 &lt;td>pubsub 组件的名称&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>topic&lt;/code>&lt;/td>
 &lt;td>主题的名称&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>metadata&lt;/code>&lt;/td>
 &lt;td>查询参数，用于元数据，如下所述&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>注意，所有 URL 参数区分大小写。&lt;/p>&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl -X POST http://localhost:3500/v1.0/publish/pubsubName/deathStarStatus &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;Content-Type: application/json&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#39;{
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;status&amp;#34;: &amp;#34;completed&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> }&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="头部">头部&lt;/h3>
&lt;p>&lt;code>Content-Type&lt;/code> 头部告知 Dapr 在构建 CloudEvent 信封时您的数据遵循哪种内容类型。&lt;code>Content-Type&lt;/code> 头部的值填充 CloudEvent 中的 &lt;code>datacontenttype&lt;/code> 字段。&lt;/p>
&lt;p>除非指定，否则 Dapr 假定为 &lt;code>text/plain&lt;/code>。如果您的内容类型是 JSON，请使用值为 &lt;code>application/json&lt;/code> 的 &lt;code>Content-Type&lt;/code> 头部。&lt;/p></description></item><item><title>工作流 API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/workflow_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/workflow_api/</guid><description>&lt;p>Dapr 提供了与工作流交互的功能，并自带一个内置的 &lt;code>dapr&lt;/code> 组件。&lt;/p>
&lt;h2 id="启动工作流请求">启动工作流请求&lt;/h2>
&lt;p>使用指定名称启动一个工作流实例，并可选地指定一个实例 ID。&lt;/p>
&lt;pre tabindex="0">&lt;code>POST http://localhost:3500/v1.0/workflows/&amp;lt;workflowComponentName&amp;gt;/&amp;lt;workflowName&amp;gt;/start[?instanceID=&amp;lt;instanceID&amp;gt;]
&lt;/code>&lt;/pre>&lt;p>请注意，工作流实例 ID 只能包含字母、数字、下划线和破折号。&lt;/p>
&lt;h3 id="url-参数">URL 参数&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>workflowComponentName&lt;/code>&lt;/td>
 &lt;td>对于 Dapr 工作流使用 &lt;code>dapr&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>workflowName&lt;/code>&lt;/td>
 &lt;td>标识工作流类型&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>instanceID&lt;/code>&lt;/td>
 &lt;td>（可选）为特定工作流的每次运行创建的唯一值&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="请求内容">请求内容&lt;/h3>
&lt;p>任何请求内容都将作为输入传递给工作流。Dapr API 会原样传递内容，不会尝试解释。&lt;/p>
&lt;h3 id="http-响应代码">HTTP 响应代码&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>202&lt;/code>&lt;/td>
 &lt;td>已接受&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>400&lt;/code>&lt;/td>
 &lt;td>请求格式错误&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>500&lt;/code>&lt;/td>
 &lt;td>请求格式正确，但 Dapr 代码或底层组件出错&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="响应内容">响应内容&lt;/h3>
&lt;p>API 调用将返回如下的响应：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;instanceID&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;12345678&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="终止工作流请求">终止工作流请求&lt;/h2>
&lt;p>终止具有指定名称和实例 ID 的正在运行的工作流实例。&lt;/p>
&lt;pre tabindex="0">&lt;code>POST http://localhost:3500/v1.0/workflows/&amp;lt;workflowComponentName&amp;gt;/&amp;lt;instanceId&amp;gt;/terminate
&lt;/code>&lt;/pre>

&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">注意&lt;/h4>

 &lt;p>终止一个工作流将同时终止该实例创建的所有子工作流。&lt;/p>
&lt;p>终止一个工作流不会影响由该实例启动的任何正在进行的活动。&lt;/p>


&lt;/div>

&lt;h3 id="url-参数-1">URL 参数&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>workflowComponentName&lt;/code>&lt;/td>
 &lt;td>对于 Dapr 工作流使用 &lt;code>dapr&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>instanceId&lt;/code>&lt;/td>
 &lt;td>为特定工作流的每次运行创建的唯一值&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="http-响应代码-1">HTTP 响应代码&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>202&lt;/code>&lt;/td>
 &lt;td>已接受&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>400&lt;/code>&lt;/td>
 &lt;td>请求格式错误&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>500&lt;/code>&lt;/td>
 &lt;td>请求格式正确，但 Dapr 代码或底层组件出错&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="响应内容-1">响应内容&lt;/h3>
&lt;p>此 API 不返回任何内容。&lt;/p></description></item><item><title>状态管理API参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/state_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/state_api/</guid><description>&lt;h2 id="组件文件">组件文件&lt;/h2>
&lt;p>Dapr的&lt;code>statestore.yaml&lt;/code>组件文件结构如下：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">apiVersion&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">dapr.io/v1alpha1&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">kind&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">Component&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;NAME&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">namespace&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;NAMESPACE&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">spec&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">type&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">state.&amp;lt;TYPE&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">version&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">v1&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#000">name:&amp;lt;KEY&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">value:&amp;lt;VALUE&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;KEY&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">value&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;VALUE&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>设置&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>metadata.name&lt;/code>&lt;/td>
 &lt;td>状态存储的名称。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>spec/metadata&lt;/code>&lt;/td>
 &lt;td>一个开放的键值对元数据，允许绑定定义连接属性。&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="键方案">键方案&lt;/h2>
&lt;p>Dapr状态存储是键/值存储。Dapr要求这些数据存储遵循固定的键方案，以确保数据兼容性。对于一般状态，键格式为：&lt;/p>
&lt;pre tabindex="0">&lt;code>&amp;lt;App ID&amp;gt;||&amp;lt;state key&amp;gt;
&lt;/code>&lt;/pre>&lt;p>对于actor状态，键格式为：&lt;/p>
&lt;pre tabindex="0">&lt;code>&amp;lt;App ID&amp;gt;||&amp;lt;Actor type&amp;gt;||&amp;lt;Actor id&amp;gt;||&amp;lt;state key&amp;gt;
&lt;/code>&lt;/pre>&lt;h2 id="保存状态">保存状态&lt;/h2>
&lt;p>通过该端点可以保存一组状态对象。&lt;/p>
&lt;h3 id="http请求">HTTP请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>POST http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/state/&amp;lt;storename&amp;gt;
&lt;/code>&lt;/pre>&lt;h4 id="url参数">URL参数&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>daprPort&lt;/code>&lt;/td>
 &lt;td>Dapr端口&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>storename&lt;/code>&lt;/td>
 &lt;td>用户配置的&lt;code>statestore.yaml&lt;/code>组件文件中的&lt;code>metadata.name&lt;/code>字段。请参阅上面提到的&lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/api/state_api/#component-file">Dapr状态存储配置结构&lt;/a>。&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>可选的请求元数据通过URL查询参数传递。例如，&lt;/p>
&lt;pre tabindex="0">&lt;code>POST http://localhost:3500/v1.0/state/myStore?metadata.contentType=application/json
&lt;/code>&lt;/pre>&lt;blockquote>
&lt;p>所有URL参数区分大小写。&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>由于&lt;code>||&lt;/code>是用作键方案中的分隔符，因此不能在&lt;code>&amp;lt;state key&amp;gt;&lt;/code>字段中使用。&lt;/p>&lt;/blockquote>
&lt;h4 id="请求体">请求体&lt;/h4>
&lt;p>状态对象的JSON数组，每个状态对象包含以下字段：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>字段&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>key&lt;/code>&lt;/td>
 &lt;td>状态键&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>value&lt;/code>&lt;/td>
 &lt;td>状态值，可以是任何字节数组&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>etag&lt;/code>&lt;/td>
 &lt;td>（可选）状态ETag&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>metadata&lt;/code>&lt;/td>
 &lt;td>（可选）要传递给状态存储的附加键值对&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>options&lt;/code>&lt;/td>
 &lt;td>（可选）状态操作选项；请参阅&lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/api/state_api/#optional-behaviors">状态操作选项&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>&lt;strong>ETag格式：&lt;/strong> Dapr运行时将ETags视为不透明字符串。确切的ETag格式由相应的数据存储定义。&lt;/p></description></item><item><title>Bindings API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/bindings_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/bindings_api/</guid><description>&lt;p>Dapr 为应用程序提供了双向绑定的功能，提供了一种与不同云服务或本地系统交互的统一方法。开发人员可以通过 Dapr API 调用输出绑定，并让 Dapr 运行时通过输入绑定来触发应用程序。&lt;/p>
&lt;p>bindings 的示例包括 &lt;code>Kafka&lt;/code>、&lt;code>Rabbit MQ&lt;/code>、&lt;code>Azure Event Hubs&lt;/code>、&lt;code>AWS SQS&lt;/code>、&lt;code>GCP Storage&lt;/code> 等。&lt;/p>
&lt;h2 id="bindings-结构">Bindings 结构&lt;/h2>
&lt;p>一个 Dapr Binding 的 yaml 文件结构如下：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">apiVersion&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">dapr.io/v1alpha1&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">kind&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">Component&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;NAME&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">namespace&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;NAMESPACE&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">spec&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">type&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">bindings.&amp;lt;TYPE&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">version&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">v1&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">metadata&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;NAME&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">value&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">&amp;lt;VALUE&amp;gt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>metadata.name&lt;/code> 是绑定的名称。&lt;/p>
&lt;p>如果在本地自托管运行，请将此文件放在 &lt;code>components&lt;/code> 文件夹中，与状态存储和消息队列 yml 配置相邻。&lt;/p>
&lt;p>如果在 Kubernetes 上运行，请将组件应用到您的集群中。&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>注意：&lt;/strong> 在生产环境中，切勿在 Dapr 组件文件中放置密码或秘密。有关使用 secret 存储安全存储和检索秘密的信息，请参阅 &lt;a href="https://v1-18.docs.dapr.io/zh-hans/operations/components/setup-secret-store/">设置 Secret Store&lt;/a>&lt;/p>&lt;/blockquote>
&lt;h3 id="绑定方向可选">绑定方向（可选）&lt;/h3>
&lt;p>在某些情况下，向 Dapr 提供额外的信息以指示绑定组件支持的方向是有帮助的。&lt;/p></description></item><item><title>Actors API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/actors_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/actors_api/</guid><description>&lt;p>Dapr 提供了原生、跨平台和跨语言的虚拟 actor 功能。
除了&lt;a href="https://v1-18.docs.dapr.io/zh-hans/developing-applications/sdks/">特定语言的 SDK&lt;/a>，开发者还可以使用以下 API 端点来调用 actor。&lt;/p>
&lt;h2 id="用户服务代码调用-dapr">用户服务代码调用 Dapr&lt;/h2>
&lt;h3 id="调用-actor-方法">调用 actor 方法&lt;/h3>
&lt;p>使用 Dapr 调用 actor 方法。&lt;/p>
&lt;h4 id="http-请求">HTTP 请求&lt;/h4>
&lt;pre tabindex="0">&lt;code>POST/GET/PUT/DELETE http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/actors/&amp;lt;actorType&amp;gt;/&amp;lt;actorId&amp;gt;/method/&amp;lt;method&amp;gt;
&lt;/code>&lt;/pre>&lt;h4 id="http-响应代码">HTTP 响应代码&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>200&lt;/td>
 &lt;td>请求成功&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>500&lt;/td>
 &lt;td>请求失败&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>XXX&lt;/td>
 &lt;td>上游调用的状态码&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h4 id="url-参数">URL 参数&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>daprPort&lt;/code>&lt;/td>
 &lt;td>Dapr 端口。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>actorType&lt;/code>&lt;/td>
 &lt;td>actor 类型。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>actorId&lt;/code>&lt;/td>
 &lt;td>actor ID。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>method&lt;/code>&lt;/td>
 &lt;td>要调用的方法名称。&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>注意，所有 URL 参数区分大小写。&lt;/p>&lt;/blockquote>
&lt;h4 id="示例">示例&lt;/h4>
&lt;p>调用 actor 上的方法示例：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl -X POST http://localhost:3500/v1.0/actors/stormtrooper/50/method/shoot &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;Content-Type: application/json&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>您可以在请求体中提供方法参数和值，例如在 curl 中使用 &lt;code>-d &amp;quot;{\&amp;quot;param\&amp;quot;:\&amp;quot;value\&amp;quot;}&amp;quot;&lt;/code>。调用带参数的 actor 方法示例：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl -X POST http://localhost:3500/v1.0/actors/x-wing/33/method/fly &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;Content-Type: application/json&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#39;{
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;destination&amp;#34;: &amp;#34;Hoth&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> }&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>或&lt;/p></description></item><item><title>Secrets API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/secrets_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/secrets_api/</guid><description>&lt;h2 id="获取-secret">获取 Secret&lt;/h2>
&lt;p>此接口允许您获取指定 secret 存储中的 secret 值。&lt;/p>
&lt;h3 id="http-请求">HTTP 请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>GET http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/secrets/&amp;lt;secret-store-name&amp;gt;/&amp;lt;name&amp;gt;
&lt;/code>&lt;/pre>&lt;h4 id="url-参数">URL 参数&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>daprPort&lt;/td>
 &lt;td>Dapr 端口&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>secret-store-name&lt;/td>
 &lt;td>要从中获取 secret 的 secret 存储名称&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>name&lt;/td>
 &lt;td>要获取的 secret 名称&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>请注意，所有 URL 参数区分大小写。&lt;/p>&lt;/blockquote>
&lt;h4 id="查询参数">查询参数&lt;/h4>
&lt;p>某些 secret 存储支持&lt;strong>可选&lt;/strong>的、每个请求的元数据属性。您可以通过查询参数来提供这些属性。例如：&lt;/p>
&lt;pre tabindex="0">&lt;code>GET http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/secrets/&amp;lt;secret-store-name&amp;gt;/&amp;lt;name&amp;gt;?metadata.version_id=15
&lt;/code>&lt;/pre>&lt;p>请注意，并非所有 secret 存储都支持相同的参数集。例如：&lt;/p>
&lt;ul>
&lt;li>Hashicorp Vault、GCP Secret Manager 和 AWS Secret Manager 支持 &lt;code>version_id&lt;/code> 参数&lt;/li>
&lt;li>只有 AWS Secret Manager 支持 &lt;code>version_stage&lt;/code> 参数&lt;/li>
&lt;li>只有 Kubernetes Secrets 支持 &lt;code>namespace&lt;/code> 参数
请查阅每个 &lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/components-reference/supported-secret-stores/">secret 存储的文档&lt;/a> 以获取支持的参数列表。&lt;/li>
&lt;/ul>
&lt;h3 id="http-响应">HTTP 响应&lt;/h3>
&lt;h4 id="响应体">响应体&lt;/h4>
&lt;p>如果 secret 存储支持 secret 中的多个键值，将返回一个 JSON 负载，其中键名作为字段及其各自的值。&lt;/p></description></item><item><title>配置 API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/configuration_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/configuration_api/</guid><description>&lt;h2 id="获取配置">获取配置&lt;/h2>
&lt;p>该端点用于从存储中获取配置。&lt;/p>
&lt;h3 id="http-请求">HTTP 请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>GET http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/configuration/&amp;lt;storename&amp;gt;
&lt;/code>&lt;/pre>&lt;h4 id="url-参数">URL 参数&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>daprPort&lt;/code>&lt;/td>
 &lt;td>Dapr 端口&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>storename&lt;/code>&lt;/td>
 &lt;td>&lt;code>metadata.name&lt;/code> 字段组件文件。请参阅 &lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/resource-specs/component-schema/">组件规范&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h4 id="查询参数">查询参数&lt;/h4>
&lt;p>如果不提供查询参数，将返回所有配置项。
要指定需要获取的配置项的键，请使用一个或多个 &lt;code>key&lt;/code> 查询参数。例如：&lt;/p>
&lt;pre tabindex="0">&lt;code>GET http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/configuration/mystore?key=config1&amp;amp;key=config2
&lt;/code>&lt;/pre>&lt;p>要检索所有配置项：&lt;/p>
&lt;pre tabindex="0">&lt;code>GET http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/configuration/mystore
&lt;/code>&lt;/pre>&lt;h4 id="请求体">请求体&lt;/h4>
&lt;p>无&lt;/p>
&lt;h3 id="http-响应">HTTP 响应&lt;/h3>
&lt;h4 id="响应代码">响应代码&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>204&lt;/code>&lt;/td>
 &lt;td>获取操作成功&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>400&lt;/code>&lt;/td>
 &lt;td>配置存储缺失或配置错误或请求格式错误&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>500&lt;/code>&lt;/td>
 &lt;td>获取配置失败&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h4 id="响应体">响应体&lt;/h4>
&lt;p>每个配置项的键/值对的 JSON 编码值。&lt;/p>
&lt;h3 id="示例">示例&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl -X GET &lt;span style="color:#4e9a06">&amp;#39;http://localhost:3500/v1.0/configuration/mystore?key=myConfigKey&amp;#39;&lt;/span> 
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;blockquote>
&lt;p>上述命令返回以下 JSON：&lt;/p>&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;myConfigKey&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;value&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;myConfigValue&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="订阅配置">订阅配置&lt;/h2>
&lt;p>该端点用于订阅配置更改。当配置存储中的值被更新或删除时，会发送通知。这使应用程序能够对配置更改做出反应。&lt;/p>
&lt;h3 id="http-请求-1">HTTP 请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>GET http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/configuration/&amp;lt;storename&amp;gt;/subscribe
&lt;/code>&lt;/pre>&lt;h4 id="url-参数-1">URL 参数&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>daprPort&lt;/code>&lt;/td>
 &lt;td>Dapr 端口&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>storename&lt;/code>&lt;/td>
 &lt;td>&lt;code>metadata.name&lt;/code> 字段组件文件。请参阅 &lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/resource-specs/component-schema/">组件规范&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h4 id="查询参数-1">查询参数&lt;/h4>
&lt;p>如果不提供查询参数，将订阅所有配置项。
要指定需要订阅的配置项的键，请使用一个或多个 &lt;code>key&lt;/code> 查询参数。例如：&lt;/p></description></item><item><title>分布式锁 API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/distributed_lock_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/distributed_lock_api/</guid><description>&lt;h2 id="锁">锁&lt;/h2>
&lt;p>通过此端点，您可以通过提供锁所有者的名称和要锁定的资源 ID 来获取锁。&lt;/p>
&lt;h3 id="http-请求">HTTP 请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>POST http://localhost:&amp;lt;daprPort&amp;gt;/v1.0-alpha1/lock/&amp;lt;storename&amp;gt;
&lt;/code>&lt;/pre>&lt;h4 id="url-参数">URL 参数&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>daprPort&lt;/code>&lt;/td>
 &lt;td>Dapr 端口&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>storename&lt;/code>&lt;/td>
 &lt;td>&lt;code>metadata.name&lt;/code> 字段的组件文件。请参阅&lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/resource-specs/component-schema/">组件模式&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h4 id="查询参数">查询参数&lt;/h4>
&lt;p>无&lt;/p>
&lt;h3 id="http-响应代码">HTTP 响应代码&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>200&lt;/td>
 &lt;td>请求成功&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>204&lt;/td>
 &lt;td>空响应&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>400&lt;/td>
 &lt;td>请求格式错误&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>500&lt;/td>
 &lt;td>请求失败&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="http-请求体">HTTP 请求体&lt;/h3>
&lt;p>锁端点需要接收以下 JSON 负载：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;resourceId&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;lockOwner&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;expiryInSeconds&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>字段&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>resourceId&lt;/td>
 &lt;td>要锁定的资源 ID。可以是任何值&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>lockOwner&lt;/td>
 &lt;td>锁所有者的名称。每次请求都应设置为唯一值&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>expiryInSeconds&lt;/td>
 &lt;td>锁定在过期前保持的时间（秒）&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="http-响应体">HTTP 响应体&lt;/h3>
&lt;p>锁端点会返回以下负载：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;success&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="示例">示例&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl -X POST http://localhost:3500/v1.0-alpha/lock/redisStore &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -H &lt;span style="color:#4e9a06">&amp;#34;Content-Type: application/json&amp;#34;&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> -d &lt;span style="color:#4e9a06">&amp;#39;{
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;resourceId&amp;#34;: &amp;#34;lock1&amp;#34;,
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;lockOwner&amp;#34;: &amp;#34;vader&amp;#34;,
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> &amp;#34;expiryInSeconds&amp;#34;: 60
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06"> }&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;success&amp;#34;&lt;/span>: &lt;span style="color:#4e9a06">&amp;#34;true&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="解锁">解锁&lt;/h2>
&lt;p>通过此端点，您可以根据锁所有者和资源 ID 解锁现有锁。&lt;/p></description></item><item><title>健康 API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/health_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/health_api/</guid><description>&lt;p>Dapr 提供健康检查功能，用于检查 Dapr 的就绪状态或存活状态，以及从 SDKs 检查初始化的就绪性。&lt;/p>
&lt;h2 id="获取-dapr-健康状态">获取 Dapr 健康状态&lt;/h2>
&lt;p>可以通过以下方式获取 Dapr 的健康状态：&lt;/p>
&lt;ul>
&lt;li>检查 sidecar 的健康状况&lt;/li>
&lt;li>检查 sidecar 的健康状况，包括组件的就绪性，适用于初始化期间。&lt;/li>
&lt;/ul>
&lt;h3 id="等待-dapr-http-端口可用">等待 Dapr HTTP 端口可用&lt;/h3>
&lt;p>等待所有组件初始化完成，Dapr HTTP 端口可用，同时应用程序通道已初始化。例如，此端点用于 Kubernetes 的存活性探针。&lt;/p>
&lt;h4 id="http-请求">HTTP 请求&lt;/h4>
&lt;pre tabindex="0">&lt;code>GET http://localhost:&amp;lt;daprPort&amp;gt;/v1.0/healthz
&lt;/code>&lt;/pre>&lt;h4 id="http-响应代码">HTTP 响应代码&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>204&lt;/td>
 &lt;td>Dapr 是健康的&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>500&lt;/td>
 &lt;td>Dapr 是不健康的&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h4 id="url-参数">URL 参数&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>daprPort&lt;/td>
 &lt;td>Dapr 端口&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h4 id="示例">示例&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>curl -i http://localhost:3500/v1.0/healthz
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="等待-outbound-路径的特定健康检查">等待 &lt;code>/outbound&lt;/code> 路径的特定健康检查&lt;/h3>
&lt;p>等待所有组件初始化完成，Dapr HTTP 端口可用，但应用程序通道尚未建立。此端点允许您的应用程序在应用程序通道初始化之前调用 Dapr sidecar 的 API，例如使用 secret API 读取机密信息。在 Dapr SDKs 中，可以使用 &lt;code>waitForSidecar&lt;/code> 方法（例如 .NET 和 Java SDKs）来检查 sidecar 是否已正确初始化，以便进行后续调用。&lt;/p></description></item><item><title>元数据 API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/metadata_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/metadata_api/</guid><description>&lt;p>Dapr 提供了一个元数据 API，可以返回有关 sidecar 的信息，从而支持运行时发现。元数据端点返回以下信息：&lt;/p>
&lt;ul>
&lt;li>运行时版本&lt;/li>
&lt;li>已加载的资源列表（包括 &lt;code>components&lt;/code>、&lt;code>subscriptions&lt;/code> 和 &lt;code>HttpEndpoints&lt;/code>）&lt;/li>
&lt;li>注册的 actor 类型&lt;/li>
&lt;li>启用的功能&lt;/li>
&lt;li>应用程序连接的详细信息&lt;/li>
&lt;li>自定义的临时属性信息。&lt;/li>
&lt;/ul>
&lt;h2 id="元数据-api">元数据 API&lt;/h2>
&lt;h3 id="组件">组件&lt;/h3>
&lt;p>每个加载的组件提供其名称、类型和版本，以及支持的功能信息。这些功能适用于 &lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/components-reference/supported-state-stores/">state store&lt;/a> 和 &lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/components-reference/supported-bindings/">binding&lt;/a> 组件类型。下表显示了给定版本的组件类型和能力列表。此列表可能会在将来扩展，仅代表当前已加载组件的能力。&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>组件类型&lt;/th>
 &lt;th>能力&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>State Store&lt;/td>
 &lt;td>ETAG, TRANSACTION, ACTOR, QUERY_API&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Binding&lt;/td>
 &lt;td>INPUT_BINDING, OUTPUT_BINDING&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="httpendpoints">HTTPEndpoints&lt;/h3>
&lt;p>每个加载的 &lt;code>HttpEndpoint&lt;/code> 提供一个名称，以便轻松识别与运行时关联的 Dapr 资源。&lt;/p>
&lt;h3 id="订阅">订阅&lt;/h3>
&lt;p>元数据 API 返回应用程序已向 Dapr 运行时注册的 pub/sub 订阅列表。这包括 pub/sub 名称、主题、路由、死信主题、订阅类型和与订阅相关的元数据。&lt;/p>
&lt;h3 id="启用的功能">启用的功能&lt;/h3>
&lt;p>通过配置规范启用的功能列表（包括构建时的覆盖）。&lt;/p>
&lt;h3 id="应用程序连接详细信息">应用程序连接详细信息&lt;/h3>
&lt;p>元数据 API 返回与 Dapr 连接到应用程序相关的信息。这包括应用程序端口、协议、主机、最大并发性以及健康检查的详细信息。&lt;/p>
&lt;h3 id="属性">属性&lt;/h3>
&lt;p>元数据 API 允许您以键值对的格式存储附加的属性信息。这些信息是临时的内存信息，如果 sidecar 重新加载则不会持久化。此信息应在 sidecar 创建时添加（例如，在应用程序启动后）。&lt;/p>
&lt;h2 id="获取-dapr-sidecar-信息">获取 Dapr sidecar 信息&lt;/h2>
&lt;p>从元数据端点获取 Dapr sidecar 信息。&lt;/p></description></item><item><title>Placement API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/placement_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/placement_api/</guid><description>&lt;p>Dapr 提供了一个 HTTP API &lt;code>/placement/state&lt;/code>，用于 Placement 服务，公开 placement 表信息。该 API 在 sidecar 上与 healthz 使用相同的端口。这是一个未经身份验证的端点，默认情况下是禁用的。&lt;/p>
&lt;p>要在自托管模式下启用 placement 元数据，可以设置 &lt;code>DAPR_PLACEMENT_METADATA_ENABLED&lt;/code> 环境变量为 &lt;code>true&lt;/code>，或者在 Placement 服务上使用 &lt;code>metadata-enabled&lt;/code> 命令行参数。请参阅&lt;a href="https://v1-18.docs.dapr.io/zh-hans/operations/hosting/self-hosted/self-hosted-no-docker/#enable-actors">如何在自托管模式下运行 Placement 服务&lt;/a>。&lt;/p>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">重要&lt;/h4>

 在 &lt;a href="https://v1-18.docs.dapr.io/zh-hans/developing-applications/building-blocks/actors/namespaced-actors/">多租户模式&lt;/a>下运行 placement 时，请禁用 &lt;code>metadata-enabled&lt;/code> 命令行参数，以防止不同命名空间之间的数据泄露。

&lt;/div>

&lt;p>如果您在 Kubernetes 上使用 Helm 部署 Placement 服务，要启用 placement 元数据，请将 &lt;code>dapr_placement.metadataEnabled&lt;/code> 设置为 &lt;code>true&lt;/code>。&lt;/p>
&lt;h2 id="使用场景">使用场景&lt;/h2>
&lt;p>placement 表 API 可用于检索当前的 placement 表，其中包含所有注册的 actor。这对于调试非常有帮助，并允许工具提取和展示关于 actor 的信息。&lt;/p>
&lt;h2 id="http-请求">HTTP 请求&lt;/h2>
&lt;pre tabindex="0">&lt;code>GET http://localhost:&amp;lt;healthzPort&amp;gt;/placement/state
&lt;/code>&lt;/pre>&lt;h2 id="http-响应代码">HTTP 响应代码&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>200&lt;/td>
 &lt;td>成功返回 placement 表信息&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>500&lt;/td>
 &lt;td>无法返回 placement 表信息&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="http-响应体">HTTP 响应体&lt;/h2>
&lt;p>&lt;strong>Placement 表 API 响应对象&lt;/strong>&lt;/p></description></item><item><title>加密 API 参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/cryptography_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/cryptography_api/</guid><description>&lt;p>Dapr 通过加密模块提供跨平台和跨语言的加密和解密支持。除了&lt;a href="https://v1-18.docs.dapr.io/zh-hans/developing-applications/sdks/">特定语言的 SDK&lt;/a>之外，开发者还可以使用下面的 HTTP API 端点来调用这些功能。&lt;/p>
&lt;blockquote>
&lt;p>HTTP API 仅用于开发和测试。在生产环境中，强烈推荐使用 SDK，因为它们实现了 gRPC API，提供比 HTTP API 更高的性能和功能。&lt;/p>&lt;/blockquote>
&lt;h2 id="加密数据">加密数据&lt;/h2>
&lt;p>此端点允许您使用指定的密钥和加密组件加密以字节数组形式提供的值。&lt;/p>
&lt;h3 id="http-请求">HTTP 请求&lt;/h3>
&lt;pre tabindex="0">&lt;code>PUT http://localhost:&amp;lt;daprPort&amp;gt;/v1.0-alpha1/crypto/&amp;lt;crypto-store-name&amp;gt;/encrypt
&lt;/code>&lt;/pre>&lt;h4 id="url-参数">URL 参数&lt;/h4>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>daprPort&lt;/td>
 &lt;td>Dapr 端口&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>crypto-store-name&lt;/td>
 &lt;td>用于获取加密密钥的加密存储名称&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>注意，所有 URL 参数区分大小写。&lt;/p>&lt;/blockquote>
&lt;h4 id="请求头">请求头&lt;/h4>
&lt;p>通过设置请求头来配置其他加密参数。下表详细说明了每个加密请求需要设置的必需和可选请求头。&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>请求头键&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;th>允许值&lt;/th>
 &lt;th>必需性&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>dapr-key-name&lt;/td>
 &lt;td>用于加密操作的密钥名称&lt;/td>
 &lt;td>&lt;/td>
 &lt;td>是&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dapr-key-wrap-algorithm&lt;/td>
 &lt;td>使用的密钥包装算法&lt;/td>
 &lt;td>&lt;code>A256KW&lt;/code>, &lt;code>A128CBC&lt;/code>, &lt;code>A192CBC&lt;/code>, &lt;code>RSA-OAEP-256&lt;/code>&lt;/td>
 &lt;td>是&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dapr-omit-decryption-key-name&lt;/td>
 &lt;td>如果为 true，则在输出中省略请求头 &lt;code>dapr-decryption-key-name&lt;/code> 中的解密密钥名称。&lt;/td>
 &lt;td>以下值将被接受为 true：&lt;code>y&lt;/code>, &lt;code>yes&lt;/code>, &lt;code>true&lt;/code>, &lt;code>t&lt;/code>, &lt;code>on&lt;/code>, &lt;code>1&lt;/code>&lt;/td>
 &lt;td>否&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dapr-decryption-key-name&lt;/td>
 &lt;td>如果 &lt;code>dapr-omit-decryption-key-name&lt;/code> 为 true，则包含要在输出中包含的预期解密密钥的名称。&lt;/td>
 &lt;td>&lt;/td>
 &lt;td>仅当 &lt;code>dapr-omit-decryption-key-name&lt;/code> 为 true 时必需&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dapr-data-encryption-cipher&lt;/td>
 &lt;td>用于加密操作的密码&lt;/td>
 &lt;td>&lt;code>aes-gcm&lt;/code> 或 &lt;code>chacha20-poly1305&lt;/code>&lt;/td>
 &lt;td>否&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="http-响应">HTTP 响应&lt;/h3>
&lt;h4 id="响应体">响应体&lt;/h4>
&lt;p>加密请求的响应将其内容类型请求头设置为 &lt;code>application/octet-stream&lt;/code>，因为它返回一个包含加密数据的字节数组。&lt;/p></description></item><item><title>作业API参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/jobs_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/jobs_api/</guid><description>&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">注意&lt;/h4>

 作业API目前处于测试阶段。

&lt;/div>

&lt;p>使用作业API，您可以预定未来的作业和任务。&lt;/p>
&lt;blockquote>
&lt;p>HTTP API仅供开发和测试使用。在生产环境中，强烈推荐使用SDK，因为它们实现了gRPC API，提供比HTTP API更高的性能和功能。&lt;/p>&lt;/blockquote>
&lt;h2 id="调度作业">调度作业&lt;/h2>
&lt;p>通过名称来调度作业。&lt;/p>
&lt;pre tabindex="0">&lt;code>POST http://localhost:3500/v1.0-alpha1/jobs/&amp;lt;name&amp;gt;
&lt;/code>&lt;/pre>&lt;h3 id="url参数">URL参数&lt;/h3>


&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">注意&lt;/h4>

 必须提供&lt;code>schedule&lt;/code>或&lt;code>dueTime&lt;/code>中的至少一个，也可以同时提供。

&lt;/div>

&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>name&lt;/code>&lt;/td>
 &lt;td>您正在调度的作业的名称&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>data&lt;/code>&lt;/td>
 &lt;td>一个JSON格式的值或对象。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>schedule&lt;/code>&lt;/td>
 &lt;td>作业的可选计划。格式详情如下。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dueTime&lt;/code>&lt;/td>
 &lt;td>作业应激活的时间，或&amp;quot;一次性&amp;quot;时间，如果未提供其他调度类型字段。接受RFC3339格式的时间字符串、Go持续时间字符串（从创建时间计算）或非重复的ISO8601格式。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>repeats&lt;/code>&lt;/td>
 &lt;td>作业应触发的次数。如果未设置，作业将无限期运行或直到过期。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>ttl&lt;/code>&lt;/td>
 &lt;td>作业的生存时间或过期时间。接受RFC3339格式的时间字符串、Go持续时间字符串（从作业创建时间计算）或非重复的ISO8601格式。&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h4 id="schedule">schedule&lt;/h4>
&lt;p>&lt;code>schedule&lt;/code>接受systemd计时器风格的cron表达式，以及以&amp;rsquo;@&amp;lsquo;为前缀的人类可读周期字符串。&lt;/p>
&lt;p>systemd计时器风格的cron表达式包含6个字段：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>秒&lt;/th>
 &lt;th>分钟&lt;/th>
 &lt;th>小时&lt;/th>
 &lt;th>月中的某天&lt;/th>
 &lt;th>月份&lt;/th>
 &lt;th>星期中的某天&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>0-59&lt;/td>
 &lt;td>0-59&lt;/td>
 &lt;td>0-23&lt;/td>
 &lt;td>1-31&lt;/td>
 &lt;td>1-12/jan-dec&lt;/td>
 &lt;td>0-6/sun-sat&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h5 id="示例-1">示例 1&lt;/h5>
&lt;p>&amp;ldquo;0 30 * * * *&amp;rdquo; - 每小时的30分钟&lt;/p>
&lt;h5 id="示例-2">示例 2&lt;/h5>
&lt;p>&amp;ldquo;0 15 3 * * *&amp;rdquo; - 每天03:15&lt;/p>
&lt;p>周期字符串表达式：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>条目&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;th>等同于&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>@every &lt;duration>&lt;/td>
 &lt;td>每隔&lt;duration>运行一次 (例如 &amp;lsquo;@every 1h30m&amp;rsquo;)&lt;/td>
 &lt;td>N/A&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>@yearly (或 @annually)&lt;/td>
 &lt;td>每年运行一次，午夜，1月1日&lt;/td>
 &lt;td>0 0 0 1 1 *&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>@monthly&lt;/td>
 &lt;td>每月运行一次，午夜，月初&lt;/td>
 &lt;td>0 0 0 1 * *&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>@weekly&lt;/td>
 &lt;td>每周运行一次，周日午夜&lt;/td>
 &lt;td>0 0 0 * * 0&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>@daily (或 @midnight)&lt;/td>
 &lt;td>每天运行一次，午夜&lt;/td>
 &lt;td>0 0 0 * * *&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>@hourly&lt;/td>
 &lt;td>每小时运行一次，整点&lt;/td>
 &lt;td>0 0 * * * *&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="请求体">请求体&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;data&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;some data&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;dueTime&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;30s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="http响应代码">HTTP响应代码&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>204&lt;/code>&lt;/td>
 &lt;td>已接受&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>400&lt;/code>&lt;/td>
 &lt;td>请求格式错误&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>500&lt;/code>&lt;/td>
 &lt;td>请求格式正确，但dapr代码或调度器控制平面服务中出错&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="响应内容">响应内容&lt;/h3>
&lt;p>以下示例curl命令创建一个名为&lt;code>jobforjabba&lt;/code>的作业，并指定&lt;code>schedule&lt;/code>、&lt;code>repeats&lt;/code>和&lt;code>data&lt;/code>。&lt;/p></description></item><item><title>会话API参考</title><link>https://v1-18.docs.dapr.io/zh-hans/reference/api/conversation_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/zh-hans/reference/api/conversation_api/</guid><description>&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Alpha&lt;/h4>

 会话API目前为&lt;a href="https://v1-18.docs.dapr.io/zh-hans/operations/components/certification-lifecycle/#certification-levels">alpha&lt;/a>阶段。

&lt;/div>

&lt;p>Dapr提供了一种API，用于与大型语言模型（LLMs）进行交互。通过提示缓存和模糊化个人身份信息（PII）等功能，提升了性能和安全性。&lt;/p>
&lt;h2 id="会话">会话&lt;/h2>
&lt;p>通过此端点可以与LLMs进行会话。&lt;/p>
&lt;pre tabindex="0">&lt;code>POST /v1.0-alpha1/conversation/&amp;lt;llm-name&amp;gt;/converse
&lt;/code>&lt;/pre>&lt;h3 id="url参数">URL参数&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>参数&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>llm-name&lt;/code>&lt;/td>
 &lt;td>LLM组件的名称。&lt;a href="https://v1-18.docs.dapr.io/zh-hans/reference/components-reference/supported-conversation/">查看所有可用会话组件的列表。&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="请求体">请求体&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>字段&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>conversationContext&lt;/code>&lt;/td>
 &lt;td>会话的上下文信息，用于维持对话状态。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>inputs&lt;/code>&lt;/td>
 &lt;td>用户输入的文本数组。&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>parameters&lt;/code>&lt;/td>
 &lt;td>额外的参数配置。&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="请求示例">请求示例&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a40000">REQUEST&lt;/span> &lt;span style="color:#a40000">=&lt;/span> &lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;inputs&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;什么是Dapr&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;为什么使用Dapr&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">],&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;parameters&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000;font-weight:bold">{},&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="http响应代码">HTTP响应代码&lt;/h3>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>代码&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>202&lt;/code>&lt;/td>
 &lt;td>请求已被接受&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>400&lt;/code>&lt;/td>
 &lt;td>请求格式错误&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>500&lt;/code>&lt;/td>
 &lt;td>请求格式正确，但Dapr代码或底层组件出错&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h3 id="响应示例">响应示例&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a40000">RESPONSE&lt;/span> &lt;span style="color:#a40000">=&lt;/span> &lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;outputs&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000;font-weight:bold">[&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;result&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Dapr是分布式应用运行时...&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;parameters&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000;font-weight:bold">{},&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000;font-weight:bold">},&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;result&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Dapr可以帮助开发者...&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">&amp;#34;parameters&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000;font-weight:bold">{},&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000;font-weight:bold">],&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="下一步">下一步&lt;/h2>
&lt;p>&lt;a href="https://v1-18.docs.dapr.io/zh-hans/developing-applications/building-blocks/conversation/conversation-overview/">会话API概述&lt;/a>&lt;/p></description></item></channel></rss>