Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: 新增url类型的对象触发器, 以post方式发送数据 #7095

Open
baozhoutao opened this issue Nov 20, 2024 · 1 comment
Open
Assignees

Comments

@baozhoutao
Copy link
Contributor

Summary 摘要

Why should this be worked on? 此需求的应用场景?

@baozhoutao
Copy link
Contributor Author

请求方法

  • HTTP 方法: POST

请求头

  • Content-Type: application/json
  • 如果触发器配置中指定了认证信息,可以添加额外的请求头

请求参数(Body)

请求体应为一个 JSON 对象,结构如下:

  • objectName: string - 涉及触发器的对象名称(具体含义依赖于上下文)。
  • userId: string - 触发请求的用户唯一标识符。
  • spaceId: string - 与请求相关的空间或环境标识符。
  • doc: object - 与触发器相关的文档或数据(结构取决于具体应用)。
    示例
{
    "objectName": "exampleObject",
    "userId": "user123",
    "spaceId": "space123",
    "doc": {
        "key": "value"
    }
}

返回格式

API 返回一个 JSON 对象,结构如下:

  • error: object - 在请求不成功时包含错误信息。
  • code: string - 错误代码。
  • message: string - 错误信息,描述了出错原因。
  • data: object - 请求成功时包含请求的数据。
    成功响应示例:
{
    "data": {
        // 特定于请求的数据
    }
}

错误响应示例

{
    "error": {
        "code": "ERR_CODE",
        "message": "发生错误"
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant