Questions tagged [restful-architecture]

RESTful, or representational state transfer, is a style of software architecture for distributed hypermedia systems such as the World Wide Web.

Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web.

REST attempts to describe architectures that use HTTP or similar protocols by constraining the interface to a set of well-known, standard operations (like GET, POST, PUT, DELETE for HTTP). Here, the focus is on interacting with stateless resources, rather than messages or operations.

1187 questions
0
votes
2 answers

Is solely using HTTPS adequate for securing API RESTful web-application?

I'm researching a new web-application that I want to develop using HATEOAS, RESTful principles. I'm looking into authentication schemes and the information for authentication of web-apps (via browsers, not machine-to-machine), seems a bit…
David Kerr
  • 1,376
  • 2
  • 15
  • 20
0
votes
2 answers

Using `Expect` HTTP header to signal preference regarding HTTP response status code

I am trying to find standards-compliant (or good practice-compliant) way of informing the RESTful API server that the API client would prefer specific code, but can handle other codes if necessary. Namely, for example when creating a resource with…
Tadeck
  • 132,510
  • 28
  • 152
  • 198
0
votes
2 answers

Should an API assign and return a reference number for newly created resources?

I am building a RESTful API where users may create resources on my server using post requests, and later reference them via get requests, etc. One thing I've had trouble deciding on is what IDs the clients should have. I know that there are many…
JSideris
  • 5,101
  • 3
  • 32
  • 50
0
votes
1 answer

Rails 4: Advanced Rest API Approach and Examples

I'm creating a restful API for my app in Rails 4. I took a look at so many tutorials on that theme but in general they are all limited to creating a CRUD (create read update delete) API. That's easy and I already did that. But now i need to…
Mitry
  • 375
  • 4
  • 13
0
votes
2 answers

Design RESTful webservices with Spring

Need some suggestions for the following queries: If client wants to access a particular resource, for eg: http://sample.com/user/id/profile. Then in this case how to store id on the client side. Is cookie is the solution for the above question, if…
Touchstone
  • 5,575
  • 7
  • 41
  • 48
0
votes
2 answers

RESTful API with Batch Requests

We have a not so RESTful API used by our single page app and mobile apps. It is not so RESTfu since in the past, URI's have returned whatever was useful for a particular page. This has led to a large number of endpoints, with many having very…
0
votes
2 answers

Best practice for commitment control using RESTful APIs

We are currently designing an application using RESTful APIs to communicate with the DB. Our DB is a normalized structure, with upwards of 7 table representing a single application data point with an API for each DB entity. What I am struggling…
jgriffin
  • 176
  • 1
  • 11
0
votes
2 answers

RESTful API discussing resources - image downloads

My question is very simple, i am designing an Aplication(In Ruby on Rails BTW) that will also have a RESTful API to it. During the design of the application I came into the problem of what is a resource in: "download an image". I found 2…
andre.orvalho
  • 1,034
  • 2
  • 11
  • 17
0
votes
0 answers

RESTFull server with Spring MVC AND process the response in the Client

I have create a RestFUL service using Spring MVC, but this server was not built like others RESTFull servers. The server has just 1 controller(It a kind of Faced) with 3 mapping, see bellow Mapping 1 @RequestMapping(value =…
Rodrigo Rodrigues
  • 649
  • 2
  • 12
  • 25
0
votes
2 answers

How should I format my REST API when dealing with different types of GET

Let say I have and Order resource. In order to get the resource I want I would do something like this: GET /orders/{someId} The question is what do I do when there are different kinds of gets. For example a GET to edit the order or a GET to review…
testing123
  • 11,367
  • 10
  • 47
  • 61
0
votes
2 answers

REST Design: Adding/Deleting a related entity from a given entity using REST

Let's suppose I have an Group of users and I want to add/delete users from the group. What I am confused about is what will be the best practice to design the urls. Here are the options OPTION # 1 POST /groups/{groupId}/users -- The request body…
shahshi15
  • 2,772
  • 2
  • 20
  • 24
0
votes
1 answer

Is correct to have a different REST interfaces depending of the consumer?

Let’s say we have a REST interface of the Account resource Admin/Account/Get [Authorize(Admin)] public ActionResult Get(id) { if(id > 0) return _userService.Get(id); else return _userService.GetAll(); } public ActionResult…
elranu
  • 2,292
  • 6
  • 31
  • 55
0
votes
1 answer

How print file in RestFull+Oauth

We create web project with RestFull+OAuth. Its looks good - client sent token for each request in header Authorize. But for some request we can`t add header. For example when we print some image or document. Because we use window.open - at our…
St_5
  • 303
  • 3
  • 12
0
votes
3 answers

Consuming a REST API endpoint from a resource ID

Lets consider the following flow to a RESTfull API: API root | v user list | v user details | v user messages Suppose I have a client to consume the API, and I want to…
Filipe
  • 3,398
  • 5
  • 21
  • 35
0
votes
1 answer

Backbone collection, backend confusion, marionette implementation

I'm new to all the backend side of things, so hopefully this is one of the questions I'm gonna look back to and think "man, that was silly of me". Let me start. I want to make an application where you can draw rectangles on a screen. Every…