CreateHttpEventConfig
Creates an HTTP callback event configuration.
Try it now
Test
RAM authorization
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
| Field | Type | Required | Description |
switchFlag | Boolean | Yes | Specifies whether to enable HTTP callback push. |
callbackUrl | String | Yes | The callback receiving URL. The example value http://123213.com is a placeholder. Replace it with an actual accessible URL during integration. |
httpMethod | String | Yes | The HTTP method for the callback request. The example value is GET. |
eventConfig | Object | Yes | The 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.
| Field | Type | Query example value | Description |
fileReviewedEvent | Boolean | true | Review |
syncTaskCompleteEvent | Boolean | false | Real-time quality inspection completion |
taskCompleteEvent | Boolean | true | Offline quality inspection completion |
complaintHandledEvent | Boolean | true | Appeal |
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.