Support for "coap" along with "http" and "https"


If i understand correctly, the current RAML Spec supports only “http” and “https” for the protocols field. I believe it might be useful to also add “coap” (RFC7252) as a supported protocol in raml. CoAP is very closely mapped to http for constrained environments. The payloads and api’s are pretty much restful except for the fact that they are coap formatted (e.g. response codes).
RAML seems to be fairly generic and the IoT world may benefit from using RAML for their API definition.

Any thoughts?


I must say that it is the first time I’ve heard of CoAP. I will read more about it and get back to you. I would like to understand whether the model fits on an one-to-one or we would need significant changes in RAML.


Hi, CoAP is lean/binary protocol for the IoT (constrained devices) world. However CoAP has been specifically designed to allow easy mapping with HTTP semantics. Here’s a quote from the CoAP IETF RFC (RFC 7252)

“CoAP is designed to easily interface with HTTP
for integration with the Web while meeting specialized requirements
such as multicast support, very low overhead, and simplicity for
constrained environments”

So the model does fit one-to-one with HTTP. I don’t think it would be significant, but some additions will need to be made to the RAML spec. One that I can think of right away is that the “Protocols” paramater would need to allow for “CoAP” and “CoAPS” besides “HTTP” and “HTTPS”. Also the format of the Response codes for CoAP is a bit different (2.05 Content is similar to 200 OK) so that will need to be accounted for. However the rest of RAML expression semantics should be usable as is for CoAP



i have a project and i need to use protocol coap can you explain this protocol for me ??

i use this protocol with raspberry


CoAP is an IETF standard protocol. Its defined in RFC 7252