Questions tagged [rest]

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

Filter by
Sorted by
Tagged with
-1
votes
2answers
62 views

How to test a web service / API?

Our product is a C++ server component implementing a REST API. We have automatic tests that check whether the responses are byte-identical to the reference. The new requirement that came in is that ...
1
vote
1answer
36 views

Authenticate users (REST-API)

What I'm trying to build REST-API using Express and SQLite 5 to 10 authors should be able to post articles to /articles except them, no one is allowed to post anything My approach to build it ...
1
vote
1answer
45 views

What are the differences between server-server communication vs client-server communication

How does server-server communication compare to client-server communication? I'm wondering if there are any performance benefits when putting a GraphQL layer in between my client-side app and my rest-...
1
vote
2answers
85 views

Does API Rate Limiting Violate REST Methodology?

Information given here adequately explains the "Stateless" nature of REST. Even going as far as to say: For becoming stateless, do not store even authentication/authorization details of ...
0
votes
0answers
32 views

Should I use Odata with non-relational database?

I'm working on a project where I need to expose Odata endpoints to the clients, and we are using CosmosDB for our database. Most of the documents I found on implementing Odata with Cosmos DB actually ...
0
votes
1answer
61 views

How do I delete items on the frontend that have been deleted on the backend?

I'm building a single page application with a timeline and loading those objects in from a paginated REST API. I'd like to delete objects that don't exist in the backend anymore or that have been ...
0
votes
1answer
24 views

Sending multiple calls from angular application

I am working in Angular project which is connected to REST API. Here we have an endpoint to create and update room types. POST endpoint for create and PUT endpoint for update exiting room types. Both ...
4
votes
1answer
135 views

Accessing Animal not belonging to User: 400, 401, 403, 404, other?

Consider animals being some REST resources. User has animals assigned to him. The endpoint /api/animals/{animalId}/feed is used to feed a given animal by the authenticated user. User should not be ...
0
votes
0answers
42 views

How can I design a secure content verification web application?

In my country, there is a high number of fraudulent doctor's sick letter as they are manually written on paper. I'm designing a web application to combat this issue and have the whole process ...
1
vote
2answers
71 views

How to provide error details back to REST request?

In an ASP.NET MVC 4 REST API application, we have SQL errors which are occuring during the request. However, since the requests are big, we are streaming the data back to the client, which means we ...
5
votes
1answer
120 views

Designing routes for my REST API

I'm designing a RESTful API and have come across a problem when it comes to designing my routes, specifically the admin routes. My application currently has 2 types of users: regular users and ...
0
votes
1answer
33 views

Allowing a client to specify whether parameter is Required or Preferred

I am enhancing an existing API to provide shipping rates for a b2b web service. This specific endpoint returns a single rate based on matching request parameters such as the service level and package ...
1
vote
1answer
67 views

What are the advantages of sending timestamp in the response?

I am working on REST API and it calls another service and fetch the data and return to the UI. So It does not have any direct DB interactions. Recently we added exception handling feature which uses ...
1
vote
1answer
57 views

Should I use ROA or SOA for a distributed application and how could I implement REST If using ROA

For my final year project I'm looking to build a distributed version of a popular benchmarking client (this has already been done using various methods involving some form of existing frameworks), I ...
1
vote
3answers
116 views

In a micro service architecture, how should two services communicate with each other? Shared database? REST calls?

I've read a number of conflicting articles as to whether microservices should share a database. How and when should microservices communicate? Someone posed the example of 2 microservices: Employee ...
-3
votes
1answer
51 views

Standarized prefixes for naming REST POJO (Bad or good practice)? [closed]

We are building a software application for a client with a particular naming convention for REST services. For example if you use a POJO for your request or response in a REST service something like ...
2
votes
2answers
155 views

What are the best practices to authorize every REST request?

My question may sound very naïve to someone, but it is what it is. I have below scenario: Relational MySQL Database with BIGINT primary keys and foreign keys Spring boot as a backend (technology ...
-5
votes
1answer
88 views

Is it a good practice to return a map or list as HTTP response

The result of processing an HTTP request consists of mappings. Each mapping is from an order number to an object. Is it a good practice to return this as an HTTP response whose body is a Map<String,...
0
votes
2answers
72 views

Check if can delete before save

I am designing an application that works with REST API requests for dealing with information stored in a database. The user will add, edit, delete information in this client and after SAVE the ...
0
votes
3answers
299 views

Is there a way to signal that an endpoint should be called before another in REST?

I have 2 endpoints: enpoint A can only be called if endpoint B has been called before at least once. After endpoint B has been called, endpoint A can be called multiple times. endpoint B can be ...
1
vote
3answers
79 views

API Versioning when changing a single HTTP Method of an entity

When making a decision to version an API. If you are making a change to an entity but are only making changes to the one of the HTTP Methods. For example POST /api/v1/customers accepts a list of ...
1
vote
1answer
48 views

Authentication-as-a-Service (Auth0) and retrieving user profiles for many different users

For my recent project I decided to leverage Authentication-as-a-Service, in particular I am using Auth0 but I do not think this particularly matters. I've got my React client set up correctly and I am ...
0
votes
2answers
83 views

Does presentation layer inlcude REST and SOAP services?

Please, consider three pictures, I found in internet: 1: 2: 3: I always thought, that REST and SOAP services are in service layer - see #1. However, if you look at #2, you'll see, that presentation ...
0
votes
2answers
58 views

Should I return user data in an authentication endpoint using JWT?

I implement an auth endpoint which takes an email and password and returns a JWT token. Inside the JWT there is a payload containing the user ID. Does it matter from a REST/JWT standards perspective ...
8
votes
5answers
369 views

How to map “mv” operation to HTTP verbs?

In designing a RESTful api the problem arises as to how best to allow resources to be moved between collections. Renaming a resource could be done by using PATCH but this is not the same thing as ...
3
votes
4answers
204 views

HTTP POST request status 200 vs 204 vs 404

Our POST API takes in an identifier (let's say deviceId) in order to compute the accuracy of the location we have stored for that device in a DB; the result of that compution is then saved in a ...
2
votes
3answers
130 views

Good ways to prevent client side logic duplication without HATEOAS?

I know HATEOAS can be a bit of a heated topic. Some people like it, some people don't. That is not what I want to discuss. What I want to discuss is what technology other than HATEOAS (or some form of ...
-1
votes
1answer
53 views

Angular: send form or object?

My question is about clean code or best practice. I have a big formGroup and in my opinion its more difficult to map the form to an object than to send the form to the backend. best regards
1
vote
1answer
125 views

Communication between services in a microservices architecture, is direct communication okay?

I've been reading a lot on why one should use messages (w/ event sourcing/CQRS) for microservices communication and I get it. But most of the stuff I read online state that the main reason for using ...
0
votes
1answer
56 views

Best technique for sending multiple files in a single JSON post with Vue/javascript?

Using Vue/Electron to post to rails/Postgres backend. Is there a common design pattern/approach to posting multiple audio file objects BUT in a single post request? My current process (which works, ...
1
vote
0answers
52 views

Rest API backend and React frontend is MVP?

I'm doing a website that has a React frontend that calls some RESTful API and I would like to know if this is an MVP pattern. I think that the React application implements the View and the Presenter, ...
1
vote
1answer
56 views

Handling multiple REST API versions in one codebase

I have a REST API (v1) which routes through to a Java springboot component for which I now need to introduce a number of breaking changes to add new and changed functionality (v2). I understand how I ...
0
votes
0answers
24 views

Correct architecture regarding web sockets in a chat app

I am developing a simple real time chat app using Flask and React with socketio on both sides. I have a sidebar on the left with all the chats/conversations/rooms. When the user clicks on a sidebar ...
2
votes
1answer
73 views

Parsing complex object-like parameters via CLI arguments

Say we have an API that accepts a list of objects. Something like: { "family": "Does", "contact_details": [ { "name": "John&...
1
vote
1answer
45 views

API pagination with external or centralised authorization

I am building a REST API which would power a front end as well as other 3rd party apps and hence I want it to be as "standard" as possible. Right now, I am trying to stick to HATEOAS. The ...
0
votes
2answers
155 views

How to design my REST API

As part of our project (web application), we have to design REST API to manage the users of our application. Our API will be based on a company user management product (I will call it: C.U.M.) that ...
1
vote
3answers
186 views

How to keep front-end models in sync with REST API/DB without any UI delay?

Here's my problem. I want to make fast, subsequent requests to a REST API endpoint (/todos/:id/position) that have side effects on other resources. As an example of 5 fast subsequent requests: PATCH /...
0
votes
1answer
56 views

Logging microservice - error level in URI or body?

For my use case I need to create a microservice that receives log messages through HTTP. I'm wondering about the reasons to pick either of these: Method: POST URI: /{logLevel}/ Body: { "message&...
-4
votes
1answer
79 views

API vs REST API

I recently posted this question: Rest API for multiple applications? After searching a bit more and reading this question https://stackoverflow.com/questions/41189842/what-is-difference-between-rest-...
0
votes
1answer
78 views

Rest API for multiple applications?

I recently started learning about REST APIs and I am trying to understand how they work and what they are used for. From what I have read so far and from what I understand, a REST API can be used as a ...
-1
votes
1answer
61 views

How to handle pagination in a stateless application having multiple components involved for the data?

This problem statement is around one UI component, 3 service components. The current design of the application is like: UI makes request to Service-A to get data Service-A first makes a call to ...
0
votes
1answer
83 views

RESTful API design when a “resource” is split between storage locations

Let's say you have a database-credential resource that stores a few things: whitelist of IPs that can connect connection password for the user When GETting / POSTing these, should they be under one ...
0
votes
3answers
165 views

How to write unit tests for REST API that are atomic?

I am writing a REST API for use by the front-end web and mobile frameworks. Naturally, I write unit tests for each endpoint, which makes developing, evolving, and maintaining the API easier. However, ...
-3
votes
3answers
110 views

Which approach is the most RESTful

As a team we are preparing a REST API for handling chargers' operations. Let's say we have a part of the code that is responsible for starting charging and for stopping charging. We want to provide ...
0
votes
2answers
204 views

A desktop app which incorporates a REST API?

I am planning to build an adapter between a PC and devices which have the same function but which have different interfaces. The adapter will probably be based on a Raspberry Pi and will have a touch ...
0
votes
1answer
46 views

HTTPSession for session state in web APIs?

We are building a set of web APIs. The web APIs are called by clients & can call each other. State is required by these APIs for the users session (e.g. shopping basket type stuff). The state ...
0
votes
3answers
65 views

REST API path parameter with multiple meanings

I have an API that manages projects. You can get a single project via this endpoint, where {id} is a numeric project ID: /projects/{id} Each project can have one or more tags. Now I want to add an ...
1
vote
5answers
296 views

What http codes should i return when user request file which doesn't meet his requirements

i have a case where user can filter and download multiple pdf documents merged into single file. The client should display an error message when no document's meets the filter, and ask for ...
0
votes
1answer
79 views

Correct Architecture for Monolith with Go

I'm designing a monolith RESTful API that potentially sometime in the future may turn into microservices. I'm also trying following Uncle Bob's clean code as well. My question lies in structuring the ...
-2
votes
3answers
334 views

RESTful API User Accounts

I'm trying to expose RESTful API endpoints for creating user accounts to access my API. So, this would be one of the first things my consumers would use. I'm trying to figure out if this is how I ...

1
2 3 4 5
28