Invoke CloudBase Run service
POST/v1/cloudrun/:name/:anyPath
Invoke the specified CloudBase Run service.
When calling CloudBase Run through the open APIs, the response headers are adjusted to mitigate potential compliance-related blocking risks:
- For all responses to
GETrequests, the headerContent-Disposition: attachmentis added. - For non-text responses (text types include
application/json,application/x-www-form-urlencoded, andtext/plainin the responseContent-Typeheader), the headerContent-Disposition: attachmentis added.
Note:
SSE (Server-Sent Event)andWebSocketrequests are exempt from these adjustments.
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]$
Name of the service to invoke
anyPath string
Append any additional path segments
- application/json
Body
Request payload for invoking the CloudBase Run service
property name* any
Responses
- 200
- 403
- 404
- default
Returned when the call succeeds
Response Headers
X-Request-Id string
Request ID
- application/json
- text/plain
- Schema
- Example (from schema)
- Echo
Schema
property name* any
{}
echo
{
"a": 1,
"b": 2
}
- Schema
- Text
Schema
string
text
Hello world
Returned when the CloudBase Run call fails
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
- ServiceForbidden
Schema
code Error code (string)
message Error message (string)
requestId Request ID (string)
{
"code": "string",
"message": "string",
"requestId": "string"
}
Access to the CloudBase Run service was denied
{
"code": "SERVICE_FORBIDDEN",
"message": "Service forbidden. For more information, please refer to https://docs.cloudbase.net/error-code/service",
"requestId": "yyxxxxxx-yyyy-yyyy-zzzz-xxxxxxzzyyyy"
}
Returned when the CloudBase Run call fails
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
- ServiceNotFound
Schema
code Error code (string)
message Error message (string)
requestId Request ID (string)
{
"code": "string",
"message": "string",
"requestId": "string"
}
CloudBase Run service not found
{
"code": "SERVICE_NOT_FOUND",
"message": "Service not found. For more information, please refer to https://docs.cloudbase.net/error-code/service",
"requestId": "yyxxxxxx-yyyy-yyyy-zzzz-xxxxxxzzyyyy"
}
Common error information, see https://docs.cloudbase.net/error-code/service for details
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
- InvalidHost
Schema
code Error code (string)
message Error message (string)
requestId Request ID (string)
{
"code": "string",
"message": "string",
"requestId": "string"
}
Invalid request address
{
"code": "INVALID_HOST",
"message": "xxx",
"requestId": "xxx"
}
Loading...