获取 Lambda

按 ID 获取指定 lambda。

认证

需要 X-Glue-Authentication

Path 参数

参数 类型 描述
lambda_id string Lambda 标识符

HTTP 请求

1GET /api/v0/lambdas/f1a2b3c4-d5e6-7890-abcd-ef0123456789 HTTP/1.1
2Host: api.hola.cloud
3X-Glue-Authentication: YOUR_TOKEN

示例

1curl -X GET "https://api.hola.cloud/api/v0/lambdas/f1a2b3c4-d5e6-7890-abcd-ef0123456789" \
2  -H "X-Glue-Authentication: YOUR_TOKEN"

响应

 1{
 2  "id": "f1a2b3c4-d5e6-7890-abcd-ef0123456789",
 3  "created_timestamp": 1751378400,
 4  "owner": "user_123",
 5  "project_id": "project_456",
 6  "name": "hello-world",
 7  "language": "javascript",
 8  "code": "export default (req) => ({ body: { message: \"Hello, World!\" } })",
 9  "method": "GET",
10  "path": "/hello-world"
11}

错误码

代码 描述
401 认证缺失或无效
404 Lambda 未找到

评论

发表评论