Prechecking Event Publishing Status
Function
This API is used to precheck whether the events from an event source can be published successfully. For example, an event can be published successfully only if there is a subscription to the event source.
URI
POST /v1/{project_id}/events/check
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant resource space ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
sources |
No |
Array of sources objects |
Event source parameters. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
X-Request-Id |
String |
This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. |
Parameter |
Type |
Description |
---|---|---|
failed_count |
Integer |
Number of events that fail the precheck. |
sources |
Array of CheckPutEventsResult objects |
Event source parameters. |
Example Requests
Precheck event publishing status.
POST https://{endpoint}/v1/{project_id}/events/check { "sources" : [ { "channel_id" : "092e1243e88146768798b0e8c9933192", "source_name" : "source-demo" } ] }
Example Responses
Status code: 200
Information
{ "failed_count" : 0, "sources" : [ { } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Information |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot