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

learn more… | top users | synonyms

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 ...
8
votes
5answers
3k views

REST API concepts

I have three questions about REST API design that I'm hoping someone can shed some light on. I've searched relentlessly for many hours but haven't found answers to my questions anywhere (maybe I just ...
4
votes
3answers
640 views

Best Practice: Should error messages be handled by the API or by the App?

I am designing an application that interacts with a RESTful API. When returning error messages like Unable to sign up user Should the error message be generated by the app? or by the API? I am ...
19
votes
2answers
1k views

Levels of user permissions in a RESTful API

Let's say I have a company that ranks the cutest cats on the internet. I offer a resource at /cats/ which provides users with the latest, cutest adorable cats. Users can either get just the top 3 ...
2
votes
1answer
67 views

Modelling a resource that may not be part of the parent resource

I am designing an API and am having a couple of problems with certain parts of the resource modelling. I have the notion of a SurveyItem which as a collective form a Survey: Survey Resource ...
9
votes
3answers
778 views

Are there strategies for discovering REST services using HATEOAS?

When building a REST service with the HATEOAS constraint, it's very easy to advertise the existence of resources through linking. You make a GET to the root of my site and I respond with the root ...
0
votes
2answers
75 views

Working with data and meta data that are separated on different servers

While developing a product, I've come across a situation where my group wants to store meta data for data entry forms (questions, layout, etc) in a different database then the database where the ...
3
votes
3answers
249 views

RESTful applications logic and cross resource operations

I have an RESTful api that allows my users to receive enquiries about their business e.g. 'I would like to book service x on date y. Is this available?'. The api saves this information as a resource ...
16
votes
10answers
5k views

When does SOAP make more sense than REST? [duplicate]

From my understanding of REST, the implicit assumption is that all operations are CRUD operations. Sometimes, you are not doing CRUD operations and are doing some more complex logic. In this case, is ...
1
vote
0answers
186 views

how to integration dynamic web fields and forms

I'm trying to find a way to design backend that will be handling customized web forms creation on the fly. Once created those forms will be injected to part of the existing web pages. I've created ...
6
votes
4answers
343 views

When did the first “REST”-model and friendly URL web technology come to be?

Everyone knows that the "current" way to do things is to have user-readable URLs. Like: http://example.com/blog/edit/1234 Rather than: http://example.com/blog.php?action=edit&id=1234 When ...
2
votes
1answer
102 views

Should I provide client libraries in some select languages along with the APIs themselves?

Say I have created a web service based on RESTful APIs. Does it make sense to also provide users with a client library for the API in some select languages which are likely to be the most used ones? ...
0
votes
0answers
76 views

SharePoint + InfoPath Joins

I am trying to do something somewhat unique, and the best path I can find at the moment is to use List joins, but I'm not sure this is possible. I'm hoping someone can suggest a best course of ...
26
votes
11answers
6k views

RESTful API design. What should I return if there are no rows?

I'm currently coding an API for a social network with the Slim Framework. My question is: What are the best practices when there are no rows to return in the json structure? Lets say that this call ...
3
votes
1answer
176 views

What does it mean for an architectural style to be document-centric?

I heard it said that REST is "document-centric". Unclear what this meant, I began poking around and found the term document-oriented being used of databases, particularly NoSQL databases, and in ...
3
votes
2answers
5k views

How can I send data without POSTFIELDS in PHP curl?

I'm using a REST API through PHP and I'm a bit confused on the CURL_POSTFIELDS behavior, which implies that I must send a querystring or array, but what I'm seeking to do is just to send a string of ...
2
votes
2answers
915 views

Software Architecture Modelling

I am a little confused at how best to visually model a space-based architecture (SBA) for presenting the system/software architecture design to a client. The goal of this modelling is to show: The ...
1
vote
3answers
696 views

How to get different resources in a single endpoint in RESTful?

I have a REST webservice that have a couple of resources, like Company and User. But now I need to make a modification to the API to return a special list combining company, user and maybe other type ...
2
votes
2answers
176 views

Disagreement Concerning Data Integration (I may not understand enterprise ETL tools)

I have been in an ongoing conversation concerning a project we are about to undertake at my place at work. The project concerns data integration. Our customers want to be able to integrate our data ...
0
votes
1answer
437 views

REST API internal directory structure and RewriteEngine

I'm building a REST API. I don't want to have real folders in my directory structure, but I'm not quite sure what to use else. My REST API uses paths like this: ...
1
vote
3answers
320 views

Is RESTful API appropriate for services which are nearly computational in nature?

Is RESTful API appropriate for the following scenario? A time-limited token is obtained, which will last for one minute only Image is uploaded to a server Server performs some CPU-heavy image ...
2
votes
2answers
173 views

How to be robust against webservice downtime caused by third parties

I'm using iPage as my cloud based server provider. I haven't had any problems with them yet. They hold the scripts for my RESTful services for the mobile app I'm developing. My problem however is ...
1
vote
1answer
2k views

Implementing a claims-based security model to secure a WCF service

Currently, all of our web applications (and the WCF services they interact with) are run internally. Nothing is exposed to the web. We want to open up our web applications to the Internet and will ...
2
votes
2answers
421 views

How to handle many arguments in an API wrapper?

I'm writing a PHP API wrapper for a third party API. I want to make all the methods consistent, but I'm not sure how to handle the number of arguments some API routes accept. One API request accepts ...
6
votes
3answers
2k views

Versioning an API

I'm starting a side project, the first stage will be a building a web application with MVC, in later stages we will be adding clients for mobile platforms. My thought was to create one API that all of ...
4
votes
3answers
1k views

Creating an entity relationship in REST: May I create the parent by posting to a child id?

We are currently designing a REST API to access classical customer data. One of the elements in the API are the assets of an user. The assets are added under a given service. The backend API will ...
8
votes
2answers
594 views

Is this solution RESTful and secure?

Our product registers new players on our service, and we've chosen to host it on Azure (we're using .NET) and we wanted it to be stateless (for scalability) and relatively secure. Since this is the ...
4
votes
2answers
701 views

Custom functions in a REST API

Looking at two of our entities Company and Address. A company has a billingAddress and a profileAddress. I'm unsure of how to implement a function to set the billing address versus the profile. Here ...
3
votes
1answer
539 views

REST vs RPC for mobile development

As many know, mobile development is skyrocketing these days and, I believe, it affects what we code. To be specific, I am interested in developing web services for a mobile application. I see two ...
3
votes
1answer
1k views

Is MVC the optimal pattern to build a RESTful web service?

Not being a Java practitioner, I recently came to learn about the JAX-RS specification and Apache CXF framework. While still wrapping my head around all these things, I also read the this question on ...
0
votes
0answers
67 views

How to properly design REST [duplicate]

I intensively work with REST architecture about last year. And I don't stop a wonder how REST is inflexible or may I can't understand how to properly use it. So I use REST services on my backend and ...
3
votes
2answers
336 views

RESTful URI's, Creating a new noun/uri or add a queryparameter

I have a Person class with a one to many relationship to Employment. A Person in the CRM can have multiple Employments (historic data). My current REST URI for this class looks like this: ...
1
vote
1answer
522 views

How to decide the token expiry time in REST web service

I am working on creating a REST ws exposing few API's. A token is required for each API call. I am confused about the expiry time to be set for the token. Security+Performance wise what is the ideal ...
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 ...
3
votes
2answers
4k views

Custom use of Authorization header in a REST API

I'm building a REST api where clients are authenticated using client certificates. A client in this case is not an individual user, but some sort of a presentation layer. Users are authenticated using ...
5
votes
1answer
683 views

Best practice for handling asynchronous inter communication?

Recently completed a project for handling credit card processing. One of the difficulties I faced was handling the delay / possible failure of notification messages. The most complex example was: an ...
5
votes
1answer
7k views

How can I unit-test my REST web service?

I am new to unit testing, I've one REST web method that just calls DB and populates a DTO. Pseudo code is public object GetCustomer(int id) { CustomerDTO objCust = //get from DB return objCust; } ...
6
votes
3answers
1k views

Is it OK to partially change a collection with PUT or DELETE?

I have a collection of products in a product group e.g.: product-groups/123/products If I need to add to the collection, is it OK that I pass only some products with PUT? If I need to delete some ...
2
votes
2answers
135 views

What endpoints should I provide, if any, to permit connectivity testing for my web services?

What endpoints should I provide, if any, to permit connectivity / availability testing for my web services / Web API? TL;DR I am developing both the server and client in an enterprise environment. ...
6
votes
2answers
2k views

Can REST API be used as business layer?

I am using PHP Codeigniter MVC design pattern and I had this project with some sort of specific business processes In my application I will be dealing with 2 existing REST APIs: Google Trello ...
2
votes
2answers
857 views

Which is simpler for REST client call to return JSON - JQuery/JavaScript or Spring RestTemplate? [closed]

I've been trying to hack up an annotated Spring MVC web app but it's proving pretty hard to call a URL of my web app which fires a request to a remote API (UK Police data) and recieves a reply which I ...
6
votes
6answers
3k views

Testing a REST client against a REST Server. How to do fixtures?

When writing unit tests, it's common to use fixtures: little testable data, so we can say: 1. Get all clients should include Willy Wonka. 2. Delete client 3, and now get clients should not include ...
4
votes
1answer
820 views

How to achieve N-Tier type in Codeigniter MVC [closed]

I know that N-Tier intended to separate layers on different network but I would like to have the same code separation in codeigniter I got this idea to have Model : for database CRUD - > Data layer ...
1
vote
2answers
268 views

Managing Alerts in Web Application Using RESTful API

I have designed a RESTful API and I am now working on creating a web application to use the service. One thing I am struggling with is how to manage alerts in the web application (similar to the ...
2
votes
2answers
270 views

How to make my web app restful

I have a web application which I want to make RESTful. Here is the structure of the app: Top level has a bunch of search screens, they are basically tabs which search different parts of database ...
3
votes
1answer
2k views

Should web service response use a base class or generic class?

In my RESTful WCF web service I have something like the following response object. public class WebResponse<T> { public bool Success { get; set; } public T Data { get; set; } ...
2
votes
1answer
407 views

Sub-Resource data should be embedded in Resource entity or duplicated in NoSQL document?

I have a scenario similar to as depicted below, public class Post { private int id; private int postType; private int score; private User originalPoster; private String title; ...
14
votes
7answers
7k views

A Web application as a REST API client: how to handle resource identifiers

Several concepts related to REST conflict in my head when I try implementing it. I have a REST-ful back-end API system that holds the business logic, and a web application that provides the UI. From ...
1
vote
2answers
321 views

Is it possible to use a “non-commercial” REST API in a for-pay app?

I am interested in integrating the results of 3rd-party news API's into my for-pay application. The APIs would be a very small part of the app (e. g. the app is not just reselling the APIs). I have ...
7
votes
1answer
3k views

When to use nested resources in a RESTful API

I have two resources: users and links. Users can have several links associated with them. I have designed my RESTful API so that you can reach the links associated with a user at the following URI: ...