Core concepts(核心概念)¶
Endpoint definitions¶
An endpoint definition defines an API endpoint that consumes header, query, path, and body parameters to call Foundry functions or actions with those parameters. Endpoint definitions belong to a single endpoint set.
Endpoint sets¶
An endpoint set is a Compass resource for grouping related endpoints. This resource manages permissions for developers to view, edit, publish, and deploy endpoint definitions. You can interact with an endpoint set's endpoint definitions in the Configuration tab.
Subdomains¶
A subdomain must be registered and approved through Control Panel before endpoints can be served. Subdomains provide custom domains for accessing deployed endpoint releases.
When you create a new endpoint set, you will be prompted to register a subdomain. You must register a subdomain for each endpoint set in order to link that subdomain to your endpoint definitions. Standalone subdomains created manually through Control Panel are not supported by Custom Endpoints.
Endpoint set publishing and releases¶
You must first publish an endpoint set to create a versioned snapshot of it. Publishing an endpoint set creates an immutable release tied to a semantic version, and is similar to using Git. Publishing captures the current state much like git commit, and assigns it a semantic version tag similarly to git tag. Each endpoint set release is immutable, but can be deleted.
Deploy endpoint set releases¶
Endpoints become accessible only after deploying an endpoint set release to a subdomain. Multiple releases can be deployed simultaneously. Requests use the version specified in the endpoint-api-version header, defaulting to the latest deployed version when unspecified.
中文翻译¶
核心概念¶
端点定义(Endpoint definitions)¶
端点定义定义了一个API端点,该端点接收标头(header)、查询(query)、路径(path)和请求体(body)参数,并利用这些参数调用Foundry的函数或操作。端点定义归属于单个端点集(endpoint set)。
端点集(Endpoint sets)¶
端点集是一种Compass资源,用于对相关端点进行分组。该资源管理开发人员查看、编辑、发布和部署端点定义的权限。您可以在配置选项卡中与端点集的端点定义进行交互。
子域名(Subdomains)¶
子域名必须通过控制面板(Control Panel)注册并获批后,端点才能对外提供服务。子域名为访问已部署的端点版本提供自定义域名。
创建新的端点集时,系统会提示您注册子域名。您必须为每个端点集注册一个子域名,以便将该子域名与您的端点定义关联。自定义端点(Custom Endpoints)不支持通过控制面板手动创建的独立子域名。
端点集发布与版本(Endpoint set publishing and releases)¶
您需要先发布端点集,才能为其创建带版本号的快照。发布端点集会生成一个与语义化版本(semantic version)绑定的不可变版本,其操作方式类似于使用Git。发布过程会像git commit一样捕获当前状态,并像git tag一样为其分配语义化版本标签。每个端点集版本都是不可变的,但可以删除。
部署端点集版本(Deploy endpoint set releases)¶
只有将端点集版本部署到子域名后,端点才能被访问。多个版本可以同时部署。请求使用endpoint-api-version标头中指定的版本,若未指定则默认使用最新部署的版本。