更新时间:2023-06-16 GMT+08:00
分享

CreateEvent接口

功能介绍

create an event

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

POST /v2/aims/codemodelserver/management/event

请求参数

表1 请求Header参数

参数

是否必选

参数类型

描述

x-auth-token

String

iam x-auth-token

表2 请求Body参数

参数

是否必选

参数类型

描述

component

String

the component of the codearts snap

verb

String

the verb of the action

object

String

the the object of the verb

data

Object

the data of the event

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

event_id

Integer

the id of event

请求示例

创建一个组件使用“codebot”,状态为“access”的事件。

POST https://{endpoint}/v2/aims/codemodelserver/management/event

{
  "component" : "codebot",
  "verb" : "access",
  "object" : "/api/path",
  "data" : { }
}

响应示例

状态码: 200

Successful Response

{
  "event_id" : 234
}

状态码

状态码

描述

200

Successful Response

错误码

请参见错误码

分享:

    相关文档

    相关产品