Representational state transfer, or REST, is an architectural style for networking software to transfer information through the web.

learn more… | top users | synonyms

2
votes
2answers
271 views

Best pratice for return json in a REST application?

I'm starting now with REST (using Laravel 4.2) and Mobile (Android, iOS, SP, etc.) applications. Initially I'm checking if the request is ajax/json and then return a json response. But this ...
1
vote
2answers
247 views

What is the purpose of RESTful URIs for POST/PUT/PATCH/DELETE methods?

In the process of conceiving a web application framework, I spent some time pondering the notion of RESTful paths. If I wanted to create e.g. a new topic, I might send a POST request to /topics. The ...
0
votes
1answer
77 views

How should a REST API handle PUT when missing parameters?

I have a list of users that are being assigned to a certain office. I use checkboxes to select each user and when the client is done, a PUT is performed: PUT offices/:id users[0] : 14 users[1] : 12 ...
1
vote
1answer
93 views

REST API Structure

I have a REST API that looks something like the below where a person can belong to an organisation (but doesn't have to) and a person has many items. The items may also belong to the organisation ...
1
vote
0answers
34 views

Android network Lib development

I have to develop an Android library that should frequently communicate with a server in the background. Access to the lib Object should be guaranteed everywhere in the Apps that will use it, so I ...
49
votes
4answers
4k views

What is REST (in simple English)

Lately I have become interested in familiarizing myself with REST. I tried reading wiki entry on REST, but it was of no help. I would really appreciate it if someone can explain in simple English ...
33
votes
4answers
26k views

Difference between REST and CRUD

I learned REST and it feels a lot like CRUD (from what I have read about CRUD). I know they are different, and I wonder if thinking they are similar means I don't understand them. Is it that REST is ...
2
votes
1answer
70 views

Web Service REST clarification

I'm new to web-service programming, and I'm unsure of a few things. I know that REST web-services can be used to interact with the system like this: to retrieve a user: GET /user?id=1 to retrieve ...
2
votes
1answer
105 views

How to handle hidden folders on deployed website

Our security team at work did a security scan of our soon-to-be-deployed website and one of the items that was found was "Hidden Directory Detected". It shows up for 3 different folders, ...
8
votes
4answers
10k views

How is oData different from a REST service?

I am looking into writing a web service API and I am thinking of creating a REST service. What does OData means in this context? Can you please explain the difference between OData and REST?
5
votes
5answers
3k views

Applying RESTful design to an entire website?

This all may come across very newbish, but I'm trying to wrap my head around designing a website that is thoroughly RESTful. I understand applying RESTful design to things like Users, Photos, Blog ...
6
votes
1answer
9k views

PHP Framework for RESTful Web Service [closed]

I have been going round in circles with this question for days - which is the best PHP framework to use to create a RESTful Web service? I've trawled the web for info and have come across three main ...
3
votes
1answer
377 views

Good way to handle the notification counter like Facebook does

I want to build a similar notification mechanism that Facebook handles. I actually store the user's notification in an SQL table (actually it's a graph database but everybody master RDBMS terms). ...
7
votes
3answers
2k views

Are there any problems with implementing custom HTTP methods?

We have a URL in the following format /instance/{instanceType}/{instanceId} You can call it with the standard HTTP methods: POST, GET, DELETE, PUT. However, there are a few more actions that we ...
0
votes
1answer
124 views

Single page app permissions represented through RESTful APIs

I'm trying to figure out the right way to handle permissions in a single page app that talks directly to several RESTful APIs, that implement HATEOAS. As an example: "As a user of my application I ...
1
vote
3answers
193 views

Commenting strategies in C# & asp.net web api

I've been working on a ASP.NET Web Api 2 project as a learning exercise, and I was wondering what the norm regarding commenting is. I use the Repository / Service Pattern, and everything is very much ...
0
votes
0answers
78 views

Multitier architecture using API

I have been reading a number of posts and I am leaning towards building an SOA. My main dependencies are: Need to support multiple clients Need individual client environments to not effect other ...
1
vote
1answer
74 views

Is OAuth suitable for this scenario?

I need to create a simple web application for track expenses, with some basic actions (user must be able to create an account and log in, list expenses, edit them, etc) with a REST API for each one, ...
2
votes
1answer
392 views

Nested objects in REST

I have simple set of resources, not more than 10 types, with some one-to-many relationships. For example An order has many entries An entry has many comments A machine can have multiple entries ...
0
votes
2answers
1k views

How to structure REST api service that accepts POST parameters in the body

Everything I've read says to pass parameters to a REST service in the URI, whether by template, or query string: https://www.myapp/my/login/api/authenticate/ganders/mypassword or ...
1
vote
1answer
104 views

What is the argument for singular nouns in RESTful API resource naming?

I understand that when naming RESTful URI's it is commonly accepted to use plurals to represent collections of resources. I am curious as to the argument for using singular nouns instead.
2
votes
2answers
247 views

Is is OK to use a non-primary key as the id in a rails resource?

I am getting ready to set up a resource for some new api calls to my rails application. I am planning on calling the resource devices ie resources :devices This is going to represent android ...
4
votes
2answers
527 views

Where to Perform Authentication in REST API Server?

I am working on a set of REST APIs that needs to be secured so that only authenticated calls will be performed. There will be multiple web apps to service these APIs. Is there a best-practice approach ...
1
vote
2answers
107 views

Quite confused about what constitutes Current state of a resource

From REST in Practice: Hypermedia and Systems Architecture: The current state of a resource is a combination of: The values of information items belonging to that resource Links to ...
0
votes
3answers
245 views

POST and PUT requests – is it just the convention?

I've read quite a few articles on the difference between POST and PUT and in when the two should be used. But there are still few things confusing me ( hopefully questions will make some sense ): 1) ...
2
votes
2answers
655 views

REST Service and CQRS

I am struggling with architecture on a new project. I am using the following patterns/technology. CQRS - anything going in goes through a command REST - using WebAPI MVC - asp.net mvc Angular - ...
0
votes
1answer
105 views

URIs and Resource vs Resource representation

URL is an URI which identifies a resource by location. Resource representation is a view of resource's state. This view is encoded in one or more transferable formats, such as XHTML, Atom, XML, MP3 ...
1
vote
1answer
51 views

Is it RESTful to resume terminated POST operation on a GET request?

I have a RESTful API, one of the resource has a state that is determined collectively by multiple servers, not all of them belong to us. One of the operation on this resource will have to modify the ...
4
votes
3answers
192 views

What is the preferred Internet media type of a RESTful POST request?

Is there a preferred/recommended Internet Media Type for RESTful POST requests? For example, if I want to add a new user, should I send the data as a URL encoded string like: ...
35
votes
4answers
41k views

Reasons NOT to use JSF [closed]

I am new to StackExchange, but I figured you would be able to help me. We're crating a new Java Enterprise application, replacing an legacy JSP solution. Due to many many changes, the UI and parts of ...
3
votes
1answer
136 views

Should REST APIs be context independent or dependent?

Let's say I have several users and each one has a user_id and also friends To access their friends, they should be logged in, so a session will be established with the server. Should the REST API ...
1
vote
1answer
80 views

URI Representing a Single Resource with Two Possible Identifiers

I have a resource that can be represented in one of two ways: Big Serial Number, or Small Serial Number Is it closer adherence to REST principles to: A: have a query string specify the type ...
16
votes
6answers
2k views

Do RESTful APIs tend to encourage anemic domain models?

I'm working on a project in which we are trying to apply both domain-driven design and REST to a service-oriented architecture. We aren't worrying about 100% REST compliance; it would probably be ...
0
votes
1answer
68 views

Why was REST web srevice named REST?

What does the word Representational State Transfer (REST) mean actually ? Now I don seem to find any relation between its naming and its working, I have understood that it is a architectural style for ...
1
vote
1answer
2k views

C++ Web Development for REST API [closed]

I've been a C# developer for long time, focused on ASP MVC the most. Two years ago, basiclly due to the lower costs and ease of deployment/management I began to migrate my projects to linux using ...
-1
votes
3answers
157 views

A RESTful way to verify server state [closed]

I'm interested in building verifications into a REST service to help with service monitoring. For example, one could run assertions like ...
3
votes
2answers
503 views

How to handle fine grained field-based ACL permissions in a RESTful service?

I've been trying to design a RESTful API and have had most of my questions answered, but there is one aspect of permissions that I'm struggling with. Different roles may have different permissions ...
2
votes
2answers
161 views

Should a REST interface include the query ID as part of the response?

I am currently working an Android app that receives most of the displayed data from a REST interface. First, I request the information for a company the request includes a list of store IDs. With ...
1
vote
1answer
556 views

How to handle exception in REST API

Given a REST API, which throws an exception when handling a request from a client. Whenever the REST API throws an exception, it's logged and the application (in this case a console application) ...
2
votes
2answers
229 views

How to provide a service with RESTful API?

Generally speaking, RESTful API's are very good for representing resources and collections of resources. http://example.com/resources http://example.com/resources/item17 And we are good, if we ...
0
votes
0answers
38 views

Charts, SQL and REST?

We have created a REST API for a voting game. Now we are jumping into creating analytics/graphs/charts for moderators and users to watch how are they doing in the game. The game has a certain group ...
0
votes
3answers
75 views

How to design routes for generalized/specialized resources

I hope I can explain what is troubling me. Example: I have an object basket with a list of fruit objects. So normally I would build my routes like this baskets/{basketId}/fruits/{fruitId). But fruit ...
3
votes
1answer
106 views

REST object with resources

I am designing a HTTP-based REST API. Let's say I have an entity called Entity that has a bunch of properties. Some of its properties are files. Let's say Entity has following properties: name: ...
0
votes
1answer
172 views

RESTful API resource path for resource with complex relationship?

In my RESTful API, I have Users, Applications, and Tokens. An application has an owner, which is a user. A token is linked to both an application, and a user. A user has both public and private ...
28
votes
3answers
2k views

What does HATEOAS offer for discoverability and decoupling besides ability to change your URL structure more or less freely?

Lately I've been reading about Hypermedia as the Engine of Application State (HATEOAS), the constraint that is claimed to make a web API "truly RESTful". It boils down to basically including links ...
6
votes
5answers
2k views

How to simulate a REST API?

I am working on a new project which will query data from a 3rd party REST API. This is for a real time sports data feed, so the feed only works when a game is actually taking place. Although the 3rd ...
0
votes
0answers
72 views

How should one handle accessing a 'local' API?

I'm currently writing a project that is using a few separate virtual machines for the database, API and front-end website (currently 1 of each). I'm writing my code in PHP, and all of these virtual ...
0
votes
0answers
84 views

Strategy for Website Talking to API on Same Server

I have a RESTful API that allows retrieval of data through requests such as GET http://example.com/users/id/1 (Coded following this tutorial). The code igniter controller looks like this: class ...
0
votes
0answers
102 views

Schemaless NoSQL RESTful design?

In a recent project; I used MongoDB with MongoEngine (an ORM/ODM for Python). This allowed me to specify schema in a central "Model". My new project I am hosting on Windows Azure; and there is no ...
5
votes
4answers
450 views

Should an API be aware of client versions?

Should an API be aware of a client version? The idea of that really goes against the grain for me, but it seems like it is being pushed for in my current project. Am I wrong? Can I get some reasons ...