Obtaining the Event Source List
Function
This API is used to obtain the list of event sources that meet certain conditions. For example, you can specify an event channel ID to obtain all event sources in this channel.
URI
GET /v1/{project_id}/sources
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant resource space ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
channel_id |
No |
String |
ID of the event channel. |
offset |
No |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
limit |
No |
Integer |
Number of records displayed on each page. The value must be within the range [1, 1000]. |
sort |
No |
String |
Sorting mode of the query results. |
provider_type |
No |
String |
Type of the provider. |
name |
No |
String |
Name of the event source. It is used for exact match. |
fuzzy_name |
No |
String |
Name of the event source. It is used for fuzzy match. |
fuzzy_label |
No |
String |
Label of the event source. It is used for fuzzy match. |
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 |
---|---|---|
total |
Integer |
Total number of records. |
size |
Integer |
Number of records displayed on the current page. |
items |
Array of CustomizeSourceInfo objects |
Object list. |
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 the event source list.
GET https://{endpoint}/v1/{project_id}/sources
Example Responses
Status code: 200
Operation successful.
{ "total" : 1, "size" : 1, "items" : [ { } ] }
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