Get a single source by a specific source ID.
Listener includes the secret key for the source only when the requestor is a source owner or administrator.
Definition
GET https://CLUSTER.DOMAIN/listener/appservices/sources/{source_id} HTTP/1.1
Example Request
curl \
-H "Content-Type: application/json" \
-H "Authorization: Bearer TOKEN" \
-X GET \
-i \
https://CLUSTER.DOMAIN/listener/appservices/sources/758fbda4-accc-4f90-8f09-cc0a164c8c28
Example REST Source Response
HTTP/1.1 200 OK Content-Type: application/json
{ "source_id": "758fbda4-accc-4f90-8f09-cc0a164c8c28", "owner": ["jd123456"], "created_at": "2015-07-04T10:20:00Z", "created_by": "av012345", "updated_at": "2015-12-20T10:20:00Z", "updated_by": "jd123456", "secret": "f8a9f620-e0e6-470b-a6b8-1f16b003c034", "name": "My source", "description": "A superb source", "state": 1, "production": false, "source_type": "REST" }
Example MQTT Source Response
HTTP/1.1 200 OK Content-Type: application/json
{ "source_id": "758fbda4-accc-4f90-8f09-cc0a164c8c29", "owner": ["jd123456"], "created_at": "2015-07-04T10:21:00Z", "created_by": "av012345", "updated_at": "2015-12-20T10:21:00Z", "updated_by": "jd123456", "secret": "f8a9f620-e0e6-470b-a6b8-1f16b003c035", "name": "My other source", "description": "Another superb source", "state": 1, "production": false, "source_type": "MQTT", "subscription_info": { "broker": "http://localhost:1234", "topic": "My MQTT topic", "state": "connected" } }
Example Kafka Source Response
HTTP/1.1 200 OK Content-Type: application/json
{ "source_id": "22b05fee-80a1-486d-9d1e-95e650a16cc7", "owner": [ "listener" ], "collaborators": null, "created_at": "2019-08-02T16:55:21Z", "created_by": "listener", "updated_at": "2019-08-02T16:55:21Z", "updated_by": "listener", "name": "customerkafka", "description": "test", "secret": "", "size": 2, "state": "1", "production": false, "source_type": "KAFKA", "subscription_info": { "broker": "172.31.47.87:8080,172.31.45.6:8080,172.31.42.79:8080", "topic": "listener", "zookeeper": "172.31.34.24:8000/kafka,172.31.38.103:8000/kafka,172.31.45.80:8000/kafka" } }
Response Codes
Code | Description |
---|---|
200 | Source successfully returned. |
401 | Authorization header not found. |
404 | Resource not found. |