Creating a Test Event

Function

This API is used to create a test event.

URI

POST /v2/{project_id}/fgs/functions/{function_urn}/events

Table 1 Path parameters

Parameter

Mandatory

Type

Description

function_urn

Yes

String

Function URN.

project_id

Yes

String

Tenant's project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Test event name. The name must start with a letter. Only letters, digits, hyphens (-), and underscores (_) are allowed.

content

No

String

Test event content.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

Test event ID.

name

String

Test event name.

content

String

Test event content.

last_modified

Number

Last update time.

Example Requests

POST https://{functiongraph_endpoint}/v2/7aad83af3e8d42e99ac194e8419e2c9b/fgs/functions/urn:fss:xxxxxxxxxxx:7aad83af3e8d42e99ac194e8419e2c9b:function:default:test:latest/events

Example Responses

Status code: 200

ok

[ {
  "id" : "3b659dc0-12fc-40dc-aa05-a321d9424cb3",
  "name" : "event-k9r3",
  "content" : "ewogICAgImJvZHkiOiAiIiwKICAgICJyZXF1ZXN0Q29udGV4d*******",
  "last_modified" : 1597374286
} ]

Status Codes

Status Code

Description

200

ok

Error Codes

See Error Codes.