Bind¶
Summary: The bind API is used to enable binding between queues and exchanges. A device owner has complete control over binding and unbinding exchanges and queues that belong to them. However, if they wish to bind to a different owner’s device, they would need to go through the formal process of
followandshare. On the other hand, all devices are free to bind to the public exchange of any other device.Endpoint:
https://localhost:8443/api/1.0.0/bind/<queue>/<exchange>Field Description <queue> Name of the queue which needs to be bound to an exchange. <exchange> Exchange name. If this does not belong to the owner, the process
of
followandsharemust happen.Method:
GETRequired Headers:
Header Name Description apikey API key of the device Optional Headers:
Header Name Description routingKey Topic with which the exchange must be bound to the queue Example Request:
curl -X GET \ https://localhost:8443/api/1.0.0/bind/app/streetlight.protected \ -H 'apikey: SLJTRxPdAVrslmHxcFPfQNWykVOIiIZ2hdiy0FSQOhB' \ -H 'routingKey: #'
Response:
Bind Queue OK
Possible error scenarios:
Invalid authentication credentials: Make sure you have provided the right API keyYou do not have access to bind this queue: Make sure that the follow request made to a device has been approved before attempting to bind.