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
16
votes
3 answers

HTTP POST response Location header when creating multiple resources

The HTTP/1.1 standard states that if a POST operation results in the creation of a resource, then the response should include a Location header with the address of the new resource. If a resource has been created on the origin server, the response …
metacubed
  • 7,031
  • 6
  • 36
  • 65
16
votes
1 answer

How to secure a REST api between a single page app and a server?

I have 2 servers in place, one is responsible for the front-end application and the user authentication. This server is rendering a single page application coded in javascript. This javascript app is rendering data from a second server through a…
Michael
  • 2,436
  • 1
  • 36
  • 57
14
votes
2 answers

RESTful way to trigger server-side events

I have a situation where I need my API to have a call for triggering a service-side event, no information (besides authentication) is needed from the client, and nothing needs to be returned by the server. Since this doesn't fit well into the…
NFicano
  • 1,065
  • 1
  • 11
  • 26
14
votes
4 answers

REST API URI for resource with multiple primary keys

I am developing a generic REST API for my projects and I'm wondering what to do when I have a table/resource with 2 or more primary keys. For example, lets suppose I have a table named "question" with two primary keys (date and type) and I need to…
angro
  • 160
  • 1
  • 1
  • 7
14
votes
5 answers

Clean and generic project structure for GO applications and mongodb

I want to build an API based application using GO and MongoDB. I'm from Asp.net MVC background. Probably if I make an architecture with MVC web application things to be consider are Separation of…
Chandu
  • 962
  • 2
  • 16
  • 33
14
votes
1 answer

When not to use REST APIs?

REST APIs are always considered as infrastructural purposes. I am not an expert, but I caught that the principles they should implement deal with horizontal scaling and performance. They are supposed to suppress all kinds of affinities between…
Rénald
  • 1,412
  • 12
  • 29
14
votes
2 answers

Razor templates, views and angular.js

TL;DR What are the best practices when using .NET Razor views and AngularJS? Context We are developing a public website (not an intranet application) using mvc4 with razor, and we weren't very familiar with client script, so we started with what we…
ppetrov
  • 3,077
  • 2
  • 15
  • 27
13
votes
3 answers

Search verb in HTTP API

What is best practice for search in API? GET + query parameters, example: GET /search?q=phone GET + parameters in body, example: GET /search {"query": "phone"} POST + parameters in body, example: POST /search {"query": "phone"}
Romper
  • 2,009
  • 3
  • 24
  • 43
13
votes
5 answers

How to pass Query String Parameters in GET url using Rest Assured?

How to pass Query String Parameters in GET url using Rest Assured? URL is: http://example.com/building My Query Strings are…
13
votes
1 answer

Interview assignment - design a system like S3

In my phone interview at one of the financial firms as an software architect, "design a cloud storage system like AWS S3". Here is what I answered, Would you please help with your critiques & comments and on my approach. I would like to improve…
nuvatech
  • 331
  • 3
  • 6
13
votes
2 answers

Should input DTOs for RESTful endpoints match the output DTOs?

I'm working on a RESTful API and I'm having some trouble wrapping my head around the procedure for supplying input to the API. Let's say I have a "Person" resource that can be fetched like this: api/person/{id} and returns an object like…
Nick Coad
  • 3,623
  • 4
  • 30
  • 63
13
votes
3 answers

Java - Adding jar dependency in pom.xml

I have never built my java applications by maven. But when i am trying to do that it's giving me error. I have created JAR file from other java application just by exporting as JAR from that application. Now i want to add this JAR in my maven…
Fahad Mullaji
  • 1,332
  • 5
  • 15
  • 30
13
votes
6 answers

Restful API naming conventions

So me and my boss aren't agreeing here and can't find any information on it. Scenario: I want to get all the users for a certain organisation. What should the URL…
We0
  • 1,139
  • 2
  • 9
  • 22
13
votes
5 answers

DDOS Attacks - Restful Web Services

Could you please list some strategies or even approaches you have already applied to prevent/protect/minimize DDOS attacks upon Restful Web Services? Thanks.
Michael Henrique
  • 235
  • 1
  • 2
  • 10
13
votes
6 answers

RESTful API URI Design

I'm looking for some direction in regards to the URI design for a RESTful API. I'm going to have several nested linked resources and have currently designed my URI's similar to this post: Hierarchical RESTful URL design The following example isn't…
TimS
  • 1,113
  • 7
  • 10
1 2
3
79 80