Obtaining Event Source Details
Function
This API is used to obtain the details of an event source.
URI
GET /v1/{project_id}/sources/{source_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant resource space ID. |
source_id |
Yes |
String |
ID of the event source. |
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. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of the event source. |
name |
String |
Name of the event source. |
label |
String |
Label of the event source. |
description |
String |
Description of the event source. |
provider_type |
String |
Type of the event source provider, which can be OFFICIAL (official cloud service event source), CUSTOM (custom event source), or PARTNER (partner event source). |
event_types |
Array of event_types objects |
List of event types provided by the event source. Only the official cloud service event source provides event types. |
created_time |
String |
UTC time when the event source is created. |
updated_time |
String |
UTC time when the event source is updated. |
channel_id |
String |
ID of the event channel to which the event source belongs. |
channel_name |
String |
Name of the event channel to which the event source belongs. |
type |
String |
Type of the event source. |
detail |
Object |
Connection information encapsulated in JSON format in the message instance, such as the instance_id field of the RabbitMQ instance, vhost field of the virtual host, queue field, username, and password. |
status |
String |
Status of the custom event source. |
error_info |
ErrorInfo object |
Error message. |
Example Requests
Obtain event source details.
GET https://{endpoint}/v1/{project_id}/sources/{source_id}
Example Responses
Status code: 200
Operation successful.
{ "id" : "90e0b962-c6c1-438c-ba8a-3024fe592bda", "name" : "first-source", "label" : "first-source", "description" : "first event source", "provider_type" : "CUSTOM", "event_types" : [ { "name" : "OBS:CloudTrace:ApiCall", "description" : "Service API call type event." } ], "created_time" : "2021-12-09 09:00:00", "updated_time" : "2021-12-09 09:00:00", "channel_id" : "bd14144e-8f3c-43d6-bdfd-bf09b52c2b96", "channel_name" : "channel", "type" : "RABBITMQ", "detail" : "{\"instance_id\":\"ac14144e-9v3c-43d6-acfd-bf09b52c98uy\",\"user_name\":\"rabbitmq_user\",\"password\":\"changeme\",\"vhost_name\":\"vhost_name\",\"queue_name\":\"queue_name\"}", "status" : "RUNNING", "error_info" : { } }
Status Codes
Status Code |
Description |
---|---|
200 |
Operation successful. |
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