-1

The Azure API claims to be a REST API. I found it while for patterns and sample implementations and verbs in REST, when inspecting it in their (supposedly) REST API reference, they seem to have invented a new verb CancelJob and altering internal state via an HTTP GET

GET
https://media.windows.net/API/CancelJob?jobid='URL-encodedvalue'

This seems to contradict best practices, shall it be implemented with a Jobs resource and DELETE or is it correct to do it that way too?

DELETE
/API/Jobs?jobid='URL-encodedvalue'

Or even?

DELETE
/API/Jobs/jobid
Ariel M.
  • 896
  • 8
  • 24
  • What makes you think that this service has any intention of implementing the REST architecture? – John Saunders Jun 04 '15 at 16:49
  • Ha, the title of the page link is "REST API Functions". – Raul Nohea Goodness Jun 04 '15 at 17:12
  • @JohnSaunders Yes, because the title of the page says so explicitly. Also, the subtree to the left is called: _Azure Media Services REST API Reference_ – Ariel M. Jun 04 '15 at 17:19
  • @RaulNoheaGoodness: and now everyone who reads this question will know that the API claims to be a REST API and will not need to ask the same question. The OP should edit the question to include the name of the API, which will be an even better way to make sure that future readers do not need to ask the question that I asked. – John Saunders Jun 04 '15 at 17:42
  • @JohnSaunders absolutely agree, ArielM please edit your question. – Raul Nohea Goodness Jun 04 '15 at 17:50
  • I edited, is it correct this way? – Ariel M. Jun 04 '15 at 19:05
  • @ArielM.- I think this question should be closed, because I don't see how anyone outside of the Azure Media Services team will be able to answer your question (you're asking about justification of a specific implementation detail of a product). That said, your question is specifically about the Media Services API, and the title should be edited to reflect that, not about Azure in general. – David Makogon Jun 05 '15 at 03:46
  • Maybe it should be reformulated on the correctness of REST principles. – Ariel M. Jun 05 '15 at 06:01
  • Just did that. So I really want to dig deep into understanding if a REST API can be made like that or is it just them who made it like that. Sorry if it's a dumb question. – Ariel M. Jun 05 '15 at 18:10

1 Answers1

1

REST has become a buzz word that people use for any API that works over HTTP. This API appears to be what some people would call REST level 1. Level 1 means that you use HTTP as a transport mechanism only. It doesn't respect any of the REST constraints that HTTP is designed for. I don't think it's fair to call these APIs REST at all, but many still do because REST is popular and business/marketing people what to be able to say they have a REST API. I suspect that this is the case with this API because the architect(s) of this API clearly put no effort whatsoever into following REST principles.

Jason Desrosiers
  • 22,479
  • 5
  • 47
  • 53
  • Thank you, a big company making such claims is confusing. As i mentioned i found it while looking for some sample REST implementations. This clears such doubts. – Ariel M. Jun 08 '15 at 05:34