跳到主要内容

调用云托管服务

GET 

https://your-envId.api.tcloudbasegateway.com/v1/cloudrun/:name/:anyPath

调用指定云托管服务。

通过开放 API 访问云托管时,针对可能存在的合规封禁风险,开放 API 会对响应头进行如下更改:

  1. 对于所有的 GET 请求返回的响应,响应头添加 Content-Disposition: attachment
  2. 对于非文本类型(文本类型包括响应头Content-Type中指示application/jsonapplication/x-www-form-urlencodedtext/plain类型的返回内容)的响应,响应头添加 Content-Disposition: attachment

注意SSE(Server-Sent Event)WebSocket 请求不受到上述限制。

Request

Path Parameters

    name stringrequired

    Possible values: Value must match regular expression ^[a-zA-Z][a-zA-Z0-9_-]{0,58}[a-zA-Z0-9]$

    需要调用的服务名称

    anyPath string

    追加任意路径

Responses

调用成功时返回

Response Headers
  • X-Request-Id string

    请求ID

Schema
    property name* any

Authorization: http

name: JWTAuthtype: httpscheme: bearerdescription: 环境 ID 所对应的 token,使用登录鉴权(v2)获取
curl -L 'https://your-envId.api.tcloudbasegateway.com/v1/cloudrun/:name/:anyPath' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Request Collapse all
Base URL
https://your-envId.api.tcloudbasegateway.com
Auth
Parameters
— pathrequired
— path
ResponseClear

Click the Send API Request button above and see the response here!