CreateHttpEventConfig

Updated at:

Creates an HTTP callback event configuration.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

BaseMeAgentId

integer

No

The workspace ID.

123456

JsonStr

string

No

The request parameters as a complete JSON string.

{ "switchFlag": true, "callbackUrl": "http://123213.com", "httpMethod": "GET", "eventConfig": { "taskCompleteEvent": true, "fileReviewedEvent": true, "complaintHandledEvent": true } }

The request parameters are provided as a complete JSON string. The deserialized structure is as follows.

HttpEventConfig

FieldTypeRequiredDescription
switchFlagBooleanYesSpecifies whether to enable HTTP callback push.
callbackUrlStringYesThe callback receiving URL. The example value http://123213.com is a placeholder. Replace it with an actual accessible URL during integration.
httpMethodStringYesThe HTTP method for the callback request. The example value is GET.
eventConfigObjectYesThe collection of event subscription switches. For more information about the structure, see the following section.

EventConfig (event subscription switches)

Each field in eventConfig is of the Boolean type. A value of true indicates that the corresponding event is subscribed to, and a value of false indicates that the event is not subscribed to. The query response example returns all eight switches, whereas the request example for creating a configuration passes only three switches.

FieldTypeQuery example valueDescription
fileReviewedEventBooleantrueReview
syncTaskCompleteEventBooleanfalseReal-time quality inspection completion
taskCompleteEventBooleantrueOffline quality inspection completion
complaintHandledEventBooleantrueAppeal

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

9987D326-83D9-4A42-B9A5-0B27F9B40539

Code

string

The result code. A value of 200 indicates success, and other values indicate failure. You can use this code to determine the cause of the failure.

200

Message

string

The error details returned when the request fails, or "successful" when the request succeeds.

successful

Success

boolean

Indicates whether the request is successful. A value of true indicates success, and a value of false or null indicates failure.

true

Data

string

The configuration ID returned after the configuration is successfully created.

1

Examples

Success response

JSON format

{
  "RequestId": "9987D326-83D9-4A42-B9A5-0B27F9B40539",
  "Code": "200",
  "Message": "successful",
  "Success": true,
  "Data": "1"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.