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

learn more… | top users | synonyms

1
vote
0answers
30 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 ...
4
votes
3answers
287 views

How to handle business rules with a REST API?

I have a REST API to manage a booking system I'm searching how to manage this situation : A customer can book a time slot : A TimeSlot resource is created and linked to a Person resource. In order to ...
1
vote
1answer
60 views

Web-services REST security clarification

I'm newbie of web services programming and I have some problem to understand how to work authentication/security for REST WS pattern. I had read about OAuth but I haven't understand how it work in ...
2
votes
1answer
63 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
88 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, ...
1
vote
1answer
60 views

URLs with variable query strings and cache

I am developing a media server, the basic functionality is to serve an image, which is done the following way /media/:id where :id is the id of the image. You may want to ask for a specific size, ...
3
votes
1answer
233 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). ...
0
votes
1answer
95 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
152 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
64 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
2answers
239 views

DTO - service layer - statelessness best practices interfering with each other

I am designing a REST API coupled with a service layer that takes DTOs as input and produces them as output. This works fine for most service calls where the DTO is used to access an underlying ...
1
vote
1answer
72 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, ...
1
vote
1answer
202 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
848 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
88 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
1answer
78 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.
0
votes
1answer
38 views

Link relation values and REL attribute - edited

In REST, do we always use link relation values to convey semantics/role of a linked resource? I assume link relation value is always specified using rel attribute? Should rel attribute only be ...
1
vote
1answer
112 views

Access Token Verification

I have spent quite a few days reading up on Oauth and token based security measures for REST API's and I am currently looking at implementing an Oauth based authentication approach almost exactly like ...
1
vote
2answers
1k views

Doubts about several best practices for rest api + service layer

I'm going to be starting a project soon that exposes a restful api for business intelligence. It may not be limited to a restful api, so I plan to delegate requests to a service layer that then ...
1
vote
1answer
42 views

What exactly are Link Relation Values?

From REST in Practice: Hypermedia and Systems Architecture: For computer-to-computer interactions, we advertise protocol information by embedding links in representations, much as we do with ...
1
vote
2answers
105 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
204 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
421 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
57 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
48 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 ...
2
votes
2answers
180 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 ...
3
votes
1answer
124 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
71 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 ...
0
votes
1answer
66 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
vote
1answer
87 views

RESTful composition/inclusion of other resources

I have a few HTTP resources, and i'm wondering if including the models of one in the other is acceptable or if there is a cleaner method. In this example, we have a ton of "news" resources, and users ...
-1
votes
3answers
155 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 ...
1
vote
2answers
112 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
412 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
217 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
36 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 ...
3
votes
1answer
100 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
144 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 ...
0
votes
0answers
70 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
75 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
98 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
440 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 ...
18
votes
5answers
1k views

How do searches fit into a RESTful interface?

When designing a RESTful interface, the semantics of the request types are deemed vital to the design. GET - List collection or retrieve element PUT - Replace collection or element POST - Create ...
2
votes
2answers
149 views

How to indicate to a web server the language of a resource

I'm writing an HTTP API to a publishing server, and I want resources with representations in multiple languages. A user whose client GETs a resource which has Korean, Japanese and Trad. Chinese ...
1
vote
3answers
84 views

how should I change the representation (not mimetype) of a resource?

I'm looking at how I can change the representation of a payload at runtime for varied potential advantages, but I'm not sure how to do it. Specifically collections. Array of Pairs [{ ...
2
votes
1answer
409 views

How to translate SQL query into REST API requests?

Let's say I have a machine-readable description (such as in WADL, Swagger or RAML) of a REST API that provides interface to a database. My users submit queries about underlying database in form of ...
2
votes
2answers
482 views

What is the best pattern for adding an existing item to a collection in REST API?

I'm designing a pragmatic REST API and I'm a little stuck on how best to add existing entities to a collection. My domain model includes a Project that has a collection of Sites. This is a strict ...
3
votes
2answers
169 views

How to support different API Versions

I am writing a Rest API and am wondering how best to handle supporting the different versions. By this I don't mean how to define a URI as V2 or V3, but rather how to structure the code given that ...
3
votes
2answers
1k views

Decoupling Server and Client using REST API

I was thinking about how I can decouple a web-application completely into a server-side and a client-side component. I want to decouple the app to the extent that I can host both components on ...