mark_h mark_h - 1 month ago 11
JSON Question

How can I tell whether a web service is "Restful" (as it claims to be)?

I am trying to work with a service that its creators describe as "restful"

To make a request to this service I have to post some Json e.g.

{
"@type" : "Something"
"$value" : 1
}


This is posted to a URL similar to this;

https://someSite.com/api/query/execute

No matter what the nature of the request, whether I am retrieving info, adding or updating it I must always use this URL (along with some header values to verify my credentials). The effects of posting to this service are determined by the JSON I send.

Depending on the nature of the call I will receive some JSON very similar to the sample above. This JSON never includes another URL (or part of one). It is always a "data object" i.e. a set of properties and their values. Sometimes I receive an empty response but know that the request has had an effect because I can view those effects through a website provided by the service provider

I have particular issues with ENUM values that I must send because I have no idea of the allowed values (they are always passed as strings)

No documentation has been provided for this service.

I am relatively new to RESTful services and JSON and would like to know whether this is truly a restful service, and if not why not?

Due to my lack of experience in this area I may have omitted some important information that would be required to properly answer this question. I will watch the comments closely and try to provide any additional clarification requested

Answer

know whether this is truly a restful service, and if not why not?

It isn't.

One of the main principles of REST is that "things" are identified by URLs. Having a single URL for all interaction with the API violates that principle.